mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +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)
|
||||
self.end_training()
|
||||
|
||||
def __init__(self, path=True, **overrides):
|
||||
if 'data_dir' in overrides and path is True:
|
||||
def __init__(self, **overrides):
|
||||
if 'data_dir' in overrides and overrides.get(path) is True:
|
||||
raise ValueError("The argument 'data_dir' has been renamed to 'path'")
|
||||
path = overrides.get('path')
|
||||
if isinstance(path, basestring):
|
||||
path = pathlib.Path(path)
|
||||
if path is True:
|
||||
|
|
Loading…
Reference in New Issue
Block a user