跳到正文
Skillpedia
数据库14k · #11151

ontology

它能做什么

这项技能管理本体,也就是定义知识图谱结构方式的词汇和规则。适合设计或检查图谱背后结构的人。

适用场景

  • ✓当你想列出现有词汇表中的概念时。
  • ✓当你想检查本体中是否存在矛盾或无法满足的术语的时候。
  • ✓当你想根据一段文字描述或一组记录创建本体的时候。

技能链接

https://github.com/semantica-agi/semantica/blob/main/plugins/skills/ontology/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/semantica-agi/semantica/blob/main/plugins/skills/ontology/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我检查本体中是否有矛盾,并告诉我哪些术语导致了问题?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会加载本体,检查其一致性和可满足性,并报告错误和警告。它还可以列出概念、根据文字或记录构建新的本体,并依据形状规则检查实例数据。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

/semantica:ontology

Manage ontology definitions and validation. Usage: /semantica:ontology <task> [args]

Entry points: OntologyEngine (authoring, export, alignments) and OntologyValidator (consistency checking).


concepts <scheme_uri>

List SKOS concepts in a vocabulary scheme.

from semantica.ontology import OntologyEngine
from semantica.triplet_store import TripletStore

store = TripletStore(backend="oxigraph")   # needs semantica[tripletstore-oxigraph]
engine = OntologyEngine(store=store)       # list_concepts/list_vocabularies need a
                                            # configured store — raises ProcessingError without one
concepts = engine.list_concepts(scheme_uri)
vocabs = engine.list_vocabularies()

validate <ontology>

Check an ontology for consistency and satisfiability.

from semantica.ontology import OntologyValidator

validator = OntologyValidator(check_consistency=True, check_satisfiability=True)
result = validator.validate(ontology)   # dict or path to an ontology file
# result.valid, result.errors, result.warnings

For SHACL shape validation of instance data use SHACLGenerator / SHACLValidationReport:

from semantica.ontology import SHACLGenerator

build <text|data>

Generate an ontology from unstructured text or structured records.

engine = OntologyEngine()
onto = engine.from_text(text)          # LLM-assisted (needs an llm-* extra + API key)
onto = engine.from_data(records)       # deterministic, from structured data

export <ontology> <path> [--format turtle]

engine.export_owl(onto, path, format="turtle")
engine.export_shacl(onto, path, format="turtle")

align <source_uri> <target_uri> <predicate>

engine.create_alignment(source_uri, target_uri, predicate)
engine.get_alignments(entity_uri)
engine.list_alignments()

evaluate <ontology>

Quality-gate an ontology (OntologyEvaluator / OntologyQualityReport under the hood).

report = engine.evaluate(onto)
常见问题

什么是本体?

它是一套正式的术语和规则,描述你的数据中有哪些类型的事物,以及它们之间如何关联。

一致性检查会发现什么?

它会标出规则中的矛盾,这些矛盾会让本体不可靠。

它需要特殊的存储吗?

某些列出操作需要已配置的三元组存储。如果缺少,技能会说明。

详情

作者的原始描述

Manage ontology schemas, concepts, alignments, and SHACL/OWL validation for Semantica knowledge graphs. Uses OntologyEngine and OntologyValidator.

repo: semantica-agi/semantica

热度

GitHub 星标
14k
排名
#11151
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能