bc1d56d1a4
P0.6: gcov infrastructure P1: extract_structure output expansion (11 new feature fields) P2: Confusion group rule engine (8 pairs + contradiction + backtrack) P3: 4-factor confidence calculation + quality gate update P4: 33+2 COBOL program type test samples (22 files, 7 categories) P5: parametrized/ test data generation engine P6: japanese_data.py lookup tables P7-10: Type-specific test suites (~159 parametrized tests) P11: Full classification pipeline (classify_program) + orchestrator integration P12: Documentation (module-interfaces, test-plan v3.0, coverage-matrix) Architecture decisions: - classification_pipeline/ merged to hina/pipeline/ - parametrized/ as independent module - japanese_data.py as root-level file - hina/__all__ only exports classify_program() Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
1.3 KiB
Python
48 lines
1.3 KiB
Python
"""HINA 混淆组判定规则引擎
|
|
|
|
公开 API:
|
|
resolve_confusion_pair() — 根据 pair_name 调度对应函数
|
|
detect_contradictions() — 检测可能矛盾的类型对
|
|
resolve_contradiction() — 解决矛盾,返回胜出的类型名
|
|
BacktrackResolver — 多轮回溯判定
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .confusion_groups import (
|
|
resolve_confusion_pair,
|
|
resolve_matching_vs_keybreak,
|
|
resolve_dedup_vs_nodedup,
|
|
resolve_validation_vs_keybreak,
|
|
resolve_csv_merge_vs_split,
|
|
resolve_simple_vs_two_stage,
|
|
resolve_pure_vs_mixed,
|
|
resolve_division_50_25_100,
|
|
resolve_mn_output_mode,
|
|
)
|
|
from .contradiction import (
|
|
CONTRADICTION_PAIRS,
|
|
detect_contradictions,
|
|
resolve_contradiction,
|
|
)
|
|
from .backtrack import BacktrackResolver
|
|
|
|
__all__ = [
|
|
# 混淆组判定
|
|
"resolve_confusion_pair",
|
|
"resolve_matching_vs_keybreak",
|
|
"resolve_dedup_vs_nodedup",
|
|
"resolve_validation_vs_keybreak",
|
|
"resolve_csv_merge_vs_split",
|
|
"resolve_simple_vs_two_stage",
|
|
"resolve_pure_vs_mixed",
|
|
"resolve_division_50_25_100",
|
|
"resolve_mn_output_mode",
|
|
# 矛盾检测与解决
|
|
"CONTRADICTION_PAIRS",
|
|
"detect_contradictions",
|
|
"resolve_contradiction",
|
|
# 回溯
|
|
"BacktrackResolver",
|
|
]
|