Skip to content

Commit

Permalink
ignore handakuten start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Oct 10, 2024
1 parent c917ae5 commit dea62ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions japanese/pitch_accents/entry_to_moras.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit dea62ed

Please sign in to comment.