mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Test hyphenation etc
This commit is contained in:
parent
99f5e59286
commit
31aad7c08a
17
tests/test_infix.py
Normal file
17
tests/test_infix.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from spacy.en import EN
|
||||||
|
|
||||||
|
|
||||||
|
def test_hyphen():
|
||||||
|
tokens = EN.tokenize('best-known')
|
||||||
|
assert len(tokens) == 3
|
||||||
|
|
||||||
|
|
||||||
|
def test_period():
|
||||||
|
tokens = EN.tokenize('best.Known')
|
||||||
|
assert len(tokens) == 3
|
||||||
|
tokens = EN.tokenize('zombo.com')
|
||||||
|
assert len(tokens) == 1
|
Loading…
Reference in New Issue
Block a user