From 1f6c37c6f5bb733bea076ebd21d59e9ad62af2eb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 26 Nov 2016 12:36:04 +0100 Subject: [PATCH] Fix create_tokenizer when nlp is None --- spacy/language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/language.py b/spacy/language.py index 1d2ebcb15..145981bca 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -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)