Fix lemmatizer

This commit is contained in:
Matthew Honnibal 2019-09-08 18:09:53 +02:00
parent fde4f8ac8e
commit aec6174ae6
1 changed files with 2 additions and 0 deletions

View File

@ -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":