feat: refine assistant logic and update docs
This commit is contained in:
@@ -342,6 +342,7 @@ def numbers_to_words(text: str) -> str:
|
||||
case = "nominative"
|
||||
gender = "m"
|
||||
prep_clean = prep.strip().lower() if prep else None
|
||||
parsed = None
|
||||
|
||||
if prep_clean:
|
||||
morph_case = get_case_from_preposition(prep_clean)
|
||||
@@ -359,6 +360,7 @@ def numbers_to_words(text: str) -> str:
|
||||
# Спец-случай: "на 1 час"
|
||||
if (
|
||||
prep_clean == "на"
|
||||
and parsed is not None
|
||||
and parsed.normal_form in TIME_UNIT_LEMMAS
|
||||
and parsed.tag.gender in ("masc", "neut")
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user