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.
从文本中抽取实体、关系、属性和事件信息,将其标准化为中间结构,然后以JSON、JSONL或TSV格式导出三元组。
本技能适用于:
若用户提供其他格式的文件,请先将其转换为文本,再使用本技能。
默认输出应包含:
json
{
triples: [],
entities: [],
attributes: [],
events: [],
ambiguities: []
}
支持的导出格式:
在抽取过程中使用以下记录结构。
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
}
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
这是一个半自动流程,并非声称完美抽取。脚本提供框架、标准化和导出功能。对于高风险输出,请保留证据并进行人工审查。
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 information-extraction-1776101651 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 information-extraction-1776101651 技能
skillhub install information-extraction-1776101651
文件大小: 10.81 KB | 发布时间: 2026-4-14 10:52