mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
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
Block a user