spaCy/tests/test_vocab.py

24 lines
482 B
Python
Raw Normal View History

from __future__ import unicode_literals
from spacy.en import EN
def test_neq():
2014-10-30 07:15:30 +00:00
addr = EN.lexicon['Hello']
assert EN.lexicon['bye']['sic'] != addr['sic']
def test_eq():
2014-10-30 07:15:30 +00:00
addr = EN.lexicon['Hello']
assert EN.lexicon['Hello']['sic'] == addr['sic']
def test_case_neq():
2014-10-30 07:15:30 +00:00
addr = EN.lexicon['Hello']
assert EN.lexicon['hello']['sic'] != addr['sic']
def test_punct_neq():
2014-10-30 07:15:30 +00:00
addr = EN.lexicon['Hello']
assert EN.lexicon['Hello,']['sic'] != addr['sic']