Lemmatizer honors exceptions: Fix #1387

This commit is contained in:
Orion Montoya 2017-10-05 10:49:02 -04:00
parent e81a608173
commit ffb50d21a0

View File

@ -78,6 +78,7 @@ def lemmatize(string, index, exceptions, rules):
# forms.append(string)
forms.extend(exceptions.get(string, []))
oov_forms = []
if not forms:
for old, new in rules:
if string.endswith(old):
form = string[:len(string) - len(old)] + new