spaCy/tests/test_infix.py

19 lines
331 B
Python
Raw Normal View History

2014-10-14 13:26:16 +04:00
from __future__ import unicode_literals
import pytest
from spacy.en import English
2014-10-14 13:26:16 +04:00
#def test_hyphen():
# tokens = EN.tokenize('best-known')
# assert len(tokens) == 3
2014-10-14 13:26:16 +04:00
def test_period():
EN = English()
tokens = EN('best.Known')
2014-10-14 13:26:16 +04:00
assert len(tokens) == 3
tokens = EN('zombo.com')
2014-10-14 13:26:16 +04:00
assert len(tokens) == 1