mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-25 00:34:20 +03:00
* Add test for tag names
This commit is contained in:
parent
613a195f92
commit
48b98e3fb5
11
tests/test_tag_names.py
Normal file
11
tests/test_tag_names.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from spacy.en import English
|
||||
|
||||
def test_tag_names():
|
||||
nlp = English()
|
||||
tokens = nlp(u'I ate pizzas with anchovies.', parse=True, tag=True)
|
||||
pizza = tokens[2]
|
||||
assert type(pizza.pos) == int
|
||||
assert type(pizza.pos_) == unicode
|
||||
assert type(pizza.dep) == int
|
||||
assert type(pizza.dep_) == unicode
|
||||
assert pizza.tag_ == u'NNS'
|
Loading…
Reference in New Issue
Block a user