返回顶部
i

information-extraction信息抽取

Extract structured information from unstructured text through a semi-automatic pipeline. Support entity extraction, relation extraction, attribute extraction, and event extraction from plain text and Markdown. Use when converting raw text into triples, graph-ready records, or normalized structured facts from documents, notes, reports, transcripts, and web content copied as text.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
116
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

information-extraction

信息抽取

从文本中抽取实体、关系、属性和事件信息,将其标准化为中间结构,然后以JSON、JSONL或TSV格式导出三元组。

核心工作流程

  1. 1. 定义抽取范围与输出粒度。
  2. 将输入文本切分为句子和段落。
  3. 抽取实体并附上证据。
  4. 抽取关系、属性和事件。
  5. 标准化别名、谓词和重复记录。
  6. 导出三元组。默认输出格式为JSON。
  7. 在将输出视为最终结果前,审查歧义项。

输入范围

本技能适用于:

  • - 纯文本字符串
  • Markdown文本
  • 从网页、笔记、报告、转录文本或文档中复制的文本

若用户提供其他格式的文件,请先将其转换为文本,再使用本技能。

输出约定

默认输出应包含:

json
{
triples: [],
entities: [],
attributes: [],
events: [],
ambiguities: []
}

支持的导出格式:

  • - JSON(默认)
  • JSONL
  • TSV

抽取原则

  • - 先抽取显式事实,再进行推理。
  • 为重要记录保留证据片段。
  • 优先使用references/relation-taxonomy.md中的受控谓词。
  • 即使最终输出为三元组,内部仍将属性和事件分开处理。
  • 不要过早扁平化复杂事件。
  • 在导出前进行标准化。
  • 记录未解决的歧义,而非假装确定。

最小内部模式

在抽取过程中使用以下记录结构。

实体

json
{
id: ent_001,
mention: OpenAI,
canonical_name: OpenAI,
type: Organization,
evidence: OpenAI published the GPT-4 Technical Report.,
confidence: 0.95
}

关系

json
{
subject: ent_001,
predicate: published,
object: ent_002,
evidence: OpenAI published the GPT-4 Technical Report.,
confidence: 0.93
}

属性

json
{
entityid: ent002,
attribute: year,
value: 2023,
evidence: The report was released in 2023.,
confidence: 0.87
}

事件

json
{
id: ev_001,
type: Publication,
trigger: published,
participants: {
agent: ent_001,
object: ent_002
},
time: 2023,
location: null,
evidence: OpenAI published the GPT-4 Technical Report in 2023.,
confidence: 0.92
}

如何使用参考资料

  • - 阅读references/pipeline.md了解端到端流程。
  • 阅读references/schema.md了解类型和中间记录结构。
  • 在发明新谓词前,阅读references/relation-taxonomy.md。
  • 导出最终三元组时,阅读references/triple-mapping.md。
  • 当文本描述复杂事件时,阅读references/event-modeling.md。
  • 最终交付前,阅读references/quality-checklist.md。

脚本

抽取

bash
python3 skills/information-extraction/scripts/extract.py --text OpenAI published GPT-4. --output out.json

或从标准输入读取:

bash
echo OpenAI published GPT-4. | python3 skills/information-extraction/scripts/extract.py --stdin --output out.json

标准化

bash
python3 skills/information-extraction/scripts/normalize.py --input out.json --output normalized.json

导出三元组

bash
python3 skills/information-extraction/scripts/export_triples.py --input normalized.json --format json --output triples.json
python3 skills/information-extraction/scripts/export_triples.py --input normalized.json --format jsonl --output triples.jsonl
python3 skills/information-extraction/scripts/export_triples.py --input normalized.json --format tsv --output triples.tsv

自动化说明

这是一个半自动流程,并非声称完美抽取。脚本提供框架、标准化和导出功能。对于高风险输出,请保留证据并进行人工审查。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 information-extraction-1776101651 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 information-extraction-1776101651 技能

通过命令行安装

skillhub install information-extraction-1776101651

下载

⬇ 下载 information-extraction v1.0.0(免费)

文件大小: 10.81 KB | 发布时间: 2026-4-14 10:52

v1.0.0 最新 2026-4-14 10:52
Initial release: semi-automatic information extraction pipeline for entities, relations, attributes, events, and triple export (JSON/JSONL/TSV).

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部