spaCy/spacy/tests/regression/test_issue1031.py

14 lines
261 B
Python
Raw Normal View History

2017-07-22 14:53:48 +03:00
from ...vocab import Vocab
def test_lexeme_text():
vocab = Vocab()
lex = vocab[u'the']
assert lex.text == u'the'
def test_lexeme_lex_id():
vocab = Vocab()
lex1 = vocab[u'the']
lex2 = vocab[u'be']
assert lex1.lex_id != lex2.lex_id