mirror of https://github.com/explosion/spaCy.git
Fix `path` param of `Language.__init__` always being ignored
There was an explicitly-declared `path` keyword argument, so 'path' would never be present in `**overrides`. This line just overwrote any manually-specified value the user might've passed to the `path` parameter.
This commit is contained in:
parent
1988fce389
commit
b0a07c21a0
|
@ -248,7 +248,6 @@ class Language(object):
|
||||||
def __init__(self, path=True, **overrides):
|
def __init__(self, path=True, **overrides):
|
||||||
if 'data_dir' in overrides and 'path' not in overrides:
|
if 'data_dir' in overrides and 'path' not in overrides:
|
||||||
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
|
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
|
||||||
path = overrides.get('path', True)
|
|
||||||
if isinstance(path, basestring):
|
if isinstance(path, basestring):
|
||||||
path = pathlib.Path(path)
|
path = pathlib.Path(path)
|
||||||
if path is True:
|
if path is True:
|
||||||
|
|
Loading…
Reference in New Issue