From fde4f8ac8e5f9678b8fe39efac2d94c5304dca54 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 8 Sep 2019 18:08:09 +0200 Subject: [PATCH] Create lookups if not passed in --- spacy/language.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/language.py b/spacy/language.py index c10718e80..6a02a1fdd 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -39,6 +39,8 @@ from . import about class BaseDefaults(object): @classmethod def create_lemmatizer(cls, nlp=None, lookups=None): + if lookups is None: + lookups = cls.create_lookups(nlp=nlp) lemma_rules, lemma_index, lemma_exc, lemma_lookup = util.get_lemma_tables(lookups) return Lemmatizer(lemma_index, lemma_exc, lemma_rules, lemma_lookup)