Fix Language.from_disk overwrites the meta.json file.

This commit is contained in:
Anto Binish Kaspar 2017-10-17 17:15:32 +05:30
parent 485c4f6df5
commit 8f5b60c168
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ class Language(object):
deserializers = OrderedDict((
('vocab', lambda p: self.vocab.from_disk(p)),
('tokenizer', lambda p: self.tokenizer.from_disk(p, vocab=False)),
('meta.json', lambda p: p.open('w').write(json_dumps(self.meta)))
('meta.json', lambda p: self.meta.update(ujson.load(p.open('r'))))
))
for name, proc in self.pipeline:
if name in disable: