From 31aad7c08af21ad9db1d5613d70f6bf2defb6b60 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 14 Oct 2014 20:26:16 +1100 Subject: [PATCH] * Test hyphenation etc --- tests/test_infix.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_infix.py diff --git a/tests/test_infix.py b/tests/test_infix.py new file mode 100644 index 000000000..a1f6a627e --- /dev/null +++ b/tests/test_infix.py @@ -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