fix: tighten German normalization edge cases#1
Open
apples-kksk wants to merge 2 commits into
Open
Conversation
semidark
reviewed
May 14, 2026
Owner
semidark
left a comment
There was a problem hiding this comment.
Overall this change set looks correct and test coverage for the edge cases is strong. I left two non-blocking suggestions focused on simplifying invalid-time handling and avoiding potential placeholder-token collisions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a small follow-up patch for the German G2P PR at hexgrad#97.
It tightens a few normalization edge cases:
Uhrinside longer words likeUhrzeit25:00 Uhrand23:99 Uhrunchanged instead of expanding each number around the colonDecimalfor currency amounts so values like€9,999round cleanly tozehn Eurorather thanneun Euro und einhundert CentVerification:
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=. uv run --isolated --no-cache --no-project --python 3.11 --with pytest python -m pytest -q tests -p no:cacheprovider->67 passed, 4 skippedPYTHONDONTWRITEBYTECODE=1 PYTHONPATH=. uv run --isolated --no-cache --no-project --python 3.11 --with pytest --with phonemizer-fork --with espeakng-loader python -m pytest -q tests/test_de.py -p no:cacheprovider->71 passedpython -m compileall misaki/de.py tests/test_de.py-> passedgit diff --check-> passedI also noticed
pyproject.tomladds thedeextra, butuv.lockdoes not yet include it. I could not regenerate the lockfile cleanly because the existingheextra fails resolution for Python 3.12/3.13 viamishkal-hebrew>=0.3.2, so I left the lockfile untouched here.