mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-11 08:42:28 +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.
|
# support old data.
|
||||||
path = path if not isinstance(path, basestring) else pathlib.Path(path)
|
path = path if not isinstance(path, basestring) else pathlib.Path(path)
|
||||||
if (path / 'templates.json').exists():
|
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_)
|
templates = json.load(file_)
|
||||||
elif require:
|
elif require:
|
||||||
raise IOError(
|
raise IOError(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user