-
Notifications
You must be signed in to change notification settings - Fork 7
/
install_corpora.py
21 lines (18 loc) · 791 Bytes
/
install_corpora.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""`install_corpora.py` - install free data corpora."""
import logging
from cltk.data.fetch import FetchCorpus
if __name__ == '__main__':
LOG = logging.getLogger(__name__)
LOG.addHandler(logging.NullHandler())
logging.basicConfig(level=logging.INFO)
try:
corpus_importer = FetchCorpus('latin')
corpus_importer.import_corpus('latin_text_latin_library')
corpus_importer.import_corpus('latin_text_perseus')
corpus_importer.import_corpus('latin_text_tesserae')
corpus_importer = FetchCorpus('greek')
corpus_importer.import_corpus('greek_text_perseus')
corpus_importer.import_corpus('greek_text_lacus_curtius')
logging.disable(logging.NOTSET)
except:
LOG.exception('Failure to download test corpora')