Fix tests for changes to inflection structure (#9390)

This commit is contained in:
Paul O'Leary McCann 2021-10-07 11:42:18 +00:00 committed by GitHub
parent c4e3b7a5db
commit 113d53ab6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
):
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)
test_readings = [tt.morph.get("reading")[0] for tt in tokens]
assert test_readings == list(reading_forms)