feat: полнота извлечения — ресурсные индексы/машинисты, структура стоимости, сметная цена КА

Ре-аудит покрытия .gge: добавлено что выбрасывалось — индекс пересчёта ресурсов
с обоснованием, детали машинистов, структура стоимости расценки (машины/материалы/
зарплата), comment позиции, накладные/прибыль в рублях, возвратные материалы.
Фикс Transport (цена из PricePerUnitCur, была 0). КА: сметная цена EstimateWithoutVAT
(идёт в смету, ≠ рыночная) + склад + перевозка. Все парсеры сведены в gge_deep
(parse_ka перенесён из build-скрипта), убраны дубли хелперов. Добавлены юнит-тесты
парсеров (tests/test_gge_deep.py, 4/4). verify_corpus exit 0, обезличивание чисто
(email/телефон/ИНН = 0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
anor
2026-06-09 01:20:59 +10:00
co-authored by Claude Opus 4.8
parent 4e0777e078
commit 6f78d9a32c
9 changed files with 308 additions and 95 deletions
+6 -1
View File
@@ -75,7 +75,8 @@ def build(root: Path, out_dir: Path) -> dict:
"freq": 0, "_best_res": -1,
# обогащённые поля (из самого полного вхождения)
"unit_cost_cur": 0.0, "labor_ch": 0.0, "machinist_ch": 0.0,
"price_base": "", "price_cur": "",
"price_base": "", "price_cur": "", "comment": "",
"cost_structure": None,
"overhead": None, "profit": None, "coefficients": [],
"resources": {"workers": [], "machines": [], "materials": []},
}
@@ -100,6 +101,8 @@ def build(root: Path, out_dir: Path) -> dict:
rec["machinist_ch"] = p["machinist_ch"]
rec["price_base"] = data.get("price_base", "")
rec["price_cur"] = data.get("price_cur", "")
rec["comment"] = scrub(p.get("comment", ""))
rec["cost_structure"] = p.get("cost_structure")
rec["overhead"] = p["overhead"]
rec["profit"] = p["profit"]
rec["coefficients"] = p["coefficients"][:5]
@@ -138,7 +141,9 @@ def build(root: Path, out_dir: Path) -> dict:
"norm_sets": sorted(rec["norm_sets"], key=rec["norm_sets"].get, reverse=True),
"regions": sorted(rec["regions"], key=rec["regions"].get, reverse=True)[:5],
"qty": qstat,
"comment": rec["comment"],
"unit_cost_cur": rec["unit_cost_cur"],
"cost_structure": rec["cost_structure"],
"labor_ch": rec["labor_ch"], "machinist_ch": rec["machinist_ch"],
"price_base": rec["price_base"], "price_cur": rec["price_cur"],
"overhead": rec["overhead"], "profit": rec["profit"],