Fix JSON in tagger

This commit is contained in:
Matthew Honnibal 2016-10-21 01:44:10 +02:00
parent e16e78a737
commit 6eb73a095f

View File

@ -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(