mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Add title-case version of morph rules (resolves #686)
This commit is contained in:
parent
64ec17abc1
commit
aefb898e37
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user