fix(evals): 漏响应在所有表里都删;评分按句子重叠合并重复的标注单元

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-11-04 12:26:21 +08:00
parent a07663cbdb
commit 54534be0c1
2 changed files with 28 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ class Mutator:
for r in chunk:
self.mark(r.get("responds") or [], "D01", "删连续一段", "block", worded=False)
del rows[start : start + n]
self.drop_everywhere([u for r in chunk for u in r.get("responds") or []])
return
def row_ops(self, n: int) -> None:
@@ -101,6 +102,11 @@ class Mutator:
done += 1
break
def drop_everywhere(self, units: list[str]) -> None:
"""漏响应要在所有表里都漏:S04 的技术参数同时列在全量偏离表和 ★ 表里,只删一张表等于没漏。"""
for t in self.tables():
t["rows"] = [r for r in t["rows"] if not set(r.get("responds") or []) & set(units)]
@staticmethod
def col(t: dict[str, Any], field: str) -> int | None:
cols = t.get("columns") or ["no", "requirement", "answer", "deviation", "note"]
@@ -114,6 +120,7 @@ class Mutator:
units = r.get("responds") or []
if op == "D01":
t["rows"].remove(r)
self.drop_everywhere(units)
self.mark(units, "D01", "删一行", worded=False)
elif op == "D03":
return self._unmet(r, tp, ans, dev)