From dea62edb8e35aa14ed50cfaa70467f3254c2e8d3 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Fri, 19 Jul 2024 00:32:59 +0300 Subject: [PATCH] ignore handakuten start/end --- japanese/pitch_accents/entry_to_moras.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/japanese/pitch_accents/entry_to_moras.py b/japanese/pitch_accents/entry_to_moras.py index 1758a22..92225e0 100644 --- a/japanese/pitch_accents/entry_to_moras.py +++ b/japanese/pitch_accents/entry_to_moras.py @@ -76,6 +76,8 @@ def entry_to_moras(entry: FormattedEntry) -> MoraSequence: current_flags |= MoraFlag.devoiced elif token == XmlTags.devoiced_end: current_flags &= ~MoraFlag.devoiced + elif token in (XmlTags.handakuten_start, XmlTags.handakuten_end): + pass elif token in (SpecialSymbols.nasal_dakuten_esc, SpecialSymbols.nasal_dakuten): assert MoraFlag.nasal in current_flags, "nasal handakuten only appears inside nasal tags." assert len(moras) > 0, "nasal handakuten must be attached to an existing mora."