* Save vocab after training.

This commit is contained in:
Matthew Honnibal 2015-09-10 21:37:01 +02:00
parent 9d95c26179
commit 9baf0abd59

View File

@ -247,6 +247,7 @@ class Language(object):
self.parser.model.end_training(path.join(data_dir, 'deps', 'model'))
self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
self.vocab.dump(path.join(data_dir, 'vocab', 'lexemes.bin'))
self.vocab.strings.dump(path.join(data_dir, 'vocab', 'strings.txt'))
with open(path.join(data_dir, 'vocab', 'serializer.json'), 'w') as file_: