checkpoint: 提交当前工作区代码(同义词配置初版 + 既有流程改动)
- 新增 inq_synonym 表、62组同义词种子与智能体只读接口 - Python 同义词加载/归一化与 1板/2箱 机读 - 同步当前分支既有协作、报价识别、陆运等改动
This commit is contained in:
@@ -104,14 +104,22 @@ def assemble_land_query(facts: dict[str, Any] | None) -> dict[str, Any]:
|
||||
src = apply_quote_date_default(
|
||||
normalize_facts({str(k): v for k, v in dict(facts or {}).items() if v is not None})
|
||||
)
|
||||
# 最后一层兜底:国内整车→国内运输整车、9米6/1→9.6高栏/1、东兴口岸→东兴。
|
||||
try:
|
||||
from agent.policy.synonym import apply_value_synonyms
|
||||
|
||||
src = apply_value_synonyms(src, "LAND")
|
||||
except Exception:
|
||||
pass
|
||||
raw = {str(k): str(v).strip() for k, v in dict(facts or {}).items() if v is not None}
|
||||
land_type = (raw.get("运输类型") or src.get("运输类型") or "").strip()
|
||||
route = (raw.get("线路类别") or src.get("线路类别") or "").strip()
|
||||
# 标准值优先,原文只兜底:否则「东南亚整车」会绕开同义词表直接出站。
|
||||
land_type = (src.get("运输类型") or raw.get("运输类型") or "").strip()
|
||||
route = (src.get("线路类别") or raw.get("线路类别") or "").strip()
|
||||
origin = (src.get("起运港") or "").strip()
|
||||
dest = (src.get("目的港") or "").strip()
|
||||
cargo = (src.get("品名") or "").strip()
|
||||
quote_date = (src.get("报价日期") or "").strip()
|
||||
customs = (raw.get("通关口岸") or src.get("通关口岸") or "").strip()
|
||||
customs = (src.get("通关口岸") or raw.get("通关口岸") or "").strip()
|
||||
|
||||
missing: list[str] = []
|
||||
if not land_type:
|
||||
|
||||
Reference in New Issue
Block a user