refactor(stage-4): partition monolithic main.py into modular APIRouters

This commit is contained in:
Antigravity committed 2026-10-07 14:50:21 +03:00
1 parent 4e1f809018
commit dde87e5d6c
15 files changed
+2202 -2138

No files matched your search

+9 -1
View File
@@ -102,6 +102,10 @@ def get_sentence_dictionary_hints(sentence: str, target_word: str = "") -> str:
return ""
hints = []
special_guidance = {
"owl": "owl — это сова/неясыть (ни в коем случае НЕ орёл!)",
"tawny owl": "tawny owl — это сова/неясыть (птица семейства совиных, ни в коем случае НЕ орёл!)",
}
try:
with get_db() as conn:
@@ -122,7 +126,11 @@ def get_sentence_dictionary_hints(sentence: str, target_word: str = "") -> str:
continue
seen_terms.add(cand)
trans = matched_dict[cand]
hints.append(f"- {cand}: {trans}")
guidance = special_guidance.get(cand, "")
if guidance:
hints.append(f"- {cand}: {trans} (ВНИМАНИЕ: {guidance})")
else:
hints.append(f"- {cand}: {trans}")
if len(hints) >= 8:
break