mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Fix lemmatizer
This commit is contained in:
parent
fde4f8ac8e
commit
aec6174ae6
|
@ -55,6 +55,8 @@ class Lemmatizer(object):
|
||||||
Check whether we're dealing with an uninflected paradigm, so we can
|
Check whether we're dealing with an uninflected paradigm, so we can
|
||||||
avoid lemmatization entirely.
|
avoid lemmatization entirely.
|
||||||
"""
|
"""
|
||||||
|
if morphology is None:
|
||||||
|
morphology = {}
|
||||||
if univ_pos == "noun" and morphology.get("Number") == "sing":
|
if univ_pos == "noun" and morphology.get("Number") == "sing":
|
||||||
return True
|
return True
|
||||||
elif univ_pos == "verb" and morphology.get("VerbForm") == "inf":
|
elif univ_pos == "verb" and morphology.get("VerbForm") == "inf":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user