mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
* Fix language.py for change in StringStore load API
This commit is contained in:
parent
23855db3ca
commit
f18fd8c659
|
@ -1,5 +1,6 @@
|
|||
from os import path
|
||||
from warnings import warn
|
||||
import io
|
||||
|
||||
try:
|
||||
import ujson as json
|
||||
|
@ -248,8 +249,8 @@ class Language(object):
|
|||
self.entity.model.end_training(path.join(data_dir, 'ner', 'model'))
|
||||
self.tagger.model.end_training(path.join(data_dir, 'pos', 'model'))
|
||||
|
||||
strings_loc = path.join(data_dir, 'vocab', 'strings.txt')
|
||||
with io.open(strings_loc, 'w', encoding='utf8'):
|
||||
strings_loc = path.join(data_dir, 'vocab', 'strings.json')
|
||||
with io.open(strings_loc, 'w', encoding='utf8') as file_:
|
||||
self.vocab.strings.dump(file_)
|
||||
|
||||
with open(path.join(data_dir, 'vocab', 'serializer.json'), 'w') as file_:
|
||||
|
|
Loading…
Reference in New Issue
Block a user