* Make test_tag_names version-portable

This commit is contained in:
Matthew Honnibal 2015-02-01 15:40:20 +11:00
parent a20fdbd8ee
commit d1c9e7ff70
1 changed files with 3 additions and 2 deletions

View File

@ -1,11 +1,12 @@
from spacy.en import English
import six
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_) == str
assert isinstance(pizza.pos_, six.text_types)
assert type(pizza.dep) == int
assert type(pizza.dep_) == str
assert isinstance(pizza.dep_, six.text_types)
assert pizza.tag_ == u'NNS'