mirror of https://github.com/explosion/spaCy.git
* Use dict.get in lemmatizer
This commit is contained in:
parent
e7e529edf4
commit
7c660c5efc
|
@ -33,7 +33,7 @@ class Lemmatizer(object):
|
|||
pos = 'verb'
|
||||
elif pos == ADJ:
|
||||
pos = 'adj'
|
||||
lemmas = lemmatize(string, self.index[pos], self.exc[pos], self.rules.get(pos, []))
|
||||
lemmas = lemmatize(string, self.index.get(pos, {}), self.exc.get(pos, {}), self.rules.get(pos, []))
|
||||
return lemmas
|
||||
|
||||
def noun(self, string):
|
||||
|
|
Loading…
Reference in New Issue