Check if the word is in one of the regular lists specific to each POS (#2886)

This commit is contained in:
mauryaland 2018-11-14 15:58:43 +01:00 committed by Matthew Honnibal
parent dfcc8f02af
commit 87ce435aff

View File

@ -107,6 +107,9 @@ class FrenchLemmatizer(object):
def lemmatize(string, index, exceptions, rules): def lemmatize(string, index, exceptions, rules):
string = string.lower() string = string.lower()
forms = [] forms = []
if (string in index):
forms.append(string)
return forms
forms.extend(exceptions.get(string, [])) forms.extend(exceptions.get(string, []))
oov_forms = [] oov_forms = []
if not forms: if not forms: