fix(9.19): закрыть фронт avtor-codex

pii_gate молчит на обычных юридических словах, но держит ФИО.
instruction_guard ловит широкий вокатив, приказ до обращения, английский приказ и гомоглиф.
pd_guard склеивает run-фрагменты docx перед поиском имени папки дела.
This commit is contained in:
Зарубин Филипп
2026-08-21 00:52:00 +03:00
parent 50d2b7d6f4
commit ed80e34a05
3 changed files with 41 additions and 6 deletions
+4 -1
View File
@@ -38,6 +38,7 @@ scripts/registry_check.py и в тело сообщения коммита. **И
"""
import argparse
import glob
import html
import io
import os
import re
@@ -262,7 +263,9 @@ def _office_xml_text(blob: bytes) -> str:
raw = zf.read(name).decode("utf-8", "replace")
except (OSError, KeyError, RuntimeError):
continue
parts.append(re.sub(r"<[^>]+>", " ", raw))
raw = re.sub(r"</(?:\w+:)?p>", "\n", raw)
raw = re.sub(r"</(?:\w+:)?tc>", "\t", raw)
parts.append(html.unescape(re.sub(r"<[^>]+>", "", raw)))
return "\n".join(parts)