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:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user