mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Fix JSON in tagger
This commit is contained in:
parent
e16e78a737
commit
6eb73a095f
|
@ -109,7 +109,7 @@ cdef class Tagger:
|
|||
# support old data.
|
||||
path = path if not isinstance(path, basestring) else pathlib.Path(path)
|
||||
if (path / 'templates.json').exists():
|
||||
with (path / 'templates.json').open() as file_:
|
||||
with (path / 'templates.json').open('r', encoding='utf8') as file_:
|
||||
templates = json.load(file_)
|
||||
elif require:
|
||||
raise IOError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user