From aec6174ae6c032ca85d0ca10f2703f1fffa85cd1 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 8 Sep 2019 18:09:53 +0200 Subject: [PATCH] Fix lemmatizer --- spacy/lemmatizer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py index f7a58aa9f..c9ccbcd0d 100644 --- a/spacy/lemmatizer.py +++ b/spacy/lemmatizer.py @@ -55,6 +55,8 @@ class Lemmatizer(object): Check whether we're dealing with an uninflected paradigm, so we can avoid lemmatization entirely. """ + if morphology is None: + morphology = {} if univ_pos == "noun" and morphology.get("Number") == "sing": return True elif univ_pos == "verb" and morphology.get("VerbForm") == "inf":