mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Fix use of path argument in Language.__init__. Needs to be keyword arg, not positional.
This commit is contained in:
parent
a7b5fba132
commit
618ac36093
|
@ -245,9 +245,10 @@ class Language(object):
|
||||||
yield Trainer(self, gold_tuples)
|
yield Trainer(self, gold_tuples)
|
||||||
self.end_training()
|
self.end_training()
|
||||||
|
|
||||||
def __init__(self, path=True, **overrides):
|
def __init__(self, **overrides):
|
||||||
if 'data_dir' in overrides and path is True:
|
if 'data_dir' in overrides and overrides.get(path) is True:
|
||||||
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')
|
||||||
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
Block a user