* Relax rule-requirement in lemmatizer

This commit is contained in:
Matthew Honnibal 2015-08-27 10:26:19 +02:00
parent b6b1e1aa12
commit f0a7c99554
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class Lemmatizer(object):
pos = 'adj' pos = 'adj'
else: else:
return string 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) return min(lemmas)
def noun(self, string): def noun(self, string):