mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	* 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>
		
			
				
	
	
		
			27 lines
		
	
	
		
			933 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			933 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import pytest
 | 
						|
 | 
						|
 | 
						|
def test_long_text(et_tokenizer):
 | 
						|
    # Excerpt: European Convention on Human Rights
 | 
						|
    text = """
 | 
						|
arvestades, et nimetatud deklaratsiooni eesmärk on tagada selles
 | 
						|
kuulutatud õiguste üldine ja tõhus tunnustamine ning järgimine;
 | 
						|
arvestades, et Euroopa Nõukogu eesmärk on saavutada tema
 | 
						|
liikmete suurem ühtsus ning et üheks selle eesmärgi saavutamise
 | 
						|
vahendiks on inimõiguste ja põhivabaduste järgimine ning
 | 
						|
elluviimine;
 | 
						|
taaskinnitades oma sügavat usku neisse põhivabadustesse, mis
 | 
						|
on õigluse ja rahu aluseks maailmas ning mida kõige paremini
 | 
						|
tagab ühelt poolt tõhus poliitiline demokraatia ning teiselt poolt
 | 
						|
inimõiguste, millest nad sõltuvad, üldine mõistmine ja järgimine;
 | 
						|
"""
 | 
						|
    tokens = et_tokenizer(text)
 | 
						|
    assert len(tokens) == 94
 | 
						|
 | 
						|
 | 
						|
@pytest.mark.xfail
 | 
						|
def test_ordinal_number(et_tokenizer):
 | 
						|
    text = "10. detsembril 1948"
 | 
						|
    tokens = et_tokenizer(text)
 | 
						|
    assert len(tokens) == 3
 |