mirror of https://github.com/explosion/spaCy.git
Fix create_tokenizer when nlp is None
This commit is contained in:
parent
a335c6dcc2
commit
1f6c37c6f5
|
@ -80,7 +80,7 @@ class BaseDefaults(object):
|
||||||
else:
|
else:
|
||||||
infix_finditer = None
|
infix_finditer = None
|
||||||
vocab = nlp.vocab if nlp is not None else cls.create_vocab(nlp)
|
vocab = nlp.vocab if nlp is not None else cls.create_vocab(nlp)
|
||||||
return Tokenizer(nlp.vocab, rules=rules,
|
return Tokenizer(vocab, rules=rules,
|
||||||
prefix_search=prefix_search, suffix_search=suffix_search,
|
prefix_search=prefix_search, suffix_search=suffix_search,
|
||||||
infix_finditer=infix_finditer)
|
infix_finditer=infix_finditer)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue