* Copy gazetteer file in init_model

This commit is contained in:
Matthew Honnibal 2015-08-06 16:07:23 +02:00
parent faf75dfcb9
commit 3ecacb9635
1 changed files with 4 additions and 0 deletions

View File

@ -189,6 +189,10 @@ def main(lang_data_dir, corpora_dir, model_dir):
setup_tokenizer(lang_data_dir, model_dir / 'tokenizer')
setup_vocab(corpora_dir, model_dir / 'vocab')
if (lang_data_dir / 'gazetteer.json').exists():
copyfile(str(lang_data_dir / 'gazetteer.json'),
str(model_dir / 'vocab' / 'gazetteer.json'))
if not (model_dir / 'wordnet').exists():
copytree(str(corpora_dir / 'wordnet' / 'dict'), str(model_dir / 'wordnet'))