mirror of https://github.com/explosion/spaCy.git
Fix #719: Lemmatizer can no longer output empty string
This commit is contained in:
parent
ff277140f9
commit
413138de79
|
@ -78,7 +78,9 @@ def lemmatize(string, index, exceptions, rules):
|
|||
for old, new in rules:
|
||||
if string.endswith(old):
|
||||
form = string[:len(string) - len(old)] + new
|
||||
if form in index or not form.isalpha():
|
||||
if not form:
|
||||
pass
|
||||
elif form in index or not form.isalpha():
|
||||
forms.append(form)
|
||||
else:
|
||||
oov_forms.append(form)
|
||||
|
|
|
@ -4,7 +4,6 @@ from __future__ import unicode_literals
|
|||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
@pytest.mark.models
|
||||
@pytest.mark.parametrize('text', ["s..."])
|
||||
def test_issue719(EN, text):
|
||||
|
|
Loading…
Reference in New Issue