Knowledge Graph - Kg Schema From Text
/install kg-schema-from-text
Knowledge Graph Schema Generation from Text
Automatically derive structured graph schemas from natural language documentation and domain descriptions.
This skill converts textual descriptions into machine-readable graph models with entities, relationships, properties, and constraints.
Quick Start
Use When
- Converting domain documentation → ontology
- Bootstrapping a knowledge graph schema
- Designing initial RDF/OWL or Neo4j schemas
- Extracting schema from requirements or API docs
Inputs
- Natural language domain descriptions
- Technical documentation
- Example records or datasets
- JSON/CSV structures
Outputs
- Entity types (nodes/classes)
- Relationship types (edges/predicates)
- Properties & attributes
- Graph schema representation (Property Graph or RDF)
Example
Input:
A university contains students, professors, courses, and departments.
Students enroll in courses. Professors teach courses.
Departments manage both courses and professors.
Output:
Entities: Student, Professor, Course, Department
Relationships:
- Student -> ENROLLED_IN -> Course
- Professor -> TEACHES -> Course
- Department -> MANAGES -> Course
- Department -> MANAGES -> Professor
Properties:
- Student: id, name, email, enrollment_date
- Course: id, title, credits, department
- Professor: id, name, department, specialization
- Department: id, name, budget
Execution Steps
- Extract Entities – Identify nouns/concepts from text
- Extract Relationships – Identify verbs/connections
- Extract Properties – Identify attributes and constraints
- Infer Structure – Build graph patterns
- Generate Schema – Output in target format (Property Graph or RDF)
Schema Formats
Property Graph (Neo4j, TigerGraph)
Nodes: Student, Professor, Course, Department
Relationships: ENROLLED_IN, TEACHES, MANAGES
Properties: Names, IDs, dates, descriptions
RDF/OWL (Semantic Web)
Classes: Student, Professor, Course, Department
Properties: enrolledIn, teaches, manages
Attributes: name, id, description
Recommended Libraries
- NLP: spaCy, transformers, nltk
- Graph: networkx, rdflib, pyvis, owlready2
- Schema: pydantic, dataclasses, jsonschema
Best Practices
✓ Use clear, consistent entity names (PascalCase)
✓ Normalize relationship directions
✓ Extract domain-specific constraints
✓ Separate schema from instance data
✓ Follow knowledge graph modeling standards
References
See extraction-patterns.md for entity/relationship extraction guidelines and example-schemas.md for domain examples.
Version: 1.0.0
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install kg-schema-from-text - 安装完成后,直接呼叫该 Skill 的名称或使用
/kg-schema-from-text触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Knowledge Graph - Kg Schema From Text 是什么?
Generate a structured knowledge graph ontology or schema from unstructured or semi-structured text sources. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 39 次。
如何安装 Knowledge Graph - Kg Schema From Text?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install kg-schema-from-text」即可一键安装,无需额外配置。
Knowledge Graph - Kg Schema From Text 是免费的吗?
是的,Knowledge Graph - Kg Schema From Text 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Knowledge Graph - Kg Schema From Text 支持哪些平台?
Knowledge Graph - Kg Schema From Text 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Knowledge Graph - Kg Schema From Text?
由 Muhammad Asif(@fisa712)开发并维护,当前版本 v1.0.0。