mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-23 14:39:52 +03:00
fix: match hyphenated words to lemmas in index_table (e.g. "co-authored" -> "co-author") (#13816)
This commit is contained in:
parent
b205ff65e6
commit
46613e27cf
|
@ -218,6 +218,9 @@ class Lemmatizer(Pipe):
|
|||
if not form:
|
||||
pass
|
||||
elif form in index or not form.isalpha():
|
||||
if form in index:
|
||||
forms.insert(0, form)
|
||||
else:
|
||||
forms.append(form)
|
||||
else:
|
||||
oov_forms.append(form)
|
||||
|
|
Loading…
Reference in New Issue
Block a user