Conversation
Soul-Code
requested changes
Sep 8, 2026
Soul-Code
left a comment
Contributor
There was a problem hiding this comment.
这个修复方向有真实数据支持:目录点线长度差异确实会造成不必要的文本评分扣分。
但当前实现会对所有普通文本行执行该正则,缺少 Markdown fenced code 上下文。例如代码块中的 field....10 也会被改成 field 10;同时,仅凭“4 个以上点 + 行尾页码”还不能证明该行一定是目录项,普通正文或代码也可能被误处理。
请修改后再合并:
- 保留文档级 fenced code 状态,代码块内容不得进行目录点线归一化;
- 尽量把规则限制在可确认的目录行或目录上下文中;
- 补充测试:真实目录点线长度差异应被消除;代码块和普通正文中的相似文本必须保持不变。
另外,#10 与 #11 修改了同一文件的相邻逻辑,目前存在合并冲突;其中一个合并后,另一个需要 rebase,或者统一抽成安全的评分归一化流程。
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.
问题背景
目录页面通常使用连续句点连接章节标题和页码,例如:
第一章 引言........10
第一章 引言............10
这两条目录在语义上完全相同,差别只是点线长度。
模型生成 Markdown 时,目录点线的句点数量通常不稳定。如果 GT 和预测结果中的句点数量不同,原有文本 NED 会逐字比较这些句点,但是GT的句点个数通常与图片的句点也不相等,从而导致不必要的扣分。
修改内容