mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-22 07:10:28 +02:00
feat: Update year normalization logic to reflect US-style pronunciation for years 1100-1999; adjust related tests for consistency
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user