mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Fix tests for changes to inflection structure (#9390)
This commit is contained in:
		
							parent
							
								
									c4e3b7a5db
								
							
						
					
					
						commit
						113d53ab6c
					
				| 
						 | 
					@ -130,7 +130,7 @@ def test_ja_tokenizer_sub_tokens(
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        (
 | 
					        (
 | 
				
			||||||
            "取ってつけた",
 | 
					            "取ってつけた",
 | 
				
			||||||
            ("五段-ラ行,連用形-促音便", "", "下一段-カ行,連用形-一般", "助動詞-タ,終止形-一般"),
 | 
					            ("五段-ラ行;連用形-促音便", "", "下一段-カ行;連用形-一般", "助動詞-タ;終止形-一般"),
 | 
				
			||||||
            ("トッ", "テ", "ツケ", "タ"),
 | 
					            ("トッ", "テ", "ツケ", "タ"),
 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
| 
						 | 
					@ -139,7 +139,7 @@ def test_ja_tokenizer_inflections_reading_forms(
 | 
				
			||||||
    ja_tokenizer, text, inflections, reading_forms
 | 
					    ja_tokenizer, text, inflections, reading_forms
 | 
				
			||||||
):
 | 
					):
 | 
				
			||||||
    tokens = ja_tokenizer(text)
 | 
					    tokens = ja_tokenizer(text)
 | 
				
			||||||
    test_inflections = [",".join(tt.morph.get("inflection")) for tt in tokens]
 | 
					    test_inflections = [tt.morph.get("inflection")[0] for tt in tokens]
 | 
				
			||||||
    assert test_inflections == list(inflections)
 | 
					    assert test_inflections == list(inflections)
 | 
				
			||||||
    test_readings = [tt.morph.get("reading")[0] for tt in tokens]
 | 
					    test_readings = [tt.morph.get("reading")[0] for tt in tokens]
 | 
				
			||||||
    assert test_readings == list(reading_forms)
 | 
					    assert test_readings == list(reading_forms)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user