spaCy/tests/tokenizer/test_infix.py

15 lines
323 B
Python
Raw Normal View History

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