mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-30 20:06:30 +03:00
14 lines
411 B
Python
14 lines
411 B
Python
# coding: utf-8
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize('text', ["We were scared", "We Were Scared"])
|
|
def test_issue744(en_tokenizer, text):
|
|
"""Test that 'were' and 'Were' are excluded from the contractions
|
|
generated by the English tokenizer exceptions."""
|
|
tokens = en_tokenizer(text)
|
|
assert len(tokens) == 3
|
|
assert tokens[1].text.lower() == "were"
|