feat: Update year normalization logic to reflect US-style pronunciation for years 1100-1999; adjust related tests for consistency

This commit is contained in:
JB
2025-12-16 08:52:03 -08:00
parent 015435adb6
commit 08ebedc177
6 changed files with 22 additions and 15 deletions
+2 -2
View File
@@ -1586,8 +1586,8 @@ def _normalize_grouped_numbers(text: str, cfg: ApostropheConfig) -> str:
return words.replace(" and ", " ")
return None
# 1200s are commonly spoken as "twelve hundred".
if 1200 <= value < 1300:
# US-style: 1100-1999 are often spoken as "X hundred Y".
if 1100 <= value <= 1999:
hundreds = value // 100
remainder = value % 100
prefix = _words(hundreds)