Add title-case version of morph rules (resolves #686)

This commit is contained in:
ines 2017-03-18 17:27:11 +01:00
parent 64ec17abc1
commit aefb898e37
2 changed files with 6 additions and 2 deletions

View File

@ -68,3 +68,8 @@ MORPH_RULES = {
"were": {LEMMA: "be", "VerbForm": "Fin", "Tense": "Past", "Number": "Plur"}
}
}
for tag, rules in MORPH_RULES.items():
for key, attrs in dict(rules).items():
rules[key.title()] = attrs

View File

@ -4,9 +4,8 @@ from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models
@pytest.mark.parametrize('text', ["He is the man.", "They are the men."])
@pytest.mark.parametrize('text', ["He is the man", "he is the man"])
def test_issue686(EN, text):
"""Test that pronoun lemmas are assigned correctly."""
tokens = EN(text)