spaCy/spacy/tests/regression/test_issue1031.py
2017-07-22 13:53:48 +02:00

14 lines
261 B
Python

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