Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.
docs: 更新安装说明,统一使用 hyperextract 包名并优化 CLI 安装指令
yifanfeng97c67d9ba3d035
diff --git a/README.md b/README.mdindex 04fc8ea..07ef36c 100644--- a/README.md+++ b/README.md@@ -15,6 +15,7 @@[📖 English Version](./README.md) · [中文版](./README_ZH.md)+[](https://pypi.org/project/hyperextract/)[](https://python.org)[](LICENSE)[]()@@ -26,13 +27,24 @@<br/>-<img src="docs/assets/hero.png" alt="Hero & Workflow" width="100%">+<img src="docs/assets/hero.png" alt="Hero & Workflow" width="800" style="max-width: 100%;"><br/></div>Hyper-Extract is an intelligent, LLM-powered knowledge extraction and evolution framework. It radically simplifies transforming highly unstructured texts into persistent, predictable, and strongly-typed **Knowledge Abstracts**. It effortlessly extracts information into a wide spectrum of formats—ranging from simple **Collections** (Lists/Sets) and **Pydantic Models**, to complex **Knowledge Graphs**, **Hypergraphs**, and even **Spatio-Temporal Graphs**.+## 📑 Table of Contents++- [Core Features](#-core-features)+- [Quick Start](#-quick-start)+ - [CLI](#2-the-command-line-way)+ - [Python API](#-the-python-api-way)+- [The 8 Auto-Types](#-deep-dive-the-8-auto-types)+- [Architecture](#-architecture-overview)+- [Comparison](#-comparison-with-other-libraries)+- [Documentation](#-related-documentation)+## ✨ Core Features- 🔷 **8 Auto-Types:** From basic `AutoModel`/`AutoList` to advanced `AutoGraph`, `AutoHypergraph`, and `AutoSpatioTemporalGraph`.@@ -46,8 +58,16 @@ Hyper-Extract is an intelligent, LLM-powered knowledge extraction and evolution### 1. Installation+**For CLI Users** (install `he` command globally):+```bash-uv pip install hyper-extract+uv tool install hyperextract+```++**For Python Developers** (use as library):++```bash+uv pip install hyperextract```### 2. The Command Line Way@@ -77,7 +97,7 @@ he show ./output/```<details>-<summary><b>🐍 The Python API Way</b></summary>+<summary><b>🐍 The Python API Way</b> (click to expand)</summary><br>### Installation@@ -117,7 +137,7 @@ from hyperextract import Templateka = Template.create("general/biography_graph")# Parse a document-with open("examples/en/tesla.md", "r") as f:+with open("examples/en/tesla.md", "r", encoding="utf-8") as f:text = f.read()result = ka.parse(text)@@ -125,7 +145,7 @@ result = ka.parse(text)ka.show(result)# Incrementally supplement knowledge-with open("examples/en/tesla_question.md", "r") as f:+with open("examples/en/tesla_question.md", "r", encoding="utf-8") as f:new_text = f.read()ka.feed(result, new_text)@@ -137,17 +157,26 @@ ka.show(result)</details>+<br>++**Installation Comparison:**++| Use Case | Command | Purpose |+|----------|---------|---------|+| CLI Tool | `uv tool install hyperextract` | Install `he` command globally |+| Python Library | `uv pip install hyperextract` | Use in Python code |+## 🧩 Deep Dive: The 8 Auto-TypesOur framework embraces complexity without making you write boilerplate code.-+<img src="docs/assets/autotypes.png" alt="Knowledge Structures Matrix" width="700" style="max-width: 100%;">### Example: AutoGraph VisualizationHere is the knowledge graph visualization after `AutoGraph` extraction:-+<img src="docs/assets/en_show.png" alt="AutoGraph Visualization" width="600" style="max-width: 100%; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">## 🛠️ Architecture Overview@@ -161,7 +190,7 @@ Hyper-Extract follows a **three-layer architecture**:Use via **CLI** (`he parse`, `he search`, `he show`...) or **Python API** (`Template.create()`).-+<img src="docs/assets/arch.png" alt="Architecture" width="750" style="max-width: 100%;">### 📚 Related Documentationdiff --git a/README_ZH.md b/README_ZH.mdindex aa0945b..80aec4c 100644--- a/README_ZH.md+++ b/README_ZH.md@@ -15,6 +15,7 @@[📖 English Version](./README.md) · [中文版](./README_ZH.md)+[](https://pypi.org/project/hyperextract/)[](https://python.org)[](LICENSE)[]()@@ -26,13 +27,24 @@<br/>-<img src="docs/assets/hero.png" alt="Hero & Workflow" width="100%">+<img src="docs/assets/hero.png" alt="Hero & Workflow" width="800" style="max-width: 100%;"><br/></div>Hyper-Extract 是一个智能的、由大语言模型(LLM)驱动的知识提取与演进框架。它极大地简化了将杂乱不堪的文本转化为持久化、强类型的**知识摘要(Knowledge Abstracts)**的过程。无论从基础的**集合(Collection/List)和**结构化模型(Model),还是到高阶复杂的**知识图谱(Knowledge Graph)**、**超图(Hypergraph)**,甚至是**时空图谱(Spatio-Temporal Graph)**,它都能轻松拿捏。+## 📑 目录++- [核心亮点](#-核心亮点)+- [快速上手](#-快速上手)+ - [CLI命令行](#2-cli-命令行玩法)+ - [Python API](#-python-api-深度集成)+- [8大知识结构](#-8种核心知识结构)+- [系统架构](#-系统架构)+- [对比其他库](#-与其他相关库的对比)+- [文档](#-相关文档)+## ✨ 核心亮点- 🔷 **8大基础知识结构数据结构(Auto-Types):** 从基础的 `AutoModel`/`AutoList` 到高阶的 `AutoGraph`, `AutoHypergraph`, 以及 `AutoSpatioTemporalGraph`(时空图)。@@ -44,10 +56,18 @@ Hyper-Extract 是一个智能的、由大语言模型(LLM)驱动的知识提## ⚡ 快速上手-### 1. 极速安装+### 1. 安装++**CLI 用户**(全局安装 `he` 命令):```bash-uv pip install hyper-extract+uv tool install hyperextract+```++**Python 开发者**(作为库使用):++```bash+uv pip install hyperextract```### 2. CLI 命令行玩法@@ -77,7 +97,7 @@ he show ./output/```<details>-<summary><b>🐍 Python API 深度集成</b></summary>+<summary><b>🐍 Python API 深度集成</b>(点击展开)</summary><br>### 安装@@ -137,17 +157,26 @@ ka.show(result)</details>+<br>++**安装方式对比:**++| 使用场景 | 命令 | 说明 |+|----------|------|------|+| CLI 工具 | `uv tool install hyperextract` | 全局安装 `he` 命令 |+| Python 库 | `uv pip install hyperextract` | 在 Python 代码中使用 |+## 🧩 8 种核心知识结构拒绝样板代码,纯干货聚焦数据本身。-+<img src="docs/assets/autotypes.png" alt="知识结构矩阵" width="700" style="max-width: 100%;">### 示例:AutoGraph 知识图谱可视化以下是 `AutoGraph` 类型提取后的知识图谱可视化效果:-+<img src="docs/assets/zh_show.png" alt="AutoGraph 可视化" width="600" style="max-width: 100%; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);">## 🛠️ 系统架构@@ -161,7 +190,7 @@ Hyper-Extract 采用**三层架构**:可通过 **CLI**(`he parse`、`he search`、`he show`...)或 **Python API**(`Template.create()`)使用。-+<img src="docs/assets/arch.png" alt="系统架构" width="750" style="max-width: 100%;">### 📝 相关文档@@ -244,12 +273,13 @@ display:| 多语言支持 | ✅ | ❌ | ❌ | ❌ | ✅ |-## 📚 项目参考文档+## 📚 相关文档-- [CLI 命令行指南](./hyperextract/cli/README.md)-- [模板画廊](./hyperextract/templates/)-- [示例代码示例](./examples/)-- [完整架构文档](./docs/)+- [完整文档](https://hyper-extract.github.io/zh/) - 完整文档站点+- [English Documentation](https://hyper-extract.github.io/en/) - English Documentation+- [CLI 指南](https://hyper-extract.github.io/zh/cli/) - 命令行界面+- [模板画廊](https://hyper-extract.github.io/zh/templates/) - 可用模板+- [示例代码](./examples/) - 可运行示例## 🤝 参与贡献与协议diff --git a/docs/en/cli/index.md b/docs/en/cli/index.mdindex ffd6e3d..e360ce6 100644--- a/docs/en/cli/index.md+++ b/docs/en/cli/index.md@@ -9,13 +9,13 @@ The Hyper-Extract CLI (`he`) provides a powerful, easy-to-use interface for know=== "uv (recommended)"```bash- uv pip install hyper-extract+ uv tool install hyperextract```-=== "pip"+=== "pipx"```bash- pip install hyper-extract+ pipx install hyperextract```Verify installation:diff --git a/docs/en/getting-started/installation.md b/docs/en/getting-started/installation.mdindex e653db0..772c9be 100644--- a/docs/en/getting-started/installation.md+++ b/docs/en/getting-started/installation.md@@ -4,39 +4,62 @@ Hyper-Extract requires **Python 3.11+**.----## Install from PyPI+## Install as CLI Tool++If you want to use the `he` command from anywhere:=== "uv (recommended)"```bash- uv pip install hyper-extract+ uv tool install hyperextract```-=== "pip"+=== "pipx"++ ```bash+ pipx install hyperextract+ ```++---++## Install as Python Library++If you want to use Hyper-Extract in your Python code:++=== "uv (recommended)"```bash- pip install hyper-extract+ uv pip install hyperextract```-=== "conda"+=== "pip"```bash- pip install hyper-extract+ pip install hyperextract```---## Verify Installation-```bash-he --version-```+=== "CLI"-You should see something like:+ ```bash+ he --version+ ```-```-Hyper-Extract CLI version 0.1.0-```+ You should see something like:++ ```+ Hyper-Extract CLI version 0.1.0+ ```++=== "Python"++ ```python+ import hyperextract+ print(hyperextract.__version__)+ ```---diff --git a/docs/en/getting-started/python-quickstart.md b/docs/en/getting-started/python-quickstart.mdindex 48472aa..6253868 100644--- a/docs/en/getting-started/python-quickstart.md+++ b/docs/en/getting-started/python-quickstart.md@@ -22,8 +22,8 @@ cd my_extraction_projectpython -m venv venvsource venv/bin/activate # On Windows: venv\Scripts\activate-# Install hyper-extract-pip install hyper-extract+# Install hyperextract+pip install hyperextract```---@@ -257,7 +257,7 @@ if __name__ == "__main__":## Troubleshooting**"No module named 'hyperextract'"**-→ Run `pip install hyper-extract`+→ Run `pip install hyperextract`**"API key not found"**→ Check your `.env` file or set `OPENAI_API_KEY` environment variablediff --git a/docs/en/index.md b/docs/en/index.mdindex c66b38d..dbd3197 100644--- a/docs/en/index.md+++ b/docs/en/index.md@@ -17,8 +17,8 @@=== "CLI (Terminal)"```bash- # 1. Install- pip install hyper-extract+ # 1. Install CLI tool+ uv tool install hyperextract# 2. Configure API Keyhe config init -k YOUR_OPENAI_API_KEYdiff --git a/docs/en/python/index.md b/docs/en/python/index.mdindex a51df04..449a355 100644--- a/docs/en/python/index.md+++ b/docs/en/python/index.md@@ -7,13 +7,13 @@ Build knowledge extraction pipelines with the Hyper-Extract Python API.## Installation```bash-pip install hyper-extract+pip install hyperextract```For development:```bash-pip install hyper-extract[dev]+pip install hyperextract[dev]```---diff --git a/docs/en/python/quickstart.md b/docs/en/python/quickstart.mdindex 740151e..200c680 100644--- a/docs/en/python/quickstart.md+++ b/docs/en/python/quickstart.md@@ -12,7 +12,7 @@ Get started with the Hyper-Extract Python SDK in 5 minutes.## Installation```bash-pip install hyper-extract+pip install hyperextract```## Basic Usagediff --git a/docs/en/resources/faq.md b/docs/en/resources/faq.mdindex 7bccbe1..40ea6e7 100644--- a/docs/en/resources/faq.md+++ b/docs/en/resources/faq.md@@ -34,21 +34,21 @@ The software is open-source (Apache-2.0). You need to provide your own OpenAI AP### How do I install it?```bash-pip install hyper-extract+pip install hyperextract```### Installation fails with "No module named 'hyperextract'"Try:```bash-pip install --upgrade hyper-extract+pip install --upgrade hyperextract```Or use a virtual environment:```bashpython -m venv venvsource venv/bin/activate # Windows: venv\Scripts\activate-pip install hyper-extract+pip install hyperextract```---diff --git a/docs/en/resources/troubleshooting.md b/docs/en/resources/troubleshooting.mdindex 8e90938..6e6c37a 100644--- a/docs/en/resources/troubleshooting.md+++ b/docs/en/resources/troubleshooting.md@@ -18,7 +18,7 @@ Solutions to common issues.```bashpython -m venv venvsource venv/bin/activate- pip install hyper-extract+ pip install hyperextract```### ImportError: No module named 'hyperextract'@@ -30,7 +30,7 @@ Solutions to common issues.1. Check Python version: `python --version` (need 3.11+)2. Verify installation: `pip list | grep hyper`3. Check virtual environment is activated-4. Reinstall: `pip install --force-reinstall hyper-extract`+4. Reinstall: `pip install --force-reinstall hyperextract`---@@ -296,7 +296,7 @@ he talk ./output/ -q "your question"## Still Having Issues?1. **Check logs** — Look for detailed error messages-2. **Update to latest** — `pip install --upgrade hyper-extract`+2. **Update to latest** — `pip install --upgrade hyperextract`3. **Check GitHub Issues** — [github.com/yifanfeng97/hyper-extract/issues](https://github.com/yifanfeng97/hyper-extract/issues)4. **Create new issue** — Include error messages and reproduction stepsdiff --git a/docs/en/tutorials/research-assistant/index.md b/docs/en/tutorials/research-assistant/index.mdindex 7146da6..c24939c 100644--- a/docs/en/tutorials/research-assistant/index.md+++ b/docs/en/tutorials/research-assistant/index.md@@ -26,7 +26,7 @@ By the end of this tutorial, you'll have a research assistant that can:## Prerequisites-- Hyper-Extract installed: `pip install hyper-extract`+- Hyper-Extract installed: `pip install hyperextract`- OpenAI API key configured- A research paper (PDF or text format)diff --git a/docs/zh/cli/index.md b/docs/zh/cli/index.mdindex e9d377d..320b00b 100644--- a/docs/zh/cli/index.md+++ b/docs/zh/cli/index.md@@ -9,13 +9,13 @@ Hyper-Extract CLI (`he`) 提供了强大、易用的界面,可直接从终端=== "uv (推荐)"```bash- uv pip install hyper-extract+ uv tool install hyperextract```-=== "pip"+=== "pipx"```bash- pip install hyper-extract+ pipx install hyperextract```验证安装:diff --git a/docs/zh/getting-started/installation.md b/docs/zh/getting-started/installation.mdindex 508a707..217b665 100644--- a/docs/zh/getting-started/installation.md+++ b/docs/zh/getting-started/installation.md@@ -4,39 +4,62 @@ Hyper-Extract 需要 **Python 3.11+**。----## 从 PyPI 安装+## 安装为 CLI 工具++如果您想在任何地方使用 `he` 命令:=== "uv (推荐)"```bash- uv pip install hyper-extract+ uv tool install hyperextract```-=== "pip"+=== "pipx"++ ```bash+ pipx install hyperextract+ ```++---++## 安装为 Python 库++如果您想在 Python 代码中使用 Hyper-Extract:++=== "uv (推荐)"```bash- pip install hyper-extract+ uv pip install hyperextract```-=== "conda"+=== "pip"```bash- pip install hyper-extract+ pip install hyperextract```---## 验证安装-```bash-he --version-```+=== "CLI"-您应该看到类似输出:+ ```bash+ he --version+ ```-```-Hyper-Extract CLI version 0.1.0-```+ 您应该看到类似输出:++ ```+ Hyper-Extract CLI version 0.1.0+ ```++=== "Python"++ ```python+ import hyperextract+ print(hyperextract.__version__)+ ```---diff --git a/docs/zh/getting-started/python-quickstart.md b/docs/zh/getting-started/python-quickstart.mdindex fcc5e3d..00ff899 100644--- a/docs/zh/getting-started/python-quickstart.md+++ b/docs/zh/getting-started/python-quickstart.md@@ -22,8 +22,8 @@ cd my_extraction_projectpython -m venv venvsource venv/bin/activate # Windows: venv\Scripts\activate-# 安装 hyper-extract-pip install hyper-extract+# 安装 hyperextract+pip install hyperextract```---@@ -250,7 +250,7 @@ if __name__ == "__main__":## 故障排除**"No module named 'hyperextract'"**-→ 运行 `pip install hyper-extract`+→ 运行 `pip install hyperextract`**"API key not found"**→ 检查 `.env` 文件或设置 `OPENAI_API_KEY` 环境变量diff --git a/docs/zh/index.md b/docs/zh/index.mdindex d8c991b..e7f1149 100644--- a/docs/zh/index.md+++ b/docs/zh/index.md@@ -17,8 +17,8 @@=== "CLI (终端)"```bash- # 1. 安装- pip install hyper-extract+ # 1. 安装 CLI 工具+ uv tool install hyperextract# 2. 配置 API 密钥he config init -k YOUR_OPENAI_API_KEYdiff --git a/docs/zh/python/index.md b/docs/zh/python/index.mdindex d120f8c..1aeab8c 100644--- a/docs/zh/python/index.md+++ b/docs/zh/python/index.md@@ -7,13 +7,13 @@## 安装```bash-pip install hyper-extract+pip install hyperextract```开发安装:```bash-pip install hyper-extract[dev]+pip install hyperextract[dev]```---diff --git a/docs/zh/python/quickstart.md b/docs/zh/python/quickstart.mdindex 11ed90e..559c72d 100644--- a/docs/zh/python/quickstart.md+++ b/docs/zh/python/quickstart.md@@ -12,7 +12,7 @@## 安装```bash-pip install hyper-extract+pip install hyperextract```## 基本用法diff --git a/docs/zh/resources/faq.md b/docs/zh/resources/faq.mdindex 397590d..9b69ae7 100644--- a/docs/zh/resources/faq.md+++ b/docs/zh/resources/faq.md@@ -34,21 +34,21 @@ Hyper-Extract 是一个基于大语言模型的知识提取框架,可以将非### 如何安装?```bash-pip install hyper-extract+pip install hyperextract```### 安装失败,提示 "No module named 'hyperextract'"尝试:```bash-pip install --upgrade hyper-extract+pip install --upgrade hyperextract```或使用虚拟环境:```bashpython -m venv venvsource venv/bin/activate # Windows: venv\Scripts\activate-pip install hyper-extract+pip install hyperextract```---diff --git a/docs/zh/resources/troubleshooting.md b/docs/zh/resources/troubleshooting.mdindex ff443f0..6040e8a 100644--- a/docs/zh/resources/troubleshooting.md+++ b/docs/zh/resources/troubleshooting.md@@ -17,7 +17,7 @@```bashpython -m venv venvsource venv/bin/activate- pip install hyper-extract+ pip install hyperextract```### ImportError: No module named 'hyperextract'@@ -28,7 +28,7 @@1. 检查 Python 版本:`python --version`(需要 3.11+)2. 验证安装:`pip list | grep hyper`3. 检查虚拟环境是否已激活-4. 重新安装:`pip install --force-reinstall hyper-extract`+4. 重新安装:`pip install --force-reinstall hyperextract`---@@ -290,7 +290,7 @@ he talk ./output/ -q "你的问题"## 仍有问题?1. **检查日志** — 查看详细的错误信息-2. **更新到最新版本** — `pip install --upgrade hyper-extract`+2. **更新到最新版本** — `pip install --upgrade hyperextract`3. **查看 GitHub Issues** — [github.com/yifanfeng97/hyper-extract/issues](https://github.com/yifanfeng97/hyper-extract/issues)4. **创建新 issue** — 包含错误消息和复现步骤diff --git a/docs/zh/tutorials/research-assistant/index.md b/docs/zh/tutorials/research-assistant/index.mdindex 857bda9..7ac9f15 100644--- a/docs/zh/tutorials/research-assistant/index.md+++ b/docs/zh/tutorials/research-assistant/index.md@@ -26,7 +26,7 @@## 前提条件-- Hyper-Extract 已安装:`pip install hyper-extract`+- Hyper-Extract 已安装:`pip install hyperextract`- OpenAI API 密钥已配置- 一篇研究论文(PDF 或文本格式)diff --git a/examples/README.md b/examples/README.mdindex 1e8492f..c2916cd 100644--- a/examples/README.md+++ b/examples/README.md@@ -123,8 +123,8 @@ Nikola Tesla biography (1856-1943):## Requirements```bash-# Install hyper-extract (dependencies are automatically installed)-uv pip install hyper-extract+# Install hyperextract (dependencies are automatically installed)+uv pip install hyperextract# Configure API key# Option 1: Use .env file (recommended)diff --git a/examples/README_ZH.md b/examples/README_ZH.mdindex dcd5d53..8e8e3fa 100644--- a/examples/README_ZH.md+++ b/examples/README_ZH.md@@ -124,8 +124,8 @@ examples/## 环境要求```bash-# 安装 hyper-extract(依赖项会自动安装)-uv pip install hyper-extract+# 安装 hyperextract(依赖项会自动安装)+uv pip install hyperextract# 配置 API 密钥# 选项 1:使用 .env 文件(推荐)diff --git a/hyperextract/cli/README.md b/hyperextract/cli/README.mdindex cb4b578..fac1ebc 100644--- a/hyperextract/cli/README.md+++ b/hyperextract/cli/README.md@@ -10,7 +10,7 @@ A powerful command-line tool for extracting structured knowledge from unstructur```bash# Install-pip install hyper-extract+uv tool install hyperextract# First-time setuphe config initdiff --git a/hyperextract/cli/README_ZH.md b/hyperextract/cli/README_ZH.mdindex f8273fc..b55bd0e 100644--- a/hyperextract/cli/README_ZH.md+++ b/hyperextract/cli/README_ZH.md@@ -10,7 +10,7 @@```bash# 安装-pip install hyper-extract+uv tool install hyperextract# 首次设置he config initdiff --git a/pyproject.toml b/pyproject.tomlindex 225e5a3..d48bede 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -73,3 +73,20 @@ he = "hyperextract.cli:app"[build-system]requires = ["hatchling"]build-backend = "hatchling.build"++[tool.hatch.build]+exclude = [+ "docs/",+ "tests/",+ ".github/",+ "*.md",+ "mkdocs.yml",+ "docs_hooks.py",+ ".env",+ ".env.example",+ ".python-version",+ "uv.lock",+]++[tool.hatch.build.targets.wheel]+packages = ["hyperextract"]