fix: classification修复+grammar增强+75/75回归确认
分类修复: - FILE-CONTROL关键词(0.99)错误覆盖匹配检测信号 - 添加匹配型规则引擎更优优先级,确保匹配检测结果优先 - has_matching_kw特征注入,使IF-less匹配程序也能识别 Grammar增强: - LEVEL扩展到/[0-9]+/覆盖所有COBOL层级号 - HEX_STRING添加支持X'...'十六进制字面量 - VALUE子句逗号预处理剥离(88-level多值) - COPY正则支持引号包覆的名称 结果: 内部75/75, 外部基准54/58(93%) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,11 @@ def resolve_matching_vs_keybreak(features: dict) -> dict:
|
||||
evidence.append(f"SELECT 文件数 >=2 + IF >=1 + KEY/结构/比较证据 → マッチング")
|
||||
return {"resolved_type": "マッチング", "confidence": 0.75, "evidence": evidence}
|
||||
|
||||
# 规则 3: 文件数>=2 + 匹配关键词信号
|
||||
if file_count >= 2 and features.get("has_matching_kw", False):
|
||||
evidence.append(f"文件数>=2 + KEY比较信号 -> マッチング(弱)")
|
||||
return {"resolved_type": "マッチング", "confidence": 0.50, "evidence": evidence}
|
||||
|
||||
# 回退: 无法明确判定
|
||||
evidence.append(f"特征不足: total_ifs={total_ifs}, comparison={comparison_ifs}, "
|
||||
f"file_count={file_count}, has_prev_key={has_prev_key}, "
|
||||
|
||||
Reference in New Issue
Block a user