2014-10-14 13:26:16 +04:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
2014-12-23 03:40:32 +03:00
|
|
|
from spacy.en import English
|
2014-10-14 13:26:16 +04:00
|
|
|
|
|
|
|
|
2014-11-04 18:03:22 +03:00
|
|
|
#def test_hyphen():
|
|
|
|
# tokens = EN.tokenize('best-known')
|
|
|
|
# assert len(tokens) == 3
|
2014-10-14 13:26:16 +04:00
|
|
|
|
|
|
|
|
|
|
|
def test_period():
|
2014-12-23 03:40:32 +03:00
|
|
|
EN = English()
|
2015-05-25 02:02:03 +03:00
|
|
|
tokens = EN.tokenizer('best.Known')
|
2014-10-14 13:26:16 +04:00
|
|
|
assert len(tokens) == 3
|
2014-12-23 03:40:32 +03:00
|
|
|
tokens = EN('zombo.com')
|
2014-10-14 13:26:16 +04:00
|
|
|
assert len(tokens) == 1
|