Merge branch 'develop' of https://github.com/explosion/spaCy into develop

This commit is contained in:
Matthew Honnibal 2017-08-19 22:42:50 +02:00
commit 42fa84075f
1 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ if is_python2:
unicode_ = unicode unicode_ = unicode
basestring_ = basestring basestring_ = basestring
input_ = raw_input input_ = raw_input
json_dumps = lambda data: ujson.dumps(data, indent=2).decode('utf8') json_dumps = lambda data: ujson.dumps(data, indent=2, escape_forward_slashes=False).decode('utf8')
path2str = lambda path: str(path).decode('utf8') path2str = lambda path: str(path).decode('utf8')
elif is_python3: elif is_python3:
@ -60,7 +60,7 @@ elif is_python3:
unicode_ = str unicode_ = str
basestring_ = str basestring_ = str
input_ = input input_ = input
json_dumps = lambda data: ujson.dumps(data, indent=2) json_dumps = lambda data: ujson.dumps(data, indent=2, escape_forward_slashes=False)
path2str = lambda path: str(path) path2str = lambda path: str(path)
@ -109,7 +109,7 @@ def import_file(name, loc):
if is_python2: if is_python2:
return imp.load_source(name, loc) return imp.load_source(name, loc)
else: else:
spec = importlib.util.spec_from_file_location(name, str(init_file)) spec = importlib.util.spec_from_file_location(name, str(loc))
module = importlib.util.module_from_spec(spec) module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module) spec.loader.exec_module(module)
return module return module