spaCy/spacy/tests/regression/test_issue891.py

13 lines
303 B
Python
Raw Normal View History

2017-03-19 10:47:56 +00:00
# coding: utf8
from __future__ import unicode_literals
import pytest
2017-03-19 10:55:37 +00:00
2017-03-19 10:47:56 +00:00
@pytest.mark.parametrize('text', ["want/need"])
def test_issue891(en_tokenizer, text):
"""Test that / infixes are split correctly."""
tokens = en_tokenizer(text)
assert len(tokens) == 3
assert tokens[1].text == "/"