Repository navigation
fix(knowledge): 修复合并表格分块的字段重复与上下文丢失 - #1140
Merged
Merged
Conversation
将 d84ff247 的表格转换与 semantic 修复单独移植到官方 main@7b752160。 生产实现保持一致,横向合并只输出一次,纵向类别随行继承, 跨字段说明独立保留;每个完整表格行单独成块并保留来源与贴表正文。 投稿前增强原回归:从公开分块入口验证来源,使用多句条件证明 超长行保护能阻止实际拆分。恢复旧实现13项失败,恢复拆行负控1项失败。 验证:最终相关38项通过;全后端unit3663通过/11跳过(镜像无DockerCLI)。 工程契约及其56项单测、Ruff lint/format/import、文档构建、 相对链接和 diff --check 通过;全新独立Reviewer复核后无待修问题。 未重建业务索引或验证检索效果,不包含MinerU镜像、配置与用户原文。
Contributor
Author
|
申报评审各等级技术职务任职资格.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
HTML 表格含合并单元格时,semantic 会重复输出同一个“学历”字段,并把跨字段说明错误赋给学历、资历等字段;长度切分还可能拆散一行中的类别与条件。例如 colspan=3 的“学历:本科”会被输出三次。
本 PR 保留单元格身份,横向合并只输出一次,纵向类别随行继承;同一逻辑表头下的子条件合并,跨字段说明保留为独立正文。semantic 为每个完整数据行生成独立块,并保留同一 HTML 块中的其他表格、贴表正文和来源区间。
bug-fix。工程主张与 Owner
table_utils.py::html_table_to_key_value。semantic.py::chunk_markdown。来源投影沿用原 HTML token 的行区间,不生成虚假的单元格行号。main@7b752160;从本地修复d84ff247单独移植5个文件,无冲突。使用现有转换器和分块入口,不新增配置、依赖或兼容层。验证情况
合并字段与行上下文完整
html_table_to_key_value。跨字段说明不错误赋值
html_table_to_key_value。完整行、周围正文及来源保留
chunk_markdown及现有来源投影。本次在官方最新基线的独立 checkout 上验证;使用已有 API 依赖镜像、只读挂载源码、
--network none,未加载业务数据或替换运行服务。容器中实际执行:pnpm run build、git diff --checkPassed。简化 / 删除验收
不涉及。
独立语义 Review
全新上下文 Reviewer 按 Standards / Spec 审查原需求、职责归属、全部5文件 diff、方案与边界,并独立运行38项相关集合。审查发现的两处测试问题已修正:使用公开分块入口;多句超长行在恢复拆分的负控中准确失败。最终结论:Standards / Spec 均无待修问题。独立审查未重新执行真实原文探针或检索评估。
未验证范围与风险
事故反馈
未达到高影响事故复盘门槛;稳定 reproducer 和负向回归已落在 owning unit 套件。
界面变更
不涉及。
关联事项
无。
补充说明
无配置、依赖或 Schema 迁移;已有文件重新分块后应用新规则,PR 不自动改写旧数据。测试使用合成表格,未提交用户 PDF、解析原文或本地运行数据。