mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Check if the word is in one of the regular lists specific to each POS (#2886)
This commit is contained in:
parent
dfcc8f02af
commit
87ce435aff
|
@ -107,6 +107,9 @@ class FrenchLemmatizer(object):
|
|||
def lemmatize(string, index, exceptions, rules):
|
||||
string = string.lower()
|
||||
forms = []
|
||||
if (string in index):
|
||||
forms.append(string)
|
||||
return forms
|
||||
forms.extend(exceptions.get(string, []))
|
||||
oov_forms = []
|
||||
if not forms:
|
||||
|
|
Loading…
Reference in New Issue
Block a user