knowledge-mapper

- 📄 **文档解析**: 支持 Markdown、TXT 格式 - 🔍 **实体识别**: 基于规则和关键词的实体提取 - 🔗 **关系发现**: 基于共现的实体关系提取 - 📊 **知识可视化**: 文本、JSON、GraphViz DOT 格式导出 - 🔎 **知识查询**: 搜索实体和文档

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "knowledge-mapper" with this command: npx skills add harrylabsj/knowledge-mapper

  • 📄 文档解析: 支持 Markdown、TXT 格式
  • 🔍 实体识别: 基于规则和关键词的实体提取
  • 🔗 关系发现: 基于共现的实体关系提取
  • 📊 知识可视化: 文本、JSON、GraphViz DOT 格式导出
  • 🔎 知识查询: 搜索实体和文档

安装

# 添加到 PATH
ln -s ~/.openclaw/workspace/skills/knowledge-mapper/knowledge-graph ~/.local/bin/knowledge-graph

使用

添加文档

# 添加 Markdown 文档
knowledge-graph add ~/documents/article.md

# 添加文本文件
knowledge-graph add ~/notes/ideas.txt

查看文档列表

knowledge-graph documents

查看实体

# 列出所有实体(默认50个)
knowledge-graph entities

# 列出更多实体
knowledge-graph entities --limit 100

# 按类型过滤
knowledge-graph entities --type TECH

实体类型

  • PERSON - 人物
  • ORG - 组织/公司
  • TECH - 技术/编程语言
  • CONCEPT - 概念/术语
  • TERM - 高频词/术语
  • UNKNOWN - 未分类

查看关系

# 列出所有关系(默认30个)
knowledge-graph relations

# 列出更多关系
knowledge-graph relations --limit 50

导出知识图谱

# 文本格式(默认)
knowledge-graph export

# JSON 格式
knowledge-graph export --format json

# GraphViz DOT 格式(可用于绘图)
knowledge-graph export --format dot > graph.dot
dot -Tpng graph.dot -o graph.png

搜索知识库

# 搜索关键词
knowledge-graph search "人工智能"

# 搜索实体
knowledge-graph search "Python"

查看统计

knowledge-graph stats

示例工作流程

# 1. 添加文档到知识库
knowledge-graph add ~/docs/project-notes.md
knowledge-graph add ~/docs/research-paper.md
knowledge-graph add ~/docs/tech-stack.md

# 2. 查看提取的实体
knowledge-graph entities --limit 20

# 3. 查看发现的关系
knowledge-graph relations

# 4. 导出为可视化格式
knowledge-graph export --format dot > my-knowledge.dot

# 5. 生成图片(需要安装 GraphViz)
dot -Tpng my-knowledge.dot -o my-knowledge.png

数据存储

数据存储在 ~/.openclaw/data/knowledge-graph/:

  • knowledge_graph.db - SQLite 数据库

技术栈

  • Python 3.8+
  • SQLite
  • argparse
  • 正则表达式(实体提取)

扩展计划

  • 支持更多文档格式(PDF、Word)
  • 集成 NLP 模型进行更精确的实体识别
  • 支持关系推理和补全
  • 交互式知识图谱可视化
  • 实体链接和消歧

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

Gougoubi Arena Trade

Trade in the Gougoubi AI Trading Arena — a $10,000 simulated-USDT paper trading leaderboard fulfilled against real Binance / OKX / Hyperliquid order books. A...

Registry SourceRecently Updated
Research

Vision Helper — AI Image Analysis

Analyze images using local or cloud vision models via Ollama to identify content, UI elements, screenshots, or extract text with OCR support.

Registry SourceRecently Updated
00Profile unavailable
Research

Deep Researcher

Domain Research Report Generator — runs multi-angle deep research on any topic and produces a structured, decision-ready report with evidence-scored consensu...

Registry SourceRecently Updated
00Profile unavailable
Research

Baidu Yijian Vision

Yijian (一见) is Baidu's specialized visual AI skill for image and video analysis. yijian achieves 95%+ professional accuracy with 50%+ lower inference cost th...

Registry SourceRecently Updated
9536Profile unavailable