* Add test for tag names

This commit is contained in:
Matthew Honnibal 2015-01-30 16:45:11 +11:00
parent 613a195f92
commit 48b98e3fb5

11
tests/test_tag_names.py Normal file
View 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'