spaCy/spacy/tests/regression/test_issue600.py

12 lines
244 B
Python
Raw Normal View History

2017-01-10 21:24:10 +03:00
# coding: utf-8
2016-11-03 01:24:13 +03:00
from __future__ import unicode_literals
2017-01-10 21:24:10 +03:00
2016-11-03 01:24:13 +03:00
from ...vocab import Vocab
from ..util import get_doc
2016-11-03 01:24:13 +03:00
def test_issue600():
vocab = Vocab(tag_map={'NN': {'pos': 'NOUN'}})
doc = get_doc(vocab, ["hello"])
2017-01-10 21:24:10 +03:00
doc[0].tag_ = 'NN'