Skip to content

论文中缺少显式的 Abstract 会导致建立 Rag 失败的问题一种修改方式 #22

Description

@wushuaibuaa

在 md_processor.py中的parse 函数中增加一个没有 abstract 的判断。
文档无 Abstract 章节(如某些技术文档直接以 ## Introduction 开头)
collecting_authors 状态可能无限延续,导致作者信息误判为正文内容

            # 处理文档标题
            if not has_started:
                result['title'] = title_text
                collecting_authors = True
                has_started = True
                
                ######## 新增:检查后续10行是否存在Abstract
                next_lines = lines[i+1:i+10] if i+10 <= len(lines) else lines[i+1:]
                has_abstract = any(self.abstract_pattern.match(l) for l in next_lines)
                if not has_abstract:
                    collecting_authors = False
                    result['authors_info'] = ""
               ##########
                continue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions