mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +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):
|
||||
if nlp is None:
|
||||
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)
|
||||
else:
|
||||
return Tagger.load(nlp.path / 'ner', nlp.vocab)
|
||||
return Tagger.load(nlp.path / 'pos', nlp.vocab)
|
||||
|
||||
@classmethod
|
||||
def create_parser(cls, nlp=None):
|
||||
|
|
Loading…
Reference in New Issue
Block a user