feat(tts): Aussprache-Lexikon befüllt (verifizierte Vokallängen-Fixes) + case-insensitiv
terms-Matching jetzt case-insensitiv (Aussprache ist case-egal -> ein Eintrag deckt auch Satzanfaenge ab). config/pronunciation.de.yaml mit per espeak-ng verifizierten Korrekturen gefuellt: stroemt/stroemte/loest/toent/blaest/buesst/ gruesst/Mond -> lange Vokale (h-Umschreibung). Kontrolle: loescht/waescht/stroemst bleiben korrekt unangetastet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
c9d8552ec7
commit
449a62a88e
3 changed files with 30 additions and 6 deletions
|
|
@ -83,6 +83,16 @@ def test_adapter_numbered_list_to_ordinal():
|
|||
assert "erstens, Milch" in out and "zweitens, Eier" in out
|
||||
|
||||
|
||||
def test_terms_dict_is_case_insensitive():
|
||||
from app.pipeline.tts_normalizer import _apply_dict
|
||||
mapping = {"strömt": "ströhmt"}
|
||||
assert _apply_dict("Der Bach strömt.", mapping, ignore_case=True) == "Der Bach ströhmt."
|
||||
# Satzanfang (Großschreibung) wird ebenfalls erfasst.
|
||||
assert _apply_dict("Strömt es?", mapping, ignore_case=True) == "ströhmt es?"
|
||||
# Teilwort wird NICHT getroffen (Wortgrenze).
|
||||
assert _apply_dict("Strömung", mapping, ignore_case=True) == "Strömung"
|
||||
|
||||
|
||||
def test_german_numbers_table():
|
||||
assert gn.ordinal_attributive(1) == "erster"
|
||||
assert gn.ordinal_adverbial(3) == "drittens"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue