mirror of https://github.com/explosion/spaCy.git
Test morphological features
This commit is contained in:
parent
9dceb97570
commit
19e6b39786
|
@ -22,9 +22,14 @@ def test_token_morph_id(i_has):
|
|||
|
||||
def test_morph_props(i_has):
|
||||
assert i_has[0].morph.pron_type == i_has.vocab.strings["PronType_prs"]
|
||||
assert i_has[0].morph.pron_type_ == "PronType_prs"
|
||||
assert i_has[1].morph.pron_type == 0
|
||||
|
||||
|
||||
def test_morph_iter(i_has):
|
||||
assert list(i_has[0].morph) == ["PronType_prs"]
|
||||
assert list(i_has[1].morph) == ["Number_sing", "Person_three", "VerbForm_fin"]
|
||||
|
||||
|
||||
def test_morph_get(i_has):
|
||||
assert i_has[0].morph.get("pron_type") == "PronType_prs"
|
||||
|
|
Loading…
Reference in New Issue