mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
35 lines
673 B
Python
35 lines
673 B
Python
from __future__ import unicode_literals
|
|
|
|
from spacy.en import EN
|
|
|
|
|
|
def test_neq():
|
|
addr = EN.lookup('Hello')
|
|
assert EN.lookup('bye').string != addr.string
|
|
|
|
|
|
def test_eq():
|
|
addr = EN.lookup('Hello')
|
|
assert EN.lookup('Hello').string == addr.string
|
|
|
|
|
|
def test_round_trip():
|
|
hello = EN.lookup('Hello')
|
|
assert hello.string == 'Hello'
|
|
|
|
|
|
def test_case_neq():
|
|
addr = EN.lookup('Hello')
|
|
assert EN.lookup('hello').string != addr.string
|
|
|
|
|
|
def test_punct_neq():
|
|
addr = EN.lookup('Hello')
|
|
assert EN.lookup('Hello,').string != addr.string
|
|
|
|
|
|
def test_short():
|
|
addr = EN.lookup('I')
|
|
assert addr.string == 'I'
|
|
assert addr.string != 'not'
|