Fix create_tokenizer when nlp is None

This commit is contained in:
Matthew Honnibal 2016-11-26 12:36:04 +01:00
parent a335c6dcc2
commit 1f6c37c6f5
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ class BaseDefaults(object):
else:
infix_finditer = None
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,
infix_finditer=infix_finditer)