From 8a6b35d2665c406e4c947a7789560547d8a9f56f Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Oct 2016 11:41:55 +0200 Subject: [PATCH] Delay binding in MakeDoc --- spacy/language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/language.py b/spacy/language.py index 2cb95b935..65193880e 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -125,7 +125,7 @@ class BaseDefaults(object): return Matcher(vocab) def MakeDoc(self, nlp, **cfg): - return nlp.tokenizer.__call__ + return lambda text: nlp.tokenizer(text) def Pipeline(self, nlp, **cfg): pipeline = []