mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +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"}
|
"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
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail
|
|
||||||
@pytest.mark.models
|
@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):
|
def test_issue686(EN, text):
|
||||||
"""Test that pronoun lemmas are assigned correctly."""
|
"""Test that pronoun lemmas are assigned correctly."""
|
||||||
tokens = EN(text)
|
tokens = EN(text)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user