mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-01 00:17:44 +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>
		
			
				
	
	
		
			26 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| import pytest
 | |
| 
 | |
| 
 | |
| def test_long_text(sq_tokenizer):
 | |
|     # Excerpt: European Convention on Human Rights
 | |
|     text = """
 | |
| Qeveritë nënshkruese, anëtare të Këshillit të Evropës,
 | |
| Duke pasur parasysh Deklaratën Universale të të Drejtave të
 | |
| Njeriut, të shpallur nga Asambleja e Përgjithshme e Kombeve të
 | |
| Bashkuara më 10 dhjetor 1948;
 | |
| Duke pasur parasysh, se kjo Deklaratë ka për qëllim të sigurojë
 | |
| njohjen dhe zbatimin universal dhe efektiv të të drejtave të
 | |
| shpallura në të;
 | |
| Duke pasur parasysh se qëllimi i Këshillit të Evropës është që të
 | |
| realizojë një bashkim më të ngushtë midis anëtarëve të tij dhe
 | |
| se një nga mjetet për të arritur këtë qëllim është mbrojtja dhe
 | |
| zhvillimi i të drejtave të njeriut dhe i lirive themelore;
 | |
| Duke ripohuar besimin e tyre të thellë në këto liri themelore që
 | |
| përbëjnë themelet e drejtësisë dhe të paqes në botë, ruajtja e të
 | |
| cilave mbështetet kryesisht mbi një regjim politik demokratik nga
 | |
| njëra anë, dhe nga ana tjetër mbi një kuptim dhe respektim të
 | |
| përbashkët të të drejtave të njeriut nga të cilat varen;
 | |
| """
 | |
|     tokens = sq_tokenizer(text)
 | |
|     assert len(tokens) == 182
 |