spaCy/tests/test_infix.py

19 lines
341 B
Python
Raw Normal View History

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