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 10:15:30 +03:00
addr = EN.lexicon['Hello']
assert EN.lexicon['bye']['sic'] != addr['sic']
def test_eq():
2014-10-30 10:15:30 +03:00
addr = EN.lexicon['Hello']
assert EN.lexicon['Hello']['sic'] == addr['sic']
def test_case_neq():
2014-10-30 10:15:30 +03:00
addr = EN.lexicon['Hello']
assert EN.lexicon['hello']['sic'] != addr['sic']
def test_punct_neq():
2014-10-30 10:15:30 +03:00
addr = EN.lexicon['Hello']
assert EN.lexicon['Hello,']['sic'] != addr['sic']