mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-27 01:34:30 +03:00
Fix loading of tagger.
This commit is contained in:
parent
76c815f40d
commit
45a6f9b9c7
|
@ -70,10 +70,10 @@ class BaseDefaults(object):
|
||||||
def create_tagger(cls, nlp=None):
|
def create_tagger(cls, nlp=None):
|
||||||
if nlp is None:
|
if nlp is None:
|
||||||
return Tagger(cls.create_vocab(), features=cls.tagger_features)
|
return Tagger(cls.create_vocab(), features=cls.tagger_features)
|
||||||
elif nlp.path is None or not (nlp.path / 'ner').exists():
|
elif nlp.path is None or not (nlp.path / 'pos').exists():
|
||||||
return Tagger(nlp.vocab, features=cls.tagger_features)
|
return Tagger(nlp.vocab, features=cls.tagger_features)
|
||||||
else:
|
else:
|
||||||
return Tagger.load(nlp.path / 'ner', nlp.vocab)
|
return Tagger.load(nlp.path / 'pos', nlp.vocab)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create_parser(cls, nlp=None):
|
def create_parser(cls, nlp=None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user