* Relax rule-requirement in lemmatizer

This commit is contained in:
Matthew Honnibal 2015-08-27 10:26:19 +02:00
parent b6b1e1aa12
commit f0a7c99554

View File

@ -35,7 +35,7 @@ class Lemmatizer(object):
pos = 'adj'
else:
return string
lemmas = lemmatize(string, self.index[pos], self.exc[pos], self.rules[pos])
lemmas = lemmatize(string, self.index[pos], self.exc[pos], self.rules.get(pos, []))
return min(lemmas)
def noun(self, string):