clic.migrate.corpora_repo: Import books from the CCR corpora repository¶
-
clic.migrate.corpora_repo.
export_book
(book, dir='.', write_regions=False)¶ Export book object (book) to “(dir)/(book[‘name’]).txt”
If write_regions is true, write a book.regions.csv next to the book containing all regions.
-
clic.migrate.corpora_repo.
get_corpora_for
(book_paths)¶ Return all corpora objects that contain the books in book_paths
-
clic.migrate.corpora_repo.
import_book
(book_path)¶ Read book at (book_path)
-
clic.migrate.corpora_repo.
parse_corpora_bib
(corpora_dir, bib_name='corpora.bib')¶ Read in a corpora.bib, output a list of corpora dicts
-
clic.migrate.corpora_repo.
script_import_corpora_repo
()¶ Import corpora book file(s) into DB
-
clic.migrate.corpora_repo.
script_region_export
()¶ Calculate regions and re-export them as CSV
-
clic.migrate.corpora_repo.
to_region_file
(book_path)¶ Path of relevant region file for book_path