mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-16 06:37:04 +03:00
7ec1452f5f
* added ellided forms * rearranged a bit * rearranged a bit * added stopword tests * blacked tests file
18 lines
449 B
Python
18 lines
449 B
Python
import pytest
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"word", ["un", "lo", "dell", "dall", "si", "ti", "mi", "quest", "quel", "quello"]
|
|
)
|
|
def test_stopwords_basic(it_tokenizer, word):
|
|
tok = it_tokenizer(word)[0]
|
|
assert tok.is_stop
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"word", ["quest'uomo", "l'ho", "un'amica", "dell'olio", "s'arrende", "m'ascolti"]
|
|
)
|
|
def test_stopwords_elided(it_tokenizer, word):
|
|
tok = it_tokenizer(word)[0]
|
|
assert tok.is_stop
|