mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +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):
|
def lemmatize(string, index, exceptions, rules):
|
||||||
string = string.lower()
|
string = string.lower()
|
||||||
forms = []
|
forms = []
|
||||||
|
if (string in index):
|
||||||
|
forms.append(string)
|
||||||
|
return forms
|
||||||
forms.extend(exceptions.get(string, []))
|
forms.extend(exceptions.get(string, []))
|
||||||
oov_forms = []
|
oov_forms = []
|
||||||
if not forms:
|
if not forms:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user