mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
7b134b8fbd
* Added Slovak * Added Slovenian tests * Added Estonian tests * Added Croatian tests * Added Latvian tests * Added Icelandic tests * Added Afrikaans tests * Added language-independent tests * Added Kannada tests * Tidied up * Added Albanian tests * Formatted with black * Added failing tests for anomalies * Update spacy/tests/lang/af/test_text.py Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Estonian tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Croatian tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Icelandic tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Latvian tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Slovak tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Added context to failing Slovenian tokenizer test Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
23 lines
931 B
Python
23 lines
931 B
Python
import pytest
|
|
|
|
|
|
def test_long_text(af_tokenizer):
|
|
# Excerpt: Universal Declaration of Human Rights; “'n” changed to “die” in first sentence
|
|
text = """
|
|
Hierdie Universele Verklaring van Menseregte as die algemene standaard vir die verwesenliking deur alle mense en nasies,
|
|
om te verseker dat elke individu en elke deel van die gemeenskap hierdie Verklaring in ag sal neem en deur opvoeding,
|
|
respek vir hierdie regte en vryhede te bevorder, op nasionale en internasionale vlak, daarna sal strewe om die universele
|
|
en effektiewe erkenning en agting van hierdie regte te verseker, nie net vir die mense van die Lidstate nie, maar ook vir
|
|
die mense in die gebiede onder hul jurisdiksie.
|
|
|
|
"""
|
|
tokens = af_tokenizer(text)
|
|
assert len(tokens) == 100
|
|
|
|
|
|
@pytest.mark.xfail
|
|
def test_indefinite_article(af_tokenizer):
|
|
text = "as 'n algemene standaard"
|
|
tokens = af_tokenizer(text)
|
|
assert len(tokens) == 4
|