和顺 / 衡律 返回所属 Agent
4.4

主张的真实性支持评价

原能力

按支持、反驳及限制评价主张,保存依据和不确定性,模型一致不代替真实性。(合同附件 R7 4.4)

首选项目

Taguette(BSD-3-Clause)。 Taguette

匹配范围

批注类别记录支持、反驳和限制的原文。

源码

Taguette · class Tag

taguette/database/models.py · 617–630 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class Tag(Base):
    __tablename__ = 'tags'
    __table_args__ = ({'sqlite_autoincrement': True},)

    id = Column(Integer, primary_key=True)
    project_id = Column(Integer, ForeignKey('projects.id', ondelete='CASCADE'),
                        nullable=False, index=True)
    project = relationship('Project', back_populates='tags')

    path = Column(String(200), nullable=False, index=True)
    description = Column(Text, nullable=False)

    __table_args__ = (
        UniqueConstraint('project_id', 'path'),

Taguette · class Highlight

taguette/database/models.py · 592–605 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class Highlight(Base):
    __tablename__ = 'highlights'
    __table_args__ = ({'sqlite_autoincrement': True},)

    id = Column(Integer, primary_key=True)
    document_id = Column(Integer, ForeignKey('documents.id',
                                             ondelete='CASCADE'),
                         nullable=False, index=True)
    document = relationship('Document', back_populates='highlights')
    start_offset = Column(Integer, nullable=False)
    end_offset = Column(Integer, nullable=False)
    snippet = Column(Text, nullable=False)
    tags = relationship('Tag', secondary='highlight_tags',
                        back_populates='highlights')

实现与验收要点

真实性证据等级与专业评价,避免以模型一致代替事实。