Skip to content

Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.

docs: 添加多语言文档和资源文件

yifanfeng978fe3a844d638
diff --git a/.gitignore b/.gitignore
index 7818c1c..3e68017 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ temp/
logs/
.trae/
.github/
+.claude/
# Byte-compiled / optimized / DLL files
__pycache__/
diff --git a/README.md b/README.md
index 2d8462b..d059b55 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,16 @@
-# 🔍 Hyper-Extract
+# Hyper-Extract
+
+[📖 English Version](./README.md) · [中文版](./README_ZH.md)
> **"Stop reading. Start understanding."**
> *"告别文档焦虑,让信息一目了然"*
-Transform documents into **knowledge abstracts** — with just one command.
+**Transform documents into knowledge abstracts — with just one command.**
-<p align="center">
- <img alt="Python Version" src="https://img.shields.io/badge/python-3.9%2B-blue">
- <img alt="License" src="https://img.shields.io/badge/license-Apache%202.0-blue">
- <img alt="Status" src="https://img.shields.io/badge/status-active-success">
-</p>
-
-[📖 English Version](./README.md) · [中文版](./README_ZH.md)
+[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)](https://python.org)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
+[![Status](https://img.shields.io/badge/status-active-success)]()
## 🚀 What is Hyper-Extract?
@@ -50,20 +48,6 @@ he search ./output/ "What are the key events?"
he feed ./output/ new_document.md
```
-### 3. The Python API Way
-
-```python
-from hyperextract import Template
-
-# Load a preset YAML template
-ka = Template.create("finance/event_timeline")
-
-# Extract and auto-parse the document
-result = ka.parse(annual_report_text)
-```
-
-> 🔗 For detailed CLI usage, see [CLI Guide](./hyperextract/cli/README.md)
-
<details>
<summary><b>🛠️ How to define a Knowledge Template (YAML)?</b></summary>
<br>
@@ -90,17 +74,31 @@ schema:
```
</details>
+### 3. The Python API Way
+
+```python
+from hyperextract import Template
+
+# Load a preset YAML template
+ka = Template.create("finance/event_timeline")
+
+# Extract and auto-parse the document
+result = ka.parse(annual_report_text)
+```
+
+> 🔗 For complete examples, see [examples/en](./examples/en/)
+
## 🧩 Deep Dive: The 8 Auto-Types
Our framework embraces complexity without making you write boilerplate code.
-![Knowledge Structures Matrix](docs/assets/8-types-v3.jpg)
+![Knowledge Structures Matrix](docs/assets/8-types.jpg)
## 🛠️ Architecture Overview
The system is built on a robust triad: **Auto-Types** (Multi-typed structures), **Methods** (The Execution strategy), and **Templates** (Declarative schema).
-![Architecture](docs/assets/architecture-v5.jpg)
+![Architecture](docs/assets/architecture-v10.jpg)
* **Design Guide**: [Template Design Guide](./hyperextract/templates/DESIGN_GUIDE.md)
* **Preset Templates**: [presets directory](./hyperextract/templates/presets/)
@@ -119,10 +117,11 @@ The system is built on a robust triad: **Auto-Types** (Multi-typed structures),
## 📚 Related Documentation
-* [CLI Guide](./hyperextract/cli/README.md)
-* [Template Gallery](./hyperextract/templates/)
-* [Example Code](./examples/)
-* [Full Documentation](./docs/)
+* [Full Documentation](https://hyper-extract.github.io/en/) - Complete documentation site
+* [中文文档](https://hyper-extract.github.io/zh/) - 中文文档
+* [CLI Guide](https://hyper-extract.github.io/en/guides/cli/) - Command-line interface
+* [Template Gallery](https://hyper-extract.github.io/en/reference/template-gallery/) - Available templates
+* [Example Code](./examples/) - Working examples
## 🤝 Contributing & License
diff --git a/README_ZH.md b/README_ZH.md
index b6949ea..cca386a 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -1,21 +1,18 @@
-# 🔍 Hyper-Extract
+# Hyper-Extract
+
+[📖 English Version](./README.md) · [中文版](./README_ZH.md)
> **"Stop reading. Start understanding."**
> *"告别文档焦虑,让信息一目了然"*
-将文档转化为**知识摘要** —— 一行命令即可。
-
-<p align="center">
- <img alt="Python版本" src="https://img.shields.io/badge/python-3.9%2B-blue">
- <img alt="开源协议" src="https://img.shields.io/badge/license-Apache%202.0-blue">
- <img alt="状态" src="https://img.shields.io/badge/status-active-success">
-</p>
-
-[📖 English Version](./README.md) · [中文版](./README_ZH.md)
+**将文档转化为知识摘要 —— 一行命令即可。**
-## 🚀 什么是 Hyper-Extract?
+[![Python版本](https://img.shields.io/badge/python-3.9%2B-blue)](https://python.org)
+[![开源协议](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
+[![状态](https://img.shields.io/badge/status-active-success)]()
+## 🚀 什么是 Hyper-Extract
Hyper-Extract 是一个智能的、由大语言模型(LLM)驱动的知识提取与演进框架。它极大地简化了将杂乱不堪的文本转化为持久化、强类型的知识摘要的过程。无论从基础的**集合(Collection/List)**和**结构化模型(Model)**,还是到高阶复杂的**知识图谱(Knowledge Graph)**、**超图(Hypergraph)**,甚至是**时空图谱(Spatio-Temporal Graph)**,它都能轻松拿捏。
![Hero & Workflow](docs/assets/hero-v2.jpg)
@@ -50,20 +47,6 @@ he search ./output/ "有哪些关键事件?"
he feed ./output/ new_document.md
```
-### 3. Python API 深度集成
-
-```python
-from hyperextract import Template
-
-# 一行加载内置的 YAML 模板策略
-ka = Template.create("finance/event_timeline")
-
-# 解析提取
-result = ka.parse(annual_report_text)
-```
-
-> 🔗 更多高阶命令,请参阅 [CLI 指南](./hyperextract/cli/README.md)
-
<details>
<summary><b>🛠️ 如何定义知识模板(YAML)?</b></summary>
<br>
@@ -90,17 +73,31 @@ schema:
```
</details>
+### 3. Python API 深度集成
+
+```python
+from hyperextract import Template
+
+# 一行加载内置的 YAML 模板策略
+ka = Template.create("finance/event_timeline")
+
+# 解析提取
+result = ka.parse(annual_report_text)
+```
+
+> 🔗 完整示例代码,请参阅 [examples/zh](./examples/zh/)
+
## 🧩 深入探究:8 种核心抽象类型
拒绝样板代码,纯干货聚焦数据本身。
-![Knowledge Structures Matrix](docs/assets/8-types-v3.jpg)
+![Knowledge Structures Matrix](docs/assets/8-types.jpg)
## 🛠️ 系统架构揭秘
系统底座基于坚实的铁三角架构:**Auto-Types** (提取结构)、**Methods** (执行策略)、以及 **Templates** (声明式配置)。
-![Architecture](docs/assets/architecture-v5.jpg)
+![Architecture](docs/assets/architecture-v10.jpg)
* **设计指南**: [模板设计指南](./hyperextract/templates/DESIGN_GUIDE.md)
* **内置模板**: [预设模板目录](./hyperextract/templates/presets/)
diff --git a/docs/assets/8-types-v3.jpg b/docs/assets/8-types-v3.jpg
deleted file mode 100644
index b556ecd..0000000
Binary files a/docs/assets/8-types-v3.jpg and /dev/null differ
diff --git a/docs/assets/8-types-v5.jpg b/docs/assets/8-types-v5.jpg
new file mode 100644
index 0000000..41ceac3
Binary files /dev/null and b/docs/assets/8-types-v5.jpg differ
diff --git a/docs/assets/architecture-v10.jpg b/docs/assets/architecture-v10.jpg
new file mode 100644
index 0000000..c82c60a
Binary files /dev/null and b/docs/assets/architecture-v10.jpg differ
diff --git a/docs/assets/architecture-v4.jpeg b/docs/assets/architecture-v4.jpeg
deleted file mode 100644
index 0f4f650..0000000
Binary files a/docs/assets/architecture-v4.jpeg and /dev/null differ
diff --git a/docs/assets/architecture-v4.png b/docs/assets/architecture-v4.png
deleted file mode 100644
index d0a4f18..0000000
Binary files a/docs/assets/architecture-v4.png and /dev/null differ
diff --git a/docs/assets/architecture-v5.jpg b/docs/assets/architecture-v5.jpg
deleted file mode 100644
index 2d36c87..0000000
Binary files a/docs/assets/architecture-v5.jpg and /dev/null differ
diff --git a/docs/assets/architecture-v9.jpg b/docs/assets/architecture-v9.jpg
new file mode 100644
index 0000000..48e273f
Binary files /dev/null and b/docs/assets/architecture-v9.jpg differ
diff --git a/docs/assets/cli-config-v2.jpg b/docs/assets/cli-config-v2.jpg
deleted file mode 100644
index 0cda566..0000000
Binary files a/docs/assets/cli-config-v2.jpg and /dev/null differ
diff --git a/docs/assets/domain.png b/docs/assets/domain.png
deleted file mode 100644
index 573cacc..0000000
Binary files a/docs/assets/domain.png and /dev/null differ
diff --git a/docs/assets/domains-v2.png b/docs/assets/domains-v2.png
deleted file mode 100644
index 99c7219..0000000
Binary files a/docs/assets/domains-v2.png and /dev/null differ
diff --git a/docs/assets/hero-v1.jpg b/docs/assets/hero-v1.jpg
new file mode 100644
index 0000000..ec1c423
Binary files /dev/null and b/docs/assets/hero-v1.jpg differ
diff --git a/docs/assets/hero-v2.jpg b/docs/assets/hero-v2.jpg
index ec1c423..fbb9246 100644
Binary files a/docs/assets/hero-v2.jpg and b/docs/assets/hero-v2.jpg differ
diff --git a/docs/assets/hero-v3.jpeg b/docs/assets/hero-v3.jpeg
deleted file mode 100644
index 7d31b4f..0000000
Binary files a/docs/assets/hero-v3.jpeg and /dev/null differ
diff --git a/docs/assets/hero-v3.jpg b/docs/assets/hero-v3.jpg
deleted file mode 100644
index bf4ca75..0000000
Binary files a/docs/assets/hero-v3.jpg and /dev/null differ
diff --git a/docs/assets/start.jpg b/docs/assets/start.jpg
deleted file mode 100644
index c494084..0000000
Binary files a/docs/assets/start.jpg and /dev/null differ
diff --git a/docs/assets/workflow-v3.jpeg b/docs/assets/workflow-v3.jpeg
deleted file mode 100644
index 967bbfc..0000000
Binary files a/docs/assets/workflow-v3.jpeg and /dev/null differ
diff --git a/docs/en/concepts/auto-types.md b/docs/en/concepts/auto-types.md
new file mode 100644
index 0000000..89dfc57
--- /dev/null
+++ b/docs/en/concepts/auto-types.md
@@ -0,0 +1,118 @@
+# Auto-Types
+
+Hyper-Extract provides 8 auto-types for representing knowledge. Each type is optimized for specific extraction scenarios.
+
+## Overview
+
+| Type | Module | Description |
+|------|--------|-------------|
+| AutoModel | `hyperextract.types.model` | Pydantic model extraction |
+| AutoList | `hyperextract.types.list` | List/collection extraction |
+| AutoSet | `hyperextract.types.set` | Unique set extraction |
+| AutoGraph | `hyperextract.types.graph` | Knowledge graph extraction |
+| AutoHypergraph | `hyperextract.types.hypergraph` | Hypergraph extraction |
+| AutoTemporalGraph | `hyperextract.types.temporal_graph` | Temporal knowledge graph |
+| AutoSpatialGraph | `hyperextract.types.spatial_graph` | Spatial knowledge graph |
+| AutoSpatioTemporalGraph | `hyperextract.types.spatio_temporal_graph` | Spatio-temporal graph |
+
+## Usage Examples
+
+### AutoModel
+
+Extract structured data into Pydantic models:
+
+```python
+from hyperextract import AutoModel
+from pydantic import BaseModel
+
+class Person(BaseModel):
+ name: str
+ age: int
+ occupation: str
+
+extractor = AutoModel(schema=Person)
+result = extractor.parse("John Smith is a 35-year-old software engineer.")
+```
+
+### AutoList
+
+Extract lists of items:
+
+```python
+from hyperextract import AutoList
+
+extractor = AutoList(item_type="string")
+result = extractor.parse("The ingredients are flour, sugar, eggs, and milk.")
+# result: ["flour", "sugar", "eggs", "milk"]
+```
+
+### AutoGraph
+
+Extract knowledge graphs:
+
+```python
+from hyperextract import AutoGraph
+
+extractor = AutoGraph(node_types=["Person", "Company"], edge_types=["WORKS_AT"])
+result = extractor.parse("Alice works at Google.")
+# result: Graph with nodes and edges
+```
+
+### AutoHypergraph
+
+Extract hypergraphs (edges connecting multiple nodes):
+
+```python
+from hyperextract import AutoHypergraph
+
+extractor = AutoHypergraph()
+result = extractor.parse("Alice, Bob, and Carol collaborated on Project X.")
+```
+
+### AutoTemporalGraph
+
+Extract graphs with temporal information:
+
+```python
+from hyperextract import AutoTemporalGraph
+
+extractor = AutoTemporalGraph()
+result = extractor.parse("On Monday, Alice joined Google. On Tuesday, she started working.")
+```
+
+## Choosing the Right Type
+
+### When to Use AutoModel
+- Need structured, validated output
+- Working with well-defined schemas
+- Want Pydantic validation
+
+### When to Use AutoList
+- Extracting collections of items
+- Order matters
+- Simple item extraction
+
+### When to Use AutoSet
+- Need unique items only
+- Don't care about order
+- Deduplication required
+
+### When to Use AutoGraph
+- Complex relationships between entities
+- Knowledge graphs
+- Network analysis
+
+### When to Use AutoHypergraph
+- Many-to-many relationships
+- Group entities together
+- Complex network structures
+
+### When to Use Temporal/Spatial Variants
+- Time-aware: Use `AutoTemporalGraph`
+- Location-aware: Use `AutoSpatialGraph`
+- Both: Use `AutoSpatioTemporalGraph`
+
+## Next Steps
+
+- Learn about [Extraction Methods](methods.md)
+- Explore [Templates](templates.md)
diff --git a/docs/en/concepts/index.md b/docs/en/concepts/index.md
new file mode 100644
index 0000000..f19b19c
--- /dev/null
+++ b/docs/en/concepts/index.md
@@ -0,0 +1,52 @@
+# Concepts
+
+This section explains the core concepts behind Hyper-Extract.
+
+## What's in This Section
+
+- [Auto-Types](auto-types.md) - The 8 data structures for knowledge representation
+- [Extraction Methods](methods.md) - The 10+ engines for knowledge extraction
+- [Templates](templates.md) - Declarative YAML schemas for extraction
+
+## Core Concepts
+
+### Auto-Types
+
+Hyper-Extract provides 8 auto-types, ranging from simple collections to complex graphs:
+
+| Type | Use Case |
+|------|----------|
+| AutoModel | Structured data extraction |
+| AutoList | List/collection extraction |
+| AutoSet | Unique item extraction |
+| AutoGraph | Knowledge graph extraction |
+| AutoHypergraph | Complex relationship extraction |
+| AutoTemporalGraph | Time-aware knowledge graphs |
+| AutoSpatialGraph | Location-aware knowledge graphs |
+| AutoSpatioTemporalGraph | Time and location aware graphs |
+
+### Extraction Methods
+
+Choose the right method for your extraction task:
+
+| Method | Best For |
+|--------|----------|
+| atom | Simple, direct extraction |
+| graph_rag | Graph-based retrieval |
+| light_rag | Lightweight retrieval |
+| hyper_rag | Hypergraph extraction |
+| cog_rag | Cognitive retrieval |
+
+### Templates
+
+Templates define WHAT to extract using declarative YAML. They provide:
+
+- Type-safe schemas
+- Validation rules
+- Custom extraction logic
+
+## Learn More
+
+- [Auto-Types](auto-types.md) - Deep dive into each type
+- [Methods](methods.md) - Compare extraction methods
+- [Templates](templates.md) - Create custom templates
diff --git a/docs/en/concepts/methods.md b/docs/en/concepts/methods.md
new file mode 100644
index 0000000..4aa64c3
--- /dev/null
+++ b/docs/en/concepts/methods.md
@@ -0,0 +1,123 @@
+# Extraction Methods
+
+Hyper-Extract provides multiple extraction methods, each optimized for different use cases.
+
+## Available Methods
+
+### Basic Methods
+
+| Method | Description | Use Case |
+|--------|-------------|----------|
+| atom | Direct extraction | Simple, straightforward extraction |
+| kg_gen | Knowledge graph generation | Structured knowledge extraction |
+
+### RAG-Based Methods
+
+| Method | Description | Use Case |
+|--------|-------------|----------|
+| graph_rag | Graph-based RAG | Complex relationship extraction |
+| light_rag | Lightweight RAG | Fast, efficient extraction |
+| hyper_rag | Hypergraph RAG | Multi-entity relationships |
+| hypergraph_rag | Advanced hypergraph | Complex network analysis |
+| cog_rag | Cognitive RAG | Reasoning-based extraction |
+
+### Specialized Methods
+
+| Method | Description | Use Case |
+|--------|-------------|----------|
+| itext2kg | Text to knowledge graph | Document conversion |
+| itext2kg_star | Enhanced text-to-kg | Advanced document processing |
+
+## Method Comparison
+
+### Speed
+
+```
+fast: atom > light_rag > kg_gen > graph_rag
+slow: hyper_rag > cog_rag > hypergraph_rag
+```
+
+### Accuracy
+
+```
+high: cog_rag > graph_rag > hypergraph_rag > hyper_rag
+medium: kg_gen > itext2kg > light_rag > atom
+```
+
+### Use Case Matrix
+
+| Task | Recommended Method |
+|------|-------------------|
+| Simple extraction | atom |
+| Fast prototyping | light_rag |
+| Knowledge graphs | graph_rag |
+| Complex relationships | hyper_rag |
+| Reasoning tasks | cog_rag |
+| Document conversion | itext2kg |
+
+## Usage Examples
+
+### Using atom Method
+
+```python
+from hyperextract.methods import atom
+
+result = atom.extract(text, schema=MySchema)
+```
+
+### Using graph_rag Method
+
+```python
+from hyperextract.methods import graph_rag
+
+result = graph_rag.extract(
+ text,
+ node_types=["Person", "Organization"],
+ edge_types=["WORKS_AT", "KNOWS"]
+)
+```
+
+### Using cog_rag Method
+
+```python
+from hyperextract.methods import cog_rag
+
+result = cog_rag.extract(
+ text,
+ task="Extract causal relationships"
+)
+```
+
+## Method Selection Guide
+
+### Quick Decision Tree
+
+```
+Is your task simple?
+├── Yes → Use atom
+└── No → Does it require reasoning?
+ ├── Yes → Use cog_rag
+ └── No → Do you need graphs?
+ ├── Yes → graph_rag or hyper_rag
+ └── No → Use light_rag
+```
+
+## Advanced Configuration
+
+Each method supports custom configuration:
+
+```python
+result = graph_rag.extract(
+ text,
+ max_nodes=100,
+ max_edges=200,
+ temperature=0.0,
+ confidence_threshold=0.8
+)
+```
+
+## Next Steps
+
+- Explore [Templates](templates.md)
+- See [CLI Reference](../reference/cli-reference.md)
+- Browse [Examples](../guides/index.md)
diff --git a/docs/en/concepts/templates.md b/docs/en/concepts/templates.md
new file mode 100644
index 0000000..795b80f
--- /dev/null
+++ b/docs/en/concepts/templates.md
@@ -0,0 +1,172 @@
+# Templates
+
+Templates define WHAT to extract using declarative YAML. They provide a powerful way to specify extraction schemas without writing code.
+
+## Template Structure
+
+A template consists of:
+
+1. **Metadata**: name, description, author
+2. **Type**: The extraction type (Graph, List, Model, etc.)
+3. **Schema**: Definition of nodes, edges, and fields
+
+## Basic Example
+
+```yaml
+name: Event Timeline
+description: Extract financial events and their temporal relations
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Event
+ properties:
+ - name: description
+ type: string
+ - name: date
+ type: string
+ edges:
+ - type: TIMELINE
+ source: Event
+ target: Event
+ properties:
+ - name: relation
+ type: string
+```
+
+## Template Types
+
+### Graph Templates
+
+```yaml
+type: Graph
+schema:
+ nodes:
+ - type: Person
+ - type: Organization
+ edges:
+ - type: WORKS_AT
+ source: Person
+ target: Organization
+```
+
+### List Templates
+
+```yaml
+type: List
+schema:
+ item:
+ - name: ingredient
+ type: string
+ - name: quantity
+ type: string
+```
+
+### Model Templates
+
+```yaml
+type: Model
+schema:
+ - name: product_name
+ type: string
+ required: true
+ - name: price
+ type: float
+ required: true
+```
+
+## Property Types
+
+| Type | Description | Example |
+|------|-------------|---------|
+| string | Text value | "Hello World" |
+| integer | Whole number | 42 |
+| float | Decimal number | 3.14 |
+| boolean | True/False | true |
+| date | Date value | 2024-01-15 |
+| array | List of values | ["a", "b", "c"] |
+
+## Advanced Features
+
+### Validation Rules
+
+```yaml
+- name: email
+ type: string
+ pattern: "^[a-zA-Z0-9._%+-]+@[a-z]+.[a-z]{2,}$"
+```
+
+### Enumerations
+
+```yaml
+- name: status
+ type: string
+ enum: [pending, active, completed]
+```
+
+### Conditional Fields
+
+```yaml
+- name: end_date
+ type: date
+ required_if: type == "event"
+```
+
+## Preset Templates
+
+Hyper-Extract includes 80+ preset templates across 6 domains:
+
+### Finance
+- `finance/earnings_summary`
+- `finance/risk_factors`
+- `finance/ownership_graph`
+
+### Legal
+- `legal/case_facts`
+- `legal/contract_terms`
+- `legal/compliance_requirements`
+
+### Medicine
+- `medicine/drug_interactions`
+- `medicine/treatment_plan`
+- `medicine/patient_history`
+
+### TCM (Traditional Chinese Medicine)
+- `tcm/herb_properties`
+- `tcm/formula_composition`
+- `tcm/syndrome_reasoning`
+
+### Industry
+- `industry/safety_controls`
+- `industry/equipment_topology`
+- `industry/operation_flow`
+
+### General
+- `general/biography`
+- `general/concepts`
+- `general/workflow`
+
+## Using Templates
+
+### CLI
+
+```bash
+he parse document.txt -t finance/earnings_summary
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# Load preset
+ka = Template.create("finance/earnings_summary")
+
+# Load custom template
+ka = Template.from_yaml("my_template.yaml")
+```
+
+## Next Steps
+
+- Browse the [Template Gallery](../reference/template-gallery.md)
+- Learn about [Domain Templates](../guides/domain-templates/index.md)
+- Create your own templates
diff --git a/docs/en/getting-started/configuration.md b/docs/en/getting-started/configuration.md
new file mode 100644
index 0000000..49cf194
--- /dev/null
+++ b/docs/en/getting-started/configuration.md
@@ -0,0 +1,76 @@
+# Configuration
+
+This guide covers advanced configuration options for Hyper-Extract.
+
+## Configuration File
+
+Hyper-Extract uses a YAML configuration file. Default location: `~/.hyper-extract/config.yaml`
+
+## Configuration Options
+
+### LLM Settings
+
+```yaml
+llm:
+ provider: openai # openai, anthropic, azure, etc.
+ model: gpt-4o
+ api_key: ${OPENAI_API_KEY} # Or use environment variable
+ temperature: 0.0
+ max_tokens: 4096
+```
+
+### Embedding Settings
+
+```yaml
+embedding:
+ provider: openai # openai, huggingface, etc.
+ model: text-embedding-3-small
+ api_key: ${OPENAI_API_KEY}
+```
+
+### Extraction Settings
+
+```yaml
+extraction:
+ default_type: AutoGraph
+ max_retries: 3
+ timeout: 60
+ batch_size: 10
+```
+
+### Storage Settings
+
+```yaml
+storage:
+ type: local # local, s3, etc.
+ path: ./output
+ format: json # json, yaml, parquet
+```
+
+## Environment Variables
+
+| Variable | Description |
+|----------|-------------|
+| `OPENAI_API_KEY` | OpenAI API key |
+| `ANTHROPIC_API_KEY` | Anthropic API key |
+| `HYPER_EXTRACT_CONFIG` | Path to config file |
+
+## CLI Configuration
+
+Initialize configuration via CLI:
+
+```bash
+# Initialize with OpenAI
+he config init -k your-api-key
+
+# Show current configuration
+he config show
+
+# Update specific option
+he config set llm.model gpt-4o-mini
+```
+
+## Next Steps
+
+- Explore [Concepts](../concepts/index.md) to understand extraction types
+- Check [CLI Reference](../reference/cli-reference.md) for all commands
diff --git a/docs/en/getting-started/index.md b/docs/en/getting-started/index.md
new file mode 100644
index 0000000..8d976ba
--- /dev/null
+++ b/docs/en/getting-started/index.md
@@ -0,0 +1,37 @@
+# Getting Started
+
+Welcome to Hyper-Extract! This section will help you get up and running quickly.
+
+## What's in This Section
+
+- [Installation](installation.md) - How to install Hyper-Extract
+- [Quick Start](quickstart.md) - Get started with your first extraction
+- [Configuration](configuration.md) - Configure API keys and settings
+
+## Prerequisites
+
+Before using Hyper-Extract, you should have:
+
+- Python 3.9 or higher installed
+- An OpenAI API key (or compatible LLM API)
+- Basic understanding of Python
+
+## Choose Your Path
+
+### For CLI Users
+
+If you prefer command-line tools, see our [CLI Guide](../guides/cli.md) for detailed command documentation.
+
+### For Python Developers
+
+If you're building applications with Python, check out our [Python API Guide](../guides/python-api.md).
+
+### For Template Designers
+
+If you want to create custom extraction templates, see our [Template Design Guide](../concepts/templates.md).
+
+## Next Steps
+
+1. [Install Hyper-Extract](installation.md)
+2. Try the [Quick Start](quickstart.md) tutorial
+3. Explore the [Concepts](../concepts/index.md) section
diff --git a/docs/en/getting-started/installation.md b/docs/en/getting-started/installation.md
new file mode 100644
index 0000000..969e61b
--- /dev/null
+++ b/docs/en/getting-started/installation.md
@@ -0,0 +1,69 @@
+# Installation
+
+This guide covers how to install Hyper-Extract and its dependencies.
+
+## Requirements
+
+- Python 3.9+
+- pip or uv package manager
+- OpenAI API key (or compatible LLM API)
+
+## Installation Methods
+
+### Using pip
+
+```bash
+pip install hyper-extract
+```
+
+### Using uv
+
+```bash
+uv pip install hyper-extract
+```
+
+## Install with Extras
+
+For specific use cases, you can install with extras:
+
+```bash
+# With all integrations
+pip install hyper-extract[all]
+
+# With OpenAI support
+pip install hyper-extract[openai]
+
+# With development tools
+pip install hyper-extract[dev]
+```
+
+## Verify Installation
+
+After installation, verify it works:
+
+```bash
+he --version
+```
+
+You should see the version number printed.
+
+## Setting Up API Keys
+
+Hyper-Extract requires an API key for LLM services. Set it up:
+
+### Using Environment Variable
+
+```bash
+export OPENAI_API_KEY=your-api-key-here
+```
+
+### Using CLI
+
+```bash
+he config init -k your-api-key-here
+```
+
+## Next Steps
+
+- Continue to [Quick Start](quickstart.md) to run your first extraction
+- Or configure advanced settings in [Configuration](configuration.md)
diff --git a/docs/en/getting-started/quickstart.md b/docs/en/getting-started/quickstart.md
new file mode 100644
index 0000000..e68f287
--- /dev/null
+++ b/docs/en/getting-started/quickstart.md
@@ -0,0 +1,80 @@
+# Quick Start
+
+This tutorial will walk you through extracting knowledge from a document in under 5 minutes.
+
+## Step 1: Prepare Your Document
+
+Let's start with a simple text document. Create a file called `document.txt`:
+
+```text
+Apple Inc. reported record quarterly revenue of $123.9 billion in Q1 2024.
+CEO Tim Cook announced the company's strongest-ever iPhone sales.
+The board declared a cash dividend of $0.24 per share.
+Services revenue reached an all-time high of $22.3 billion.
+```
+
+## Step 2: Create an Extraction Template
+
+Hyper-Extract uses YAML templates to define what to extract. Create `template.yaml`:
+
+```yaml
+name: Company News Summary
+description: Extract key financial events from news articles
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Company
+ properties:
+ - name: name
+ type: string
+ - name: ticker
+ type: string
+ - type: FinancialEvent
+ properties:
+ - name: description
+ type: string
+ - name: amount
+ type: number
+ - name: category
+ type: string
+ edges:
+ - type: ANNOUNCED
+ source: Company
+ target: FinancialEvent
+```
+
+## Step 3: Extract Knowledge (CLI)
+
+```bash
+he parse document.txt -o output/ -t template.yaml
+```
+
+## Step 4: Extract Knowledge (Python API)
+
+```python
+from hyperextract import Template
+
+# Create template from YAML
+ka = Template.from_yaml("template.yaml")
+
+# Parse document
+result = ka.parse("Apple Inc. reported record quarterly revenue...")
+
+# Access results
+print(result.nodes)
+print(result.edges)
+```
+
+## Step 5: View Results
+
+The extracted knowledge will be saved in your output directory. You can use the search command:
+
+```bash
+he search output/ "What financial events were mentioned?"
+```
+
+## Next Steps
+
+- Learn about the [8 Auto-Types](../concepts/auto-types.md)
+- Explore [Extraction Methods](../concepts/methods.md)
+- Browse [Preset Templates](../concepts/templates.md)
diff --git a/docs/en/guides/cli.md b/docs/en/guides/cli.md
new file mode 100644
index 0000000..7de71df
--- /dev/null
+++ b/docs/en/guides/cli.md
@@ -0,0 +1,163 @@
+# CLI Guide
+
+The Hyper-Extract CLI provides a powerful command-line interface for knowledge extraction.
+
+## Installation
+
+The CLI is included with the main package:
+
+```bash
+pip install hyper-extract
+```
+
+## Basic Usage
+
+### Initialize Configuration
+
+```bash
+he config init -k YOUR_API_KEY
+```
+
+### Parse a Document
+
+```bash
+he parse document.txt -o output/
+```
+
+### Search Extracted Knowledge
+
+```bash
+he search output/ "What are the key events?"
+```
+
+### Feed New Documents
+
+```bash
+he feed output/ new_document.txt
+```
+
+## Commands
+
+### config
+
+Manage configuration:
+
+```bash
+# Initialize
+he config init -k API_KEY
+
+# Show current config
+he config show
+
+# Update config
+he config set llm.model gpt-4o-mini
+
+# List available templates
+he config list-templates
+```
+
+### parse
+
+Extract knowledge from documents:
+
+```bash
+# Basic usage
+he parse input.txt -o output/
+
+# With template
+he parse input.txt -t finance/earnings_summary -o output/
+
+# With language detection
+he parse input.txt -l zh -o output/
+
+# Batch processing
+he parse ./documents/ -o output/ --batch
+```
+
+### search
+
+Query extracted knowledge:
+
+```bash
+# Basic search
+he search output/ "What happened?"
+
+# With filters
+he search output/ "financial events" --filter type=Event
+
+# With limit
+he search output/ "companies" --limit 10
+```
+
+### feed
+
+Add new documents to existing knowledge:
+
+```bash
+# Feed single document
+he feed output/ new_doc.txt
+
+# Feed multiple documents
+he feed output/ ./new_docs/
+```
+
+### list
+
+List available templates and presets:
+
+```bash
+# List all templates
+he list
+
+# List by category
+he list --category finance
+
+# List domain templates
+he list --domain general
+```
+
+## Options
+
+### Global Options
+
+| Option | Description |
+|--------|-------------|
+| `--help` | Show help message |
+| `--version` | Show version |
+| `--verbose` | Enable verbose output |
+| `--config PATH` | Use custom config file |
+
+### Parse Options
+
+| Option | Description |
+|--------|-------------|
+| `-o, --output PATH` | Output directory |
+| `-t, --template NAME` | Template to use |
+| `-l, --language CODE` | Document language (en, zh, etc.) |
+| `--batch` | Enable batch processing |
+
+## Examples
+
+### Financial Document Extraction
+
+```bash
+he parse annual_report.pdf -t finance/earnings_summary -o ./results/
+```
+
+### Legal Document Extraction
+
+```bash
+he parse contract.txt -t legal/case_facts -o ./legal_output/
+```
+
+### Multi-language Support
+
+```bash
+he parse chinese_doc.txt -l zh -o ./output/
+```
+
+## Next Steps
+
+- Explore [Python API](python-api.md)
+- Browse [Domain Templates](domain-templates/index.md)
+- Check [CLI Reference](../reference/cli-reference.md)
diff --git a/docs/en/guides/domain-templates/finance.md b/docs/en/guides/domain-templates/finance.md
new file mode 100644
index 0000000..4dbecdf
--- /dev/null
+++ b/docs/en/guides/domain-templates/finance.md
@@ -0,0 +1,94 @@
+# Finance Templates
+
+Hyper-Extract provides specialized templates for financial document extraction.
+
+## Available Templates
+
+### Earnings Summary
+
+Extract key financial metrics from earnings reports:
+
+```yaml
+name: earnings_summary
+type: TemporalGraph
+schema:
+ nodes:
+ - type: FinancialMetric
+ - type: Company
+ edges:
+ - type: REPORTED
+```
+
+### Risk Factors
+
+Extract risk factors from financial documents:
+
+```yaml
+name: risk_factors
+type: List
+schema:
+ item:
+ - name: category
+ type: string
+ - name: description
+ type: string
+```
+
+### Ownership Graph
+
+Extract ownership relationships:
+
+```yaml
+name: ownership_graph
+type: Graph
+schema:
+ nodes:
+ - type: Entity
+ - type: Company
+ edges:
+ - type: OWNS
+```
+
+## Usage Examples
+
+### CLI
+
+```bash
+# Extract earnings summary
+he parse earnings_report.pdf -t finance/earnings_summary -o output/
+
+# Extract risk factors
+he parse 10k_filing.txt -t finance/risk_factors -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# Load finance template
+ka = Template.create("finance/earnings_summary")
+
+# Extract from document
+result = ka.parse(earnings_text)
+
+# Access financial metrics
+for metric in result.get_nodes("FinancialMetric"):
+ print(f"{metric.name}: {metric.value}")
+```
+
+## Supported Document Types
+
+- Annual reports
+- Quarterly earnings
+- 10-K/10-Q filings
+- Equity research reports
+- Financial news articles
+- IPO prospectuses
+- Supply chain analysis
+
+## Next Steps
+
+- [Legal Templates](legal.md)
+- [Medicine Templates](medicine.md)
+- [Template Gallery](../../reference/template-gallery.md)
diff --git a/docs/en/guides/domain-templates/index.md b/docs/en/guides/domain-templates/index.md
new file mode 100644
index 0000000..9538290
--- /dev/null
+++ b/docs/en/guides/domain-templates/index.md
@@ -0,0 +1,67 @@
+# Domain Templates
+
+Hyper-Extract includes specialized templates for various industries and use cases.
+
+## Available Domains
+
+- [Finance](finance.md) - Financial document extraction
+- [Legal](legal.md) - Legal document extraction
+- [Medicine](medicine.md) - Medical document extraction
+- [TCM](tcm.md) - Traditional Chinese Medicine templates
+
+## Quick Start
+
+### Using a Domain Template
+
+```bash
+# CLI
+he parse document.txt -t finance/earnings_summary
+
+# Python API
+ka = Template.create("finance/earnings_summary")
+result = ka.parse(document_text)
+```
+
+## Template Categories
+
+### Finance Templates
+
+Extract financial information from various document types:
+
+- Earnings reports
+- Financial news
+- IPO prospectuses
+- Equity research
+- Supply chain analysis
+
+### Legal Templates
+
+Extract legal information:
+
+- Court judgments
+- Contracts
+- Compliance filings
+- Legal treatises
+
+### Medicine Templates
+
+Extract medical information:
+
+- Clinical guidelines
+- Discharge summaries
+- Package inserts
+- Pathology reports
+- Textbooks
+
+### TCM Templates
+
+Traditional Chinese Medicine specific templates:
+
+- Herb properties
+- Formula composition
+- Meridian graphs
+- Syndrome reasoning
+
+## Creating Custom Domain Templates
+
+See [Template Design Guide](../../concepts/templates.md) for creating your own domain-specific templates.
diff --git a/docs/en/guides/domain-templates/legal.md b/docs/en/guides/domain-templates/legal.md
new file mode 100644
index 0000000..3b1be44
--- /dev/null
+++ b/docs/en/guides/domain-templates/legal.md
@@ -0,0 +1,98 @@
+# Legal Templates
+
+Hyper-Extract provides specialized templates for legal document extraction.
+
+## Available Templates
+
+### Case Facts
+
+Extract facts from court judgments:
+
+```yaml
+name: case_facts
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Party
+ - type: Event
+ - type: LegalFact
+ edges:
+ - type: PARTICIPATED_IN
+ - type: OCCURRED_ON
+```
+
+### Contract Terms
+
+Extract contract obligations:
+
+```yaml
+name: contract_terms
+type: List
+schema:
+ item:
+ - name: clause_type
+ type: string
+ - name: parties
+ type: array
+ - name: obligations
+ type: string
+```
+
+### Compliance Requirements
+
+Extract compliance requirements:
+
+```yaml
+name: compliance_requirements
+type: List
+schema:
+ item:
+ - name: regulation
+ type: string
+ - name: requirement
+ type: string
+ - name: deadline
+ type: date
+```
+
+## Usage Examples
+
+### CLI
+
+```bash
+# Extract case facts
+he parse judgment.txt -t legal/case_facts -o output/
+
+# Extract contract terms
+he parse contract.pdf -t legal/contract_terms -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# Load legal template
+ka = Template.create("legal/case_facts")
+
+# Extract from document
+result = ka.parse(judgment_text)
+
+# Access parties
+for party in result.get_nodes("Party"):
+ print(f"Party: {party.name}")
+```
+
+## Supported Document Types
+
+- Court judgments
+- Legal contracts
+- Compliance filings
+- Legal treatises
+- Regulatory documents
+
+## Next Steps
+
+- [Finance Templates](finance.md)
+- [Medicine Templates](medicine.md)
+- [Template Gallery](../../reference/template-gallery.md)
diff --git a/docs/en/guides/domain-templates/medicine.md b/docs/en/guides/domain-templates/medicine.md
new file mode 100644
index 0000000..680d325
--- /dev/null
+++ b/docs/en/guides/domain-templates/medicine.md
@@ -0,0 +1,98 @@
+# Medicine Templates
+
+Hyper-Extract provides specialized templates for medical document extraction.
+
+## Available Templates
+
+### Drug Interactions
+
+Extract drug interaction information:
+
+```yaml
+name: drug_interactions
+type: Graph
+schema:
+ nodes:
+ - type: Drug
+ - type: Interaction
+ edges:
+ - type: INTERACTS_WITH
+ - type: CAUSES
+```
+
+### Treatment Plan
+
+Extract treatment plan details:
+
+```yaml
+name: treatment_plan
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Treatment
+ - type: Medication
+ - type: Procedure
+ edges:
+ - type: INCLUDES
+ - type: SCHEDULED_FOR
+```
+
+### Patient History
+
+Extract patient medical history:
+
+```yaml
+name: patient_history
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Condition
+ - type: Treatment
+ - type: Medication
+ edges:
+ - type: DIAGNOSED_ON
+ - type: TREATED_WITH
+```
+
+## Usage Examples
+
+### CLI
+
+```bash
+# Extract drug interactions
+he parse clinical_note.txt -t medicine/drug_interactions -o output/
+
+# Extract treatment plan
+he parse discharge_summary.pdf -t medicine/treatment_plan -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# Load medicine template
+ka = Template.create("medicine/drug_interactions")
+
+# Extract from document
+result = ka.parse(clinical_text)
+
+# Access drug information
+for drug in result.get_nodes("Drug"):
+ print(f"Drug: {drug.name}")
+```
+
+## Supported Document Types
+
+- Clinical guidelines
+- Discharge summaries
+- Package inserts
+- Pathology reports
+- Medical textbooks
+- Clinical notes
+
+## Next Steps
+
+- [TCM Templates](tcm.md)
+- [Finance Templates](finance.md)
+- [Template Gallery](../../reference/template-gallery.md)
diff --git a/docs/en/guides/domain-templates/tcm.md b/docs/en/guides/domain-templates/tcm.md
new file mode 100644
index 0000000..a6be952
--- /dev/null
+++ b/docs/en/guides/domain-templates/tcm.md
@@ -0,0 +1,112 @@
+# TCM Templates
+
+Hyper-Extract provides specialized templates for Traditional Chinese Medicine (TCM) document extraction.
+
+## Available Templates
+
+### Herb Properties
+
+Extract properties of medicinal herbs:
+
+```yaml
+name: herb_properties
+type: Model
+schema:
+ - name: herb_name
+ type: string
+ - name: properties
+ type: array
+ - name: channels
+ type: array
+ - name: indications
+ type: array
+```
+
+### Formula Composition
+
+Extract herbal formula composition:
+
+```yaml
+name: formula_composition
+type: List
+schema:
+ item:
+ - name: herb_name
+ type: string
+ - name: dosage
+ type: string
+ - name: role
+ type: string
+```
+
+### Meridian Graph
+
+Extract meridian relationships:
+
+```yaml
+name: meridian_graph
+type: Graph
+schema:
+ nodes:
+ - type: Herb
+ - type: Meridian
+ edges:
+ - type: ENTERS
+```
+
+### Syndrome Reasoning
+
+Extract syndrome diagnosis and reasoning:
+
+```yaml
+name: syndrome_reasoning
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Syndrome
+ - type: Pattern
+ - type: Treatment
+```
+
+## Usage Examples
+
+### CLI
+
+```bash
+# Extract herb properties
+he parse herbal_compendium.txt -t tcm/herb_properties -o output/
+
+# Extract formula composition
+he parse prescription.txt -t tcm/formula_composition -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# Load TCM template
+ka = Template.create("tcm/herb_properties")
+
+# Extract from document
+result = ka.parse(herbal_text)
+
+# Access herb information
+for herb in result.get_nodes("Herb"):
+ print(f"Herb: {herb.name}")
+ print(f"Properties: {herb.properties}")
+```
+
+## Supported Document Types
+
+- Herbal compendiums
+- Prescription forms
+- Medical case records
+- Meridian treatises
+- Formula pharmacopoeias
+
+## Next Steps
+
+- [Medicine Templates](medicine.md)
+- [Finance Templates](finance.md)
+- [Template Gallery](../../reference/template-gallery.md)
diff --git a/docs/en/guides/index.md b/docs/en/guides/index.md
new file mode 100644
index 0000000..9b11adc
--- /dev/null
+++ b/docs/en/guides/index.md
@@ -0,0 +1,34 @@
+# Guides
+
+This section provides step-by-step tutorials and how-to guides for using Hyper-Extract.
+
+## What's in This Section
+
+- [CLI Guide](cli.md) - Command-line interface documentation
+- [Python API](python-api.md) - Python API usage guide
+- [Domain Templates](domain-templates/index.md) - Templates for specific domains
+
+## Popular Guides
+
+### Getting Started with CLI
+
+Learn how to use the command-line interface for quick extraction tasks.
+
+### Python API Tutorial
+
+Build applications using the Python API with detailed examples.
+
+### Domain-Specific Templates
+
+Use pre-built templates for finance, legal, medicine, and more.
+
+## Quick Links
+
+- [Finance Templates](domain-templates/finance.md) - Financial document extraction
+- [Legal Templates](domain-templates/legal.md) - Legal document extraction
+- [Medicine Templates](domain-templates/medicine.md) - Medical document extraction
+- [TCM Templates](domain-templates/tcm.md) - Traditional Chinese Medicine templates
+
+## Learn by Example
+
+Check out our [Examples Repository](https://github.com/hyper-extract/hyper-extract/tree/main/examples) for complete working examples.
diff --git a/docs/en/guides/python-api.md b/docs/en/guides/python-api.md
new file mode 100644
index 0000000..2426540
--- /dev/null
+++ b/docs/en/guides/python-api.md
@@ -0,0 +1,209 @@
+# Python API
+
+This guide covers using Hyper-Extract in your Python applications.
+
+## Installation
+
+```bash
+pip install hyper-extract
+```
+
+## Basic Usage
+
+### Import and Initialize
+
+```python
+from hyperextract import Template
+
+# Load a preset template
+ka = Template.create("general/biography")
+
+# Parse document
+result = ka.parse(text)
+```
+
+### Using Custom Templates
+
+```python
+from hyperextract import Template
+
+# Load from YAML
+ka = Template.from_yaml("template.yaml")
+
+# Parse document
+result = ka.parse(document_text)
+
+# Access results
+print(result.nodes)
+print(result.edges)
+```
+
+## Auto-Types
+
+### AutoModel
+
+```python
+from hyperextract import AutoModel
+from pydantic import BaseModel
+
+class Person(BaseModel):
+ name: str
+ age: int
+ occupation: str
+
+extractor = AutoModel(schema=Person)
+result = extractor.parse("John is a 30-year-old engineer.")
+```
+
+### AutoList
+
+```python
+from hyperextract import AutoList
+
+extractor = AutoList(item_type="string")
+result = extractor.parse("The ingredients are flour, sugar, and eggs.")
+print(result.items) # ["flour", "sugar", "eggs"]
+```
+
+### AutoGraph
+
+```python
+from hyperextract import AutoGraph
+
+extractor = AutoGraph(
+ node_types=["Person", "Organization"],
+ edge_types=["WORKS_AT"]
+)
+result = extractor.parse("Alice works at Google.")
+```
+
+### AutoHypergraph
+
+```python
+from hyperextract import AutoHypergraph
+
+extractor = AutoHypergraph()
+result = extractor.parse("Alice, Bob, and Carol collaborated.")
+```
+
+## Extraction Methods
+
+### Using atom
+
+```python
+from hyperextract.methods import atom
+
+result = atom.extract(text, schema=MySchema)
+```
+
+### Using graph_rag
+
+```python
+from hyperextract.methods import graph_rag
+
+result = graph_rag.extract(
+ text,
+ node_types=["Person", "Company"],
+ edge_types=["WORKS_AT"]
+)
+```
+
+### Using cog_rag
+
+```python
+from hyperextract.methods import cog_rag
+
+result = cog_rag.extract(
+ text,
+ task="Extract causal relationships"
+)
+```
+
+## Configuration
+
+### LLM Configuration
+
+```python
+from hyperextract import Config
+
+config = Config(
+ llm_provider="openai",
+ llm_model="gpt-4o",
+ api_key="your-api-key"
+)
+
+ka = Template.create("general/biography", config=config)
+```
+
+### Embedding Configuration
+
+```python
+config = Config(
+ embedding_provider="openai",
+ embedding_model="text-embedding-3-small"
+)
+```
+
+## Working with Results
+
+### Accessing Nodes
+
+```python
+result = ka.parse(text)
+
+for node in result.nodes:
+ print(f"{node.type}: {node.properties}")
+```
+
+### Accessing Edges
+
+```python
+for edge in result.edges:
+ print(f"{edge.source} --[{edge.type}]--> {edge.target}")
+```
+
+### Serialization
+
+```python
+# Save to JSON
+result.to_json("output.json")
+
+# Save to YAML
+result.to_yaml("output.yaml")
+
+# Load from file
+loaded = Result.from_json("output.json")
+```
+
+## Advanced Usage
+
+### Custom Parsers
+
+```python
+from hyperextract import Template
+from hyperextract.parsers import CustomParser
+
+class MyParser(CustomParser):
+ def parse(self, text):
+ # Custom parsing logic
+ return processed_result
+
+ka = Template(parser=MyParser())
+```
+
+### Batch Processing
+
+```python
+from hyperextract import Template
+
+ka = Template.create("general/biography")
+
+documents = ["doc1.txt", "doc2.txt", "doc3.txt"]
+results = ka.batch_parse(documents)
+```
+
+## Next Steps
+
+- Explore [CLI](cli.md)
+- Browse [Domain Templates](domain-templates/index.md)
+- Check [Reference](../reference/index.md)
diff --git a/docs/en/index.md b/docs/en/index.md
new file mode 100644
index 0000000..21e4dcd
--- /dev/null
+++ b/docs/en/index.md
@@ -0,0 +1,77 @@
+# Hyper-Extract
+
+> **"Stop reading. Start understanding."**
+
+**Transform documents into knowledge abstracts — with just one command.**
+
+[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)](https://python.org)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
+[![Status](https://img.shields.io/badge/status-active-success)]()
+
+## What is Hyper-Extract?
+
+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 summaries. 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**.
+
+## Core Features
+
+- 🔷 **8 Auto-Types:** From basic `AutoModel`/`AutoList` to advanced `AutoGraph`, `AutoHypergraph`, and `AutoSpatioTemporalGraph`.
+- 🧠 **10+ Extraction Engines:** Out-of-the-box support for cutting-edge retrieval paradigms like `graph_rag`, `light_rag`, and `hyper_rag`.
+- 📝 **Declarative YAML Templates:** Zero-code extraction definition. Includes 80+ presets across 6 domains.
+- 🔄 **Incremental Evolution:** Feed new documents on the fly to continuously map out and expand the extracted knowledge.
+
+## Quick Start
+
+### Installation
+
+```bash
+uv pip install hyper-extract
+```
+
+### The Command Line Way
+
+```bash
+he config init -k YOUR_API_KEY
+he parse document.md -o ./output/ -l zh
+he search ./output/ "What are the key events?"
+he feed ./output/ new_document.md
+```
+
+### The Python API Way
+
+```python
+from hyperextract import Template
+
+# Load a preset YAML template
+ka = Template.create("finance/event_timeline")
+
+# Extract and auto-parse the document
+result = ka.parse(annual_report_text)
+```
+
+## Documentation
+
+- [Getting Started](getting-started/index.md) - Get up and running quickly
+- [Concepts](concepts/index.md) - Understand the core concepts
+- [Guides](guides/index.md) - Step-by-step tutorials
+- [Reference](reference/index.md) - API and configuration reference
+
+## The 8 Auto-Types
+
+| Type | Description |
+|------|-------------|
+| AutoModel | Pydantic model extraction |
+| AutoList | List/collection extraction |
+| AutoSet | Unique set extraction |
+| AutoGraph | Knowledge graph extraction |
+| AutoHypergraph | Hypergraph extraction |
+| AutoTemporalGraph | Temporal knowledge graph |
+| AutoSpatialGraph | Spatial knowledge graph |
+| AutoSpatioTemporalGraph | Spatio-temporal knowledge graph |
+
+## Architecture
+
+The system is built on a robust triad: **Auto-Types** (Multi-typed structures), **Methods** (The Execution strategy), and **Templates** (Declarative schema).
+
+## License
+
+Licensed under **Apache-2.0**.
diff --git a/docs/en/reference/cli-reference.md b/docs/en/reference/cli-reference.md
new file mode 100644
index 0000000..924f269
--- /dev/null
+++ b/docs/en/reference/cli-reference.md
@@ -0,0 +1,192 @@
+# CLI Reference
+
+Complete reference for all Hyper-Extract CLI commands.
+
+## Command Overview
+
+| Command | Description |
+|---------|-------------|
+| `he config` | Manage configuration |
+| `he parse` | Extract knowledge from documents |
+| `he search` | Query extracted knowledge |
+| `he feed` | Add new documents to knowledge base |
+| `he list` | List available templates |
+
+## config
+
+Manage Hyper-Extract configuration.
+
+### Syntax
+
+```bash
+he config <action> [options]
+```
+
+### Actions
+
+#### init
+
+Initialize configuration:
+
+```bash
+he config init -k API_KEY [--provider PROVIDER]
+```
+
+#### show
+
+Show current configuration:
+
+```bash
+he config show [--format json|yaml]
+```
+
+#### set
+
+Update configuration option:
+
+```bash
+he config set KEY VALUE
+```
+
+#### list-templates
+
+List available templates:
+
+```bash
+he config list-templates [--category CATEGORY]
+```
+
+## parse
+
+Extract knowledge from documents.
+
+### Syntax
+
+```bash
+he parse <input> [options]
+```
+
+### Options
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `-o, --output` | Output directory | Required |
+| `-t, --template` | Template name | Auto-detect |
+| `-l, --language` | Document language | Auto-detect |
+| `--method` | Extraction method | Default |
+| `--batch` | Batch processing | False |
+| `--format` | Output format | json |
+
+### Examples
+
+```bash
+# Basic usage
+he parse document.txt -o output/
+
+# With template
+he parse document.txt -t finance/earnings_summary -o output/
+
+# Batch processing
+he parse ./documents/ -o output/ --batch
+
+# Specify language
+he parse chinese.txt -l zh -o output/
+```
+
+## search
+
+Query extracted knowledge.
+
+### Syntax
+
+```bash
+he search <knowledge_base> <query> [options]
+```
+
+### Options
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `--filter` | Filter by node/edge type | None |
+| `--limit` | Maximum results | 10 |
+| `--format` | Output format | json |
+
+### Examples
+
+```bash
+# Basic search
+he search output/ "What happened?"
+
+# With filters
+he search output/ "financial events" --filter type=FinancialEvent
+
+# Limited results
+he search output/ "companies" --limit 5
+```
+
+## feed
+
+Add new documents to existing knowledge base.
+
+### Syntax
+
+```bash
+he feed <knowledge_base> <documents...> [options]
+```
+
+### Options
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `-t, --template` | Template name | Inherited |
+| `--merge` | Merge strategy | smart |
+
+### Examples
+
+```bash
+# Add single document
+he feed output/ new_doc.txt
+
+# Add multiple documents
+he feed output/ doc1.txt doc2.txt doc3.txt
+
+# Add directory
+he feed output/ ./new_documents/
+```
+
+## list
+
+List available templates.
+
+### Syntax
+
+```bash
+he list [options]
+```
+
+### Options
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `--category` | Filter by category | All |
+| `--domain` | Filter by domain | All |
+| `--format` | Output format | table |
+
+### Categories
+
+- `finance`
+- `legal`
+- `medicine`
+- `tcm`
+- `industry`
+- `general`
+
+## Global Options
+
+| Option | Description |
+|--------|-------------|
+| `--help` | Show help message |
+| `--version` | Show version number |
+| `--verbose` | Enable verbose output |
+| `--debug` | Enable debug mode |
+| `--config PATH` | Custom config file |
diff --git a/docs/en/reference/index.md b/docs/en/reference/index.md
new file mode 100644
index 0000000..9efee88
--- /dev/null
+++ b/docs/en/reference/index.md
@@ -0,0 +1,21 @@
+# Reference
+
+This section provides detailed API and configuration reference documentation.
+
+## What's in This Section
+
+- [CLI Reference](cli-reference.md) - Complete CLI command reference
+- [Template Gallery](template-gallery.md) - All available templates
+
+## API Reference
+
+For detailed Python API documentation, see the [API Documentation](https://hyper-extract.readthedocs.io/).
+
+## Configuration Reference
+
+See [Configuration Guide](../getting-started/configuration.md) for configuration options.
+
+## Next Steps
+
+- [CLI Reference](cli-reference.md)
+- [Template Gallery](template-gallery.md)
diff --git a/docs/en/reference/template-gallery.md b/docs/en/reference/template-gallery.md
new file mode 100644
index 0000000..f299c05
--- /dev/null
+++ b/docs/en/reference/template-gallery.md
@@ -0,0 +1,99 @@
+# Template Gallery
+
+Complete list of all available preset templates in Hyper-Extract.
+
+## Finance Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `finance/earnings_summary` | Extract earnings report highlights |
+| `finance/risk_factor_set` | Extract risk factors |
+| `finance/ownership_graph` | Extract ownership relationships |
+| `finance/event_timeline` | Extract financial events timeline |
+| `finance/sentiment_model` | Extract sentiment analysis |
+
+## Legal Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `legal/case_facts` | Extract case facts from judgments |
+| `legal/case_citation` | Extract legal citations |
+| `legal/contract_obligation` | Extract contract obligations |
+| `legal/compliance_list` | Extract compliance requirements |
+| `legal/defined_term_set` | Extract defined terms |
+| `legal/case_fact_timeline` | Extract case fact timeline |
+
+## Medicine Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `medicine/drug_interaction` | Extract drug interactions |
+| `medicine/treatment_map` | Extract treatment plans |
+| `medicine/anatomy_graph` | Extract anatomical relationships |
+| `medicine/hospital_timeline` | Extract patient hospital timeline |
+| `medicine/discharge_instruction` | Extract discharge instructions |
+
+## TCM Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `tcm/herb_property` | Extract herb properties |
+| `tcm/formula_composition` | Extract formula composition |
+| `tcm/herb_relation` | Extract herb relationships |
+| `tcm/meridian_graph` | Extract meridian relationships |
+| `tcm/syndrome_reasoning` | Extract syndrome reasoning |
+
+## Industry Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `industry/safety_control` | Extract safety controls |
+| `industry/equipment_topology` | Extract equipment relationships |
+| `industry/operation_flow` | Extract operation flows |
+| `industry/failure_case` | Extract failure case analysis |
+| `industry/emergency_response` | Extract emergency procedures |
+
+## General Templates
+
+### Core Templates
+
+| Template | Description |
+|----------|-------------|
+| `general/biography` | Extract biographical information |
+| `general/concepts` | Extract conceptual relationships |
+| `general/workflow` | Extract workflow steps |
+| `general/doc_structure` | Extract document structure |
+| `general/base_model` | Basic model extraction |
+| `general/base_list` | Basic list extraction |
+| `general/base_set` | Basic set extraction |
+| `general/base_graph` | Basic graph extraction |
+| `general/base_hypergraph` | Basic hypergraph extraction |
+
+## Using Templates
+
+### CLI
+
+```bash
+he parse document.txt -t <template_name>
+```
+
+### Python API
+
+```python
+ka = Template.create("<template_name>")
+result = ka.parse(document_text)
+```
+
+## Creating Custom Templates
+
+See the [Template Design Guide](../concepts/templates.md) for creating your own templates.
diff --git a/docs/en/resources/contributing.md b/docs/en/resources/contributing.md
new file mode 100644
index 0000000..193b97f
--- /dev/null
+++ b/docs/en/resources/contributing.md
@@ -0,0 +1,116 @@
+# Contributing
+
+Thank you for your interest in contributing to Hyper-Extract!
+
+## Ways to Contribute
+
+### Report Bugs
+
+Report bugs by opening a GitHub issue with:
+- Clear description of the bug
+- Steps to reproduce
+- Expected vs actual behavior
+- Environment information (Python version, OS, etc.)
+
+### Suggest Features
+
+We welcome feature suggestions! Please:
+1. Check existing issues to avoid duplicates
+2. Describe the use case clearly
+3. Explain the expected behavior
+
+### Contribute Code
+
+#### Development Setup
+
+1. Fork the repository
+2. Clone your fork:
+ ```bash
+ git clone https://github.com/YOUR_USERNAME/hyper-extract.git
+ cd hyper-extract
+ ```
+
+3. Create a virtual environment:
+ ```bash
+ python -m venv env
+ source env/bin/activate # Windows: env\Scripts\activate
+ ```
+
+4. Install development dependencies:
+ ```bash
+ pip install -e ".[dev]"
+ ```
+
+5. Install pre-commit hooks:
+ ```bash
+ pre-commit install
+ ```
+
+#### Development Workflow
+
+1. Create a feature branch:
+ ```bash
+ git checkout -b feature/your-feature-name
+ ```
+
+2. Make your changes
+3. Run tests:
+ ```bash
+ pytest tests/
+ ```
+
+4. Run linting:
+ ```bash
+ ruff check .
+ ```
+
+5. Commit your changes:
+ ```bash
+ git commit -m "Add your feature"
+ ```
+
+6. Push and create a Pull Request
+
+#### Code Style
+
+- Follow PEP 8
+- Use type hints
+- Write docstrings
+- Add tests for new features
+
+### Contribute Documentation
+
+Documentation improvements are always welcome:
+- Fix typos or unclear explanations
+- Add examples
+- Improve translations
+- Update outdated content
+
+### Translation Contributions
+
+We welcome translation contributions:
+1. Check the existing translations
+2. Follow the [Translation Guide](./translation-guide.md)
+3. Submit translations via PR
+
+## Pull Request Guidelines
+
+1. Reference related issues
+2. Include tests for new features
+3. Update documentation as needed
+4. Follow the code style guidelines
+5. Ensure all tests pass
+
+## Development Resources
+
+- [GitHub Repository](https://github.com/hyper-extract/hyper-extract)
+- [Issue Tracker](https://github.com/hyper-extract/hyper-extract/issues)
+- [Discussions](https://github.com/hyper-extract/hyper-extract/discussions)
+
+## Code of Conduct
+
+Please be respectful and constructive in all interactions. We follow the [Contributor Covenant](https://www.contributor-covenant.org/).
+
+## License
+
+By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.
diff --git a/docs/en/resources/faq.md b/docs/en/resources/faq.md
new file mode 100644
index 0000000..1ad0f39
--- /dev/null
+++ b/docs/en/resources/faq.md
@@ -0,0 +1,106 @@
+# FAQ
+
+Frequently asked questions about Hyper-Extract.
+
+## General
+
+### What is Hyper-Extract?
+
+Hyper-Extract is an intelligent, LLM-powered knowledge extraction framework that transforms unstructured documents into structured knowledge representations.
+
+### What types of documents can Hyper-Extract process?
+
+Hyper-Extract can process various document types including:
+- Plain text files
+- PDFs
+- Markdown files
+- HTML documents
+- Word documents
+
+### What languages are supported?
+
+Hyper-Extract supports multiple languages including English, Chinese, Japanese, Korean, and more.
+
+## Installation
+
+### How do I install Hyper-Extract?
+
+```bash
+pip install hyper-extract
+```
+
+### What are the system requirements?
+
+- Python 3.9 or higher
+- OpenAI API key (or compatible LLM API)
+
+## Usage
+
+### How do I extract knowledge from a document?
+
+Using CLI:
+```bash
+he parse document.txt -o output/
+```
+
+Using Python API:
+```python
+from hyperextract import Template
+ka = Template.create("general/biography")
+result = ka.parse(document_text)
+```
+
+### How do I choose the right template?
+
+Choose a template based on:
+1. Document type (finance, legal, medical, etc.)
+2. Extraction goal (entities, relationships, lists, etc.)
+3. Output format needed (graph, list, model, etc.)
+
+### How do I create a custom template?
+
+See the [Template Design Guide](../concepts/templates.md) for creating custom templates.
+
+## Troubleshooting
+
+### API Key Issues
+
+**Error: "API key not found"**
+
+Solution: Set your API key using:
+```bash
+he config init -k YOUR_API_KEY
+```
+
+### Extraction Quality
+
+**Low quality extractions**
+
+Tips for better results:
+1. Use domain-specific templates
+2. Provide clear extraction instructions
+3. Use longer context windows
+4. Adjust temperature settings
+
+### Performance
+
+**Slow extraction times**
+
+Optimization tips:
+1. Use `light_rag` method for faster extraction
+2. Batch process multiple documents
+3. Use appropriate batch sizes
+
+## Contributing
+
+### How can I contribute?
+
+See the [Contributing Guide](contributing.md) for information on how to contribute.
+
+### How do I report bugs?
+
+Please open an issue on our GitHub repository with:
+- Detailed description of the bug
+- Steps to reproduce
+- Expected vs actual behavior
+- Environment information
diff --git a/docs/en/resources/troubleshooting.md b/docs/en/resources/troubleshooting.md
new file mode 100644
index 0000000..3eea635
--- /dev/null
+++ b/docs/en/resources/troubleshooting.md
@@ -0,0 +1,149 @@
+# Troubleshooting
+
+Common issues and solutions for Hyper-Extract.
+
+## Installation Issues
+
+### Package Installation Fails
+
+**Problem**: `pip install hyper-extract` fails
+
+**Solutions**:
+1. Upgrade pip:
+ ```bash
+ pip install --upgrade pip
+ ```
+
+2. Use a virtual environment:
+ ```bash
+ python -m venv env
+ source env/bin/activate # On Windows: env\Scripts\activate
+ pip install hyper-extract
+ ```
+
+### Dependency Conflicts
+
+**Problem**: Dependency conflicts with other packages
+
+**Solution**: Create a clean virtual environment:
+```bash
+python -m venv hyper-extract-env
+source hyper-extract-env/bin/activate
+pip install hyper-extract
+```
+
+## API Issues
+
+### Invalid API Key
+
+**Problem**: "Invalid API key" error
+
+**Solutions**:
+1. Verify your API key is correct
+2. Check key has not expired
+3. Ensure sufficient credits/quota
+
+### Rate Limiting
+
+**Problem**: "Rate limit exceeded" error
+
+**Solutions**:
+1. Add delay between requests
+2. Use batch processing
+3. Reduce `max_workers` in configuration
+
+### Timeout Errors
+
+**Problem**: Requests timeout
+
+**Solutions**:
+1. Increase timeout in configuration:
+ ```yaml
+ extraction:
+ timeout: 120
+ ```
+2. Use smaller document chunks
+3. Check network connectivity
+
+## Extraction Issues
+
+### Empty Results
+
+**Problem**: Extraction returns no results
+
+**Solutions**:
+1. Verify document contains extractable content
+2. Check template matches document type
+3. Review extraction logs for errors
+
+### Incorrect Extractions
+
+**Problem**: Extracted data is incorrect or incomplete
+
+**Solutions**:
+1. Use more specific templates
+2. Add extraction hints in template description
+3. Try different extraction methods
+4. Adjust confidence thresholds
+
+### Memory Issues
+
+**Problem**: Out of memory errors
+
+**Solutions**:
+1. Process documents in smaller batches
+2. Reduce batch size
+3. Clear cache periodically
+
+## Performance Issues
+
+### Slow Extraction
+
+**Problem**: Extraction is very slow
+
+**Solutions**:
+1. Use faster extraction methods:
+ ```python
+ result = atom.extract(text) # Fastest
+ ```
+
+2. Enable parallel processing:
+ ```python
+ results = ka.batch_parse(docs, parallel=True)
+ ```
+
+3. Use lighter models for faster processing
+
+## CLI Issues
+
+### Command Not Found
+
+**Problem**: `he` command not found
+
+**Solutions**:
+1. Reinstall the package:
+ ```bash
+ pip uninstall hyper-extract
+ pip install hyper-extract
+ ```
+
+2. Use Python module directly:
+ ```bash
+ python -m hyperextract parse document.txt
+ ```
+
+### Configuration Not Found
+
+**Problem**: CLI can't find configuration
+
+**Solution**: Initialize configuration:
+```bash
+he config init -k YOUR_API_KEY
+```
+
+## Still Having Issues?
+
+If you're still experiencing issues:
+1. Check the [FAQ](faq.md)
+2. Search existing [GitHub Issues](https://github.com/hyper-extract/hyper-extract/issues)
+3. Create a new issue with detailed information
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
new file mode 100644
index 0000000..94fd02a
--- /dev/null
+++ b/docs/stylesheets/extra.css
@@ -0,0 +1,75 @@
+/* Hyper-Extract Documentation Custom Styles */
+
+:root {
+ --hyper-extract-primary: #6366f1;
+ --hyper-extract-accent: #818cf8;
+ --hyper-extract-light: #e0e7ff;
+}
+
+.md-typeset h1 {
+ color: var(--hyper-extract-primary);
+ font-weight: 700;
+}
+
+.md-typeset h2 {
+ color: var(--hyper-extract-primary);
+ font-weight: 600;
+}
+
+.md-typeset h3 {
+ color: var(--hyper-extract-accent);
+ font-weight: 600;
+}
+
+.md-typeset .highlight {
+ border-radius: 8px;
+ border: 1px solid rgba(99, 102, 241, 0.2);
+}
+
+.md-typeset :is(.admonition):is(.tip) {
+ border-left-color: var(--hyper-extract-primary);
+}
+
+.md-typeset :is(.admonition):is(.note) {
+ border-left-color: var(--hyper-extract-accent);
+}
+
+.md-typeset :is(.admonition):is(.warning) {
+ border-left-color: #f59e0b;
+}
+
+.md-typeset :is(.admonition):is(.danger) {
+ border-left-color: #ef4444;
+}
+
+.md-nav__link--active {
+ color: var(--hyper-extract-primary);
+ font-weight: 600;
+}
+
+.md-search__input:focus {
+ border-color: var(--hyper-extract-primary);
+}
+
+.md-header {
+ background: linear-gradient(135deg, var(--hyper-extract-primary) 0%, var(--hyper-extract-accent) 100%);
+}
+
+.md-typeset code {
+ border-radius: 4px;
+ padding: 2px 6px;
+ background-color: var(--hyper-extract-light);
+ color: var(--hyper-extract-primary);
+}
+
+@media print {
+ .md-header,
+ .md-nav,
+ .md-sidebar {
+ display: none;
+ }
+
+ .md-main__inner {
+ margin-left: 0;
+ }
+}
diff --git a/docs/zh/concepts/auto-types.md b/docs/zh/concepts/auto-types.md
new file mode 100644
index 0000000..10a09b4
--- /dev/null
+++ b/docs/zh/concepts/auto-types.md
@@ -0,0 +1,113 @@
+# 自动类型
+
+Hyper-Extract 提供 8 种自动类型用于表示知识。每种类型都针对特定的提取场景进行了优化。
+
+## 概览
+
+| 类型 | 模块 | 描述 |
+|------|------|------|
+| AutoModel | `hyperextract.types.model` | Pydantic 模型提取 |
+| AutoList | `hyperextract.types.list` | 列表/集合提取 |
+| AutoSet | `hyperextract.types.set` | 唯一集合提取 |
+| AutoGraph | `hyperextract.types.graph` | 知识图谱提取 |
+| AutoHypergraph | `hyperextract.types.hypergraph` | 超图提取 |
+| AutoTemporalGraph | `hyperextract.types.temporal_graph` | 时序知识图谱 |
+| AutoSpatialGraph | `hyperextract.types.spatial_graph` | 空间知识图谱 |
+| AutoSpatioTemporalGraph | `hyperextract.types.spatio_temporal_graph` | 时空图 |
+
+## 使用示例
+
+### AutoModel
+
+提取到 Pydantic 模型的结构化数据:
+
+```python
+from hyperextract import AutoModel
+from pydantic import BaseModel
+
+class Person(BaseModel):
+ name: str
+ age: int
+ occupation: str
+
+extractor = AutoModel(schema=Person)
+result = extractor.parse("John Smith 是一位 35 岁的软件工程师。")
+```
+
+### AutoList
+
+提取项目列表:
+
+```python
+from hyperextract import AutoList
+
+extractor = AutoList(item_type="string")
+result = extractor.parse("配料包括面粉、糖、鸡蛋和牛奶。")
+# result: ["面粉", "糖", "鸡蛋", "牛奶"]
+```
+
+### AutoGraph
+
+提取知识图谱:
+
+```python
+from hyperextract import AutoGraph
+
+extractor = AutoGraph(node_types=["Person", "Organization"], edge_types=["WORKS_AT"])
+result = extractor.parse("Alice 在 Google 工作。")
+# result: 包含节点和边的图
+```
+
+### AutoHypergraph
+
+提取超图(连接多个节点的边):
+
+```python
+from hyperextract import AutoHypergraph
+
+extractor = AutoHypergraph()
+result = extractor.parse("Alice、Bob 和 Carol 合作完成了 X 项目。")
+```
+
+### AutoTemporalGraph
+
+提取带有时间信息的图谱:
+
+```python
+from hyperextract import AutoTemporalGraph
+
+extractor = AutoTemporalGraph()
+result = extractor.parse("周一,Alice 加入 Google。周二,她开始工作。")
+```
+
+## 选择正确的类型
+
+### 何时使用 AutoModel
+- 需要结构化、经验证的输出
+- 使用定义良好的模式
+- 想要 Pydantic 验证
+
+### 何时使用 AutoList
+- 提取项目集合
+- 顺序重要
+- 简单项目提取
+
+### 何时使用 AutoSet
+- 只需要唯一项
+- 不关心顺序
+- 需要去重
+
+### 何时使用 AutoGraph
+- 实体之间的复杂关系
+- 知识图谱
+- 网络分析
+
+### 何时使用 Temporal/Spatial 变体
+- 时间感知:使用 `AutoTemporalGraph`
+- 位置感知:使用 `AutoSpatialGraph`
+- 两者都需要:使用 `AutoSpatioTemporalGraph`
+
+## 下一步
+
+- 了解 [提取方法](methods.md)
+- 探索 [模板](templates.md)
diff --git a/docs/zh/concepts/index.md b/docs/zh/concepts/index.md
new file mode 100644
index 0000000..b27326b
--- /dev/null
+++ b/docs/zh/concepts/index.md
@@ -0,0 +1,52 @@
+# 核心概念
+
+本节解释 Hyper-Extract 的核心概念。
+
+## 本节内容
+
+- [自动类型](auto-types.md) - 用于知识表示的 8 种数据结构
+- [提取方法](methods.md) - 10+ 种知识提取引擎
+- [模板](templates.md) - 用于提取的声明式 YAML 模式
+
+## 核心概念
+
+### 自动类型
+
+Hyper-Extract 提供 8 种自动类型,从简单的集合到复杂的图:
+
+| 类型 | 用例 |
+|------|------|
+| AutoModel | 结构化数据提取 |
+| AutoList | 列表/集合提取 |
+| AutoSet | 唯一项提取 |
+| AutoGraph | 知识图谱提取 |
+| AutoHypergraph | 复杂关系提取 |
+| AutoTemporalGraph | 时序知识图谱 |
+| AutoSpatialGraph | 空间知识图谱 |
+| AutoSpatioTemporalGraph | 时空知识图谱 |
+
+### 提取方法
+
+选择适合您提取任务的方法:
+
+| 方法 | 最佳用途 |
+|------|----------|
+| atom | 简单、直接的提取 |
+| graph_rag | 基于图的检索 |
+| light_rag | 轻量级检索 |
+| hyper_rag | 超图提取 |
+| cog_rag | 认知检索 |
+
+### 模板
+
+模板使用声明式 YAML 定义要提取的内容。它们提供:
+
+- 类型安全的模式
+- 验证规则
+- 自定义提取逻辑
+
+## 了解更多
+
+- [自动类型](auto-types.md) - 深入了解每种类型
+- [方法](methods.md) - 比较提取方法
+- [模板](templates.md) - 创建自定义模板
diff --git a/docs/zh/concepts/methods.md b/docs/zh/concepts/methods.md
new file mode 100644
index 0000000..4720082
--- /dev/null
+++ b/docs/zh/concepts/methods.md
@@ -0,0 +1,123 @@
+# 提取方法
+
+Hyper-Extract 提供多种提取方法,每种都针对不同的用例进行了优化。
+
+## 可用方法
+
+### 基本方法
+
+| 方法 | 描述 | 用例 |
+|------|------|------|
+| atom | 直接提取 | 简单、直接的提取 |
+| kg_gen | 知识图谱生成 | 结构化知识提取 |
+
+### 基于 RAG 的方法
+
+| 方法 | 描述 | 用例 |
+|------|------|------|
+| graph_rag | 基于图的 RAG | 复杂关系提取 |
+| light_rag | 轻量级 RAG | 快速、高效提取 |
+| hyper_rag | 超图 RAG | 多实体关系 |
+| hypergraph_rag | 高级超图 | 复杂网络分析 |
+| cog_rag | 认知 RAG | 基于推理的提取 |
+
+### 专业化方法
+
+| 方法 | 描述 | 用例 |
+|------|------|------|
+| itext2kg | 文本转知识图谱 | 文档转换 |
+| itext2kg_star | 增强文本转知识图谱 | 高级文档处理 |
+
+## 方法比较
+
+### 速度
+
+```
+快速: atom > light_rag > kg_gen > graph_rag
+慢速: hyper_rag > cog_rag > hypergraph_rag
+```
+
+### 准确性
+
+```
+高: cog_rag > graph_rag > hypergraph_rag > hyper_rag
+中等: kg_gen > itext2kg > light_rag > atom
+```
+
+### 用例矩阵
+
+| 任务 | 推荐方法 |
+|------|----------|
+| 简单提取 | atom |
+| 快速原型 | light_rag |
+| 知识图谱 | graph_rag |
+| 复杂关系 | hyper_rag |
+| 推理任务 | cog_rag |
+| 文档转换 | itext2kg |
+
+## 使用示例
+
+### 使用 atom 方法
+
+```python
+from hyperextract.methods import atom
+
+result = atom.extract(text, schema=MySchema)
+```
+
+### 使用 graph_rag 方法
+
+```python
+from hyperextract.methods import graph_rag
+
+result = graph_rag.extract(
+ text,
+ node_types=["Person", "Organization"],
+ edge_types=["WORKS_AT", "KNOWS"]
+)
+```
+
+### 使用 cog_rag 方法
+
+```python
+from hyperextract.methods import cog_rag
+
+result = cog_rag.extract(
+ text,
+ task="提取因果关系"
+)
+```
+
+## 方法选择指南
+
+### 快速决策树
+
+```
+任务是否简单?
+├── 是 → 使用 atom
+└── 否 → 是否需要推理?
+ ├── 是 → 使用 cog_rag
+ └── 否 → 是否需要图?
+ ├── 是 → graph_rag 或 hyper_rag
+ └── 否 → 使用 light_rag
+```
+
+## 高级配置
+
+每种方法都支持自定义配置:
+
+```python
+result = graph_rag.extract(
+ text,
+ max_nodes=100,
+ max_edges=200,
+ temperature=0.0,
+ confidence_threshold=0.8
+)
+```
+
+## 下一步
+
+- 探索 [模板](templates.md)
+- 查看 [CLI 参考](../reference/cli-reference.md)
+- 浏览 [示例](../guides/index.md)
diff --git a/docs/zh/concepts/templates.md b/docs/zh/concepts/templates.md
new file mode 100644
index 0000000..4c385e9
--- /dev/null
+++ b/docs/zh/concepts/templates.md
@@ -0,0 +1,172 @@
+# 模板
+
+模板使用声明式 YAML 定义要提取的内容。它们提供了一种强大的方式来指定提取模式,无需编写代码。
+
+## 模板结构
+
+模板由以下部分组成:
+
+1. **元数据**: name、description、author
+2. **类型**: 提取类型(Graph、List、Model 等)
+3. **模式**: 节点、边和字段的定义
+
+## 基本示例
+
+```yaml
+name: 事件时间线
+description: 提取财务事件及其时间关系
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Event
+ properties:
+ - name: description
+ type: string
+ - name: date
+ type: string
+ edges:
+ - type: TIMELINE
+ source: Event
+ target: Event
+ properties:
+ - name: relation
+ type: string
+```
+
+## 模板类型
+
+### 图模板
+
+```yaml
+type: Graph
+schema:
+ nodes:
+ - type: Person
+ - type: Organization
+ edges:
+ - type: WORKS_AT
+ source: Person
+ target: Organization
+```
+
+### 列表模板
+
+```yaml
+type: List
+schema:
+ item:
+ - name: ingredient
+ type: string
+ - name: quantity
+ type: string
+```
+
+### 模型模板
+
+```yaml
+type: Model
+schema:
+ - name: product_name
+ type: string
+ required: true
+ - name: price
+ type: float
+ required: true
+```
+
+## 属性类型
+
+| 类型 | 描述 | 示例 |
+|------|------|------|
+| string | 文本值 | "你好世界" |
+| integer | 整数 | 42 |
+| float | 小数 | 3.14 |
+| boolean | 布尔值 | true |
+| date | 日期值 | 2024-01-15 |
+| array | 值列表 | ["a", "b", "c"] |
+
+## 高级功能
+
+### 验证规则
+
+```yaml
+- name: email
+ type: string
+ pattern: "^[a-zA-Z0-9._%+-]+@[a-z]+.[a-z]{2,}$"
+```
+
+### 枚举
+
+```yaml
+- name: status
+ type: string
+ enum: [pending, active, completed]
+```
+
+### 条件字段
+
+```yaml
+- name: end_date
+ type: date
+ required_if: type == "event"
+```
+
+## 预设模板
+
+Hyper-Extract 包含 6 个领域 80+ 预设模板:
+
+### 金融
+- `finance/earnings_summary`
+- `finance/risk_factors`
+- `finance/ownership_graph`
+
+### 法律
+- `legal/case_facts`
+- `legal/contract_terms`
+- `legal/compliance_requirements`
+
+### 医学
+- `medicine/drug_interactions`
+- `medicine/treatment_plan`
+- `medicine/patient_history`
+
+### 中医
+- `tcm/herb_properties`
+- `tcm/formula_composition`
+- `tcm/syndrome_reasoning`
+
+### 工业
+- `industry/safety_controls`
+- `industry/equipment_topology`
+- `industry/operation_flow`
+
+### 通用
+- `general/biography`
+- `general/concepts`
+- `general/workflow`
+
+## 使用模板
+
+### CLI
+
+```bash
+he parse document.txt -t finance/earnings_summary
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# 加载预设
+ka = Template.create("finance/earnings_summary")
+
+# 加载自定义模板
+ka = Template.from_yaml("my_template.yaml")
+```
+
+## 下一步
+
+- 浏览[模板库](../reference/template-gallery.md)
+- 了解[领域模板](../guides/domain-templates/index.md)
+- 创建您自己的模板
diff --git a/docs/zh/getting-started/configuration.md b/docs/zh/getting-started/configuration.md
new file mode 100644
index 0000000..14c3831
--- /dev/null
+++ b/docs/zh/getting-started/configuration.md
@@ -0,0 +1,76 @@
+# 配置
+
+本指南介绍 Hyper-Extract 的高级配置选项。
+
+## 配置文件
+
+Hyper-Extract 使用 YAML 配置文件。默认位置:`~/.hyper-extract/config.yaml`
+
+## 配置选项
+
+### LLM 设置
+
+```yaml
+llm:
+ provider: openai # openai, anthropic, azure 等
+ model: gpt-4o
+ api_key: ${OPENAI_API_KEY} # 或使用环境变量
+ temperature: 0.0
+ max_tokens: 4096
+```
+
+### Embedding 设置
+
+```yaml
+embedding:
+ provider: openai # openai, huggingface 等
+ model: text-embedding-3-small
+ api_key: ${OPENAI_API_KEY}
+```
+
+### 提取设置
+
+```yaml
+extraction:
+ default_type: AutoGraph
+ max_retries: 3
+ timeout: 60
+ batch_size: 10
+```
+
+### 存储设置
+
+```yaml
+storage:
+ type: local # local, s3 等
+ path: ./output
+ format: json # json, yaml, parquet
+```
+
+## 环境变量
+
+| 变量 | 描述 |
+|------|------|
+| `OPENAI_API_KEY` | OpenAI API 密钥 |
+| `ANTHROPIC_API_KEY` | Anthropic API 密钥 |
+| `HYPER_EXTRACT_CONFIG` | 配置文件路径 |
+
+## CLI 配置
+
+通过 CLI 初始化配置:
+
+```bash
+# 使用 OpenAI 初始化
+he config init -k your-api-key
+
+# 显示当前配置
+he config show
+
+# 更新特定选项
+he config set llm.model gpt-4o-mini
+```
+
+## 下一步
+
+- 探索[核心概念](../concepts/index.md) 了解提取类型
+- 查看 [CLI 参考](../reference/cli-reference.md) 了解所有命令
diff --git a/docs/zh/getting-started/index.md b/docs/zh/getting-started/index.md
new file mode 100644
index 0000000..d8cd8d3
--- /dev/null
+++ b/docs/zh/getting-started/index.md
@@ -0,0 +1,37 @@
+# 快速开始
+
+欢迎使用 Hyper-Extract!本节将帮助您快速上手。
+
+## 本节内容
+
+- [安装](installation.md) - 如何安装 Hyper-Extract
+- [快速教程](quickstart.md) - 运行您的第一次提取
+- [配置](configuration.md) - 配置 API 密钥和设置
+
+## 前置要求
+
+使用 Hyper-Extract 之前,您需要:
+
+- Python 3.9 或更高版本
+- OpenAI API 密钥(或兼容的 LLM API)
+- 基本的 Python 知识
+
+## 选择您的路径
+
+### CLI 用户
+
+如果您更喜欢命令行工具,请查看我们的 [CLI 指南](../guides/cli.md) 获取详细的命令文档。
+
+### Python 开发者
+
+如果您正在使用 Python 构建应用程序,请查看我们的 [Python API 指南](../guides/python-api.md)。
+
+### 模板设计师
+
+如果您想创建自定义提取模板,请查看我们的 [模板设计指南](../concepts/templates.md)。
+
+## 下一步
+
+1. [安装 Hyper-Extract](installation.md)
+2. 尝试[快速教程](quickstart.md)
+3. 探索[核心概念](../concepts/index.md)
diff --git a/docs/zh/getting-started/installation.md b/docs/zh/getting-started/installation.md
new file mode 100644
index 0000000..99539c2
--- /dev/null
+++ b/docs/zh/getting-started/installation.md
@@ -0,0 +1,69 @@
+# 安装
+
+本指南介绍如何安装 Hyper-Extract 及其依赖项。
+
+## 系统要求
+
+- Python 3.9+
+- pip 或 uv 包管理器
+- OpenAI API 密钥(或兼容的 LLM API)
+
+## 安装方法
+
+### 使用 pip
+
+```bash
+pip install hyper-extract
+```
+
+### 使用 uv
+
+```bash
+uv pip install hyper-extract
+```
+
+## 额外依赖安装
+
+针对特定用例安装额外依赖:
+
+```bash
+# 安装所有集成
+pip install hyper-extract[all]
+
+# 安装 OpenAI 支持
+pip install hyper-extract[openai]
+
+# 安装开发工具
+pip install hyper-extract[dev]
+```
+
+## 验证安装
+
+安装后,验证是否正常工作:
+
+```bash
+he --version
+```
+
+您应该看到版本号。
+
+## 设置 API 密钥
+
+Hyper-Extract 需要 LLM 服务的 API 密钥。设置方法:
+
+### 使用环境变量
+
+```bash
+export OPENAI_API_KEY=your-api-key-here
+```
+
+### 使用 CLI
+
+```bash
+he config init -k your-api-key-here
+```
+
+## 下一步
+
+- 继续学习[快速教程](quickstart.md) 运行您的第一次提取
+- 或在[配置](configuration.md)中配置高级选项
diff --git a/docs/zh/getting-started/quickstart.md b/docs/zh/getting-started/quickstart.md
new file mode 100644
index 0000000..a9add0c
--- /dev/null
+++ b/docs/zh/getting-started/quickstart.md
@@ -0,0 +1,80 @@
+# 快速教程
+
+本教程将引导您在 5 分钟内完成从文档中提取知识。
+
+## 第一步:准备文档
+
+从一个简单的文本文档开始。创建名为 `document.txt` 的文件:
+
+```text
+Apple Inc. 报告 2024 年第一季度创纪录的季度收入 1239 亿美元。
+CEO Tim Cook 宣布公司实现了史上最强的 iPhone 销量。
+董事会宣布每股 0.24 美元的现金股息。
+服务业务收入达到历史新高的 223 亿美元。
+```
+
+## 第二步:创建提取模板
+
+Hyper-Extract 使用 YAML 模板来定义要提取的内容。创建 `template.yaml`:
+
+```yaml
+name: 公司新闻摘要
+description: 从新闻文章中提取关键财务事件
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Company
+ properties:
+ - name: name
+ type: string
+ - name: ticker
+ type: string
+ - type: FinancialEvent
+ properties:
+ - name: description
+ type: string
+ - name: amount
+ type: number
+ - name: category
+ type: string
+ edges:
+ - type: ANNOUNCED
+ source: Company
+ target: FinancialEvent
+```
+
+## 第三步:提取知识(CLI)
+
+```bash
+he parse document.txt -o output/ -t template.yaml
+```
+
+## 第四步:提取知识(Python API)
+
+```python
+from hyperextract import Template
+
+# 从 YAML 创建模板
+ka = Template.from_yaml("template.yaml")
+
+# 解析文档
+result = ka.parse("Apple Inc. 报告创纪录的季度收入...")
+
+# 访问结果
+print(result.nodes)
+print(result.edges)
+```
+
+## 第五步:查看结果
+
+提取的知识将保存在您的输出目录中。您可以使用搜索命令:
+
+```bash
+he search output/ "有哪些财务事件?"
+```
+
+## 下一步
+
+- 了解 [8 种自动类型](../concepts/auto-types.md)
+- 探索 [提取方法](../concepts/methods.md)
+- 浏览 [预设模板](../concepts/templates.md)
diff --git a/docs/zh/guides/cli.md b/docs/zh/guides/cli.md
new file mode 100644
index 0000000..7c33477
--- /dev/null
+++ b/docs/zh/guides/cli.md
@@ -0,0 +1,163 @@
+# CLI 指南
+
+Hyper-Extract CLI 提供了强大的命令行界面用于知识提取。
+
+## 安装
+
+CLI 已包含在主包中:
+
+```bash
+pip install hyper-extract
+```
+
+## 基本用法
+
+### 初始化配置
+
+```bash
+he config init -k YOUR_API_KEY
+```
+
+### 解析文档
+
+```bash
+he parse document.txt -o output/
+```
+
+### 搜索提取的知识
+
+```bash
+he search output/ "关键事件有哪些?"
+```
+
+### 添加新文档
+
+```bash
+he feed output/ new_document.txt
+```
+
+## 命令
+
+### config
+
+管理配置:
+
+```bash
+# 初始化
+he config init -k API_KEY
+
+# 显示当前配置
+he config show
+
+# 更新配置
+he config set llm.model gpt-4o-mini
+
+# 列出可用模板
+he config list-templates
+```
+
+### parse
+
+从文档中提取知识:
+
+```bash
+# 基本用法
+he parse input.txt -o output/
+
+# 使用模板
+he parse input.txt -t finance/earnings_summary -o output/
+
+# 指定语言
+he parse input.txt -l zh -o output/
+
+# 批量处理
+he parse ./documents/ -o output/ --batch
+```
+
+### search
+
+查询提取的知识:
+
+```bash
+# 基本搜索
+he search output/ "发生了什么?"
+
+# 使用过滤器
+he search output/ "财务事件" --filter type=Event
+
+# 限制结果数量
+he search output/ "公司" --limit 10
+```
+
+### feed
+
+向现有知识库添加新文档:
+
+```bash
+# 添加单个文档
+he feed output/ new_doc.txt
+
+# 添加多个文档
+he feed output/ ./new_docs/
+```
+
+### list
+
+列出可用模板和预设:
+
+```bash
+# 列出所有模板
+he list
+
+# 按类别列出
+he list --category finance
+
+# 列出领域模板
+he list --domain general
+```
+
+## 选项
+
+### 全局选项
+
+| 选项 | 描述 |
+|------|------|
+| `--help` | 显示帮助信息 |
+| `--version` | 显示版本号 |
+| `--verbose` | 启用详细输出 |
+| `--config PATH` | 使用自定义配置文件 |
+
+### Parse 选项
+
+| 选项 | 描述 |
+|------|------|
+| `-o, --output PATH` | 输出目录 |
+| `-t, --template NAME` | 要使用的模板 |
+| `-l, --language CODE` | 文档语言(en、zh 等)|
+| `--batch` | 启用批量处理 |
+
+## 示例
+
+### 金融文档提取
+
+```bash
+he parse annual_report.pdf -t finance/earnings_summary -o ./results/
+```
+
+### 法律文档提取
+
+```bash
+he parse contract.txt -t legal/case_facts -o ./legal_output/
+```
+
+### 多语言支持
+
+```bash
+he parse chinese_doc.txt -l zh -o ./output/
+```
+
+## 下一步
+
+- 探索 [Python API](python-api.md)
+- 浏览 [领域模板](domain-templates/index.md)
+- 查看 [CLI 参考](../reference/cli-reference.md)
diff --git a/docs/zh/guides/domain-templates/finance.md b/docs/zh/guides/domain-templates/finance.md
new file mode 100644
index 0000000..36f59a4
--- /dev/null
+++ b/docs/zh/guides/domain-templates/finance.md
@@ -0,0 +1,94 @@
+# 金融模板
+
+Hyper-Extract 提供专门的金融文档提取模板。
+
+## 可用模板
+
+### 财报摘要
+
+从财报中提取关键财务指标:
+
+```yaml
+name: earnings_summary
+type: TemporalGraph
+schema:
+ nodes:
+ - type: FinancialMetric
+ - type: Company
+ edges:
+ - type: REPORTED
+```
+
+### 风险因素
+
+从金融文档中提取风险因素:
+
+```yaml
+name: risk_factors
+type: List
+schema:
+ item:
+ - name: category
+ type: string
+ - name: description
+ type: string
+```
+
+### 所有权图
+
+提取所有权关系:
+
+```yaml
+name: ownership_graph
+type: Graph
+schema:
+ nodes:
+ - type: Entity
+ - type: Company
+ edges:
+ - type: OWNS
+```
+
+## 使用示例
+
+### CLI
+
+```bash
+# 提取财报摘要
+he parse earnings_report.pdf -t finance/earnings_summary -o output/
+
+# 提取风险因素
+he parse 10k_filing.txt -t finance/risk_factors -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# 加载金融模板
+ka = Template.create("finance/earnings_summary")
+
+# 从文档提取
+result = ka.parse(earnings_text)
+
+# 访问财务指标
+for metric in result.get_nodes("FinancialMetric"):
+ print(f"{metric.name}: {metric.value}")
+```
+
+## 支持的文档类型
+
+- 年度报告
+- 季度财报
+- 10-K/10-Q 文件
+- 股权研究报告
+- 财经新闻
+- IPO 招股说明书
+- 供应链分析
+
+## 下一步
+
+- [法律模板](legal.md)
+- [医学模板](medicine.md)
+- [模板库](../../reference/template-gallery.md)
diff --git a/docs/zh/guides/domain-templates/index.md b/docs/zh/guides/domain-templates/index.md
new file mode 100644
index 0000000..d9a7f18
--- /dev/null
+++ b/docs/zh/guides/domain-templates/index.md
@@ -0,0 +1,27 @@
+# 领域模板
+
+Hyper-Extract 为各行业和用例提供专用模板。
+
+## 可用领域
+
+- [金融](finance.md) - 金融文档提取
+- [法律](legal.md) - 法律文档提取
+- [医学](medicine.md) - 医疗文档提取
+- [中医](tcm.md) - 中医模板
+
+## 快速开始
+
+### 使用领域模板
+
+```bash
+# CLI
+he parse document.txt -t finance/earnings_summary
+
+# Python API
+ka = Template.create("finance/earnings_summary")
+result = ka.parse(document_text)
+```
+
+## 创建自定义领域模板
+
+请参阅[模板设计指南](../../concepts/templates.md)了解如何创建您自己的领域特定模板。
diff --git a/docs/zh/guides/domain-templates/legal.md b/docs/zh/guides/domain-templates/legal.md
new file mode 100644
index 0000000..cba57d5
--- /dev/null
+++ b/docs/zh/guides/domain-templates/legal.md
@@ -0,0 +1,98 @@
+# 法律模板
+
+Hyper-Extract 提供专门的法律文档提取模板。
+
+## 可用模板
+
+### 案件事实
+
+从判决书中提取事实:
+
+```yaml
+name: case_facts
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Party
+ - type: Event
+ - type: LegalFact
+ edges:
+ - type: PARTICIPATED_IN
+ - type: OCCURRED_ON
+```
+
+### 合同条款
+
+提取合同义务:
+
+```yaml
+name: contract_terms
+type: List
+schema:
+ item:
+ - name: clause_type
+ type: string
+ - name: parties
+ type: array
+ - name: obligations
+ type: string
+```
+
+### 合规要求
+
+提取合规要求:
+
+```yaml
+name: compliance_requirements
+type: List
+schema:
+ item:
+ - name: regulation
+ type: string
+ - name: requirement
+ type: string
+ - name: deadline
+ type: date
+```
+
+## 使用示例
+
+### CLI
+
+```bash
+# 提取案件事实
+he parse judgment.txt -t legal/case_facts -o output/
+
+# 提取合同条款
+he parse contract.pdf -t legal/contract_terms -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# 加载法律模板
+ka = Template.create("legal/case_facts")
+
+# 从文档提取
+result = ka.parse(judgment_text)
+
+# 访问当事人
+for party in result.get_nodes("Party"):
+ print(f"Party: {party.name}")
+```
+
+## 支持的文档类型
+
+- 法院判决
+- 法律合同
+- 合规文件
+- 法律论文
+- 监管文件
+
+## 下一步
+
+- [金融模板](finance.md)
+- [医学模板](medicine.md)
+- [模板库](../../reference/template-gallery.md)
diff --git a/docs/zh/guides/domain-templates/medicine.md b/docs/zh/guides/domain-templates/medicine.md
new file mode 100644
index 0000000..9a3563a
--- /dev/null
+++ b/docs/zh/guides/domain-templates/medicine.md
@@ -0,0 +1,98 @@
+# 医学模板
+
+Hyper-Extract 提供专门的医疗文档提取模板。
+
+## 可用模板
+
+### 药物相互作用
+
+提取药物相互作用信息:
+
+```yaml
+name: drug_interactions
+type: Graph
+schema:
+ nodes:
+ - type: Drug
+ - type: Interaction
+ edges:
+ - type: INTERACTS_WITH
+ - type: CAUSES
+```
+
+### 治疗计划
+
+提取治疗计划详情:
+
+```yaml
+name: treatment_plan
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Treatment
+ - type: Medication
+ - type: Procedure
+ edges:
+ - type: INCLUDES
+ - type: SCHEDULED_FOR
+```
+
+### 患者病史
+
+提取患者病史:
+
+```yaml
+name: patient_history
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Condition
+ - type: Treatment
+ - type: Medication
+ edges:
+ - type: DIAGNOSED_ON
+ - type: TREATED_WITH
+```
+
+## 使用示例
+
+### CLI
+
+```bash
+# 提取药物相互作用
+he parse clinical_note.txt -t medicine/drug_interactions -o output/
+
+# 提取治疗计划
+he parse discharge_summary.pdf -t medicine/treatment_plan -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# 加载医学模板
+ka = Template.create("medicine/drug_interactions")
+
+# 从文档提取
+result = ka.parse(clinical_text)
+
+# 访问药物信息
+for drug in result.get_nodes("Drug"):
+ print(f"Drug: {drug.name}")
+```
+
+## 支持的文档类型
+
+- 临床指南
+- 出院小结
+- 药品说明书
+- 病理报告
+- 医学教科书
+- 临床笔记
+
+## 下一步
+
+- [中医模板](tcm.md)
+- [金融模板](finance.md)
+- [模板库](../../reference/template-gallery.md)
diff --git a/docs/zh/guides/domain-templates/tcm.md b/docs/zh/guides/domain-templates/tcm.md
new file mode 100644
index 0000000..80f2929
--- /dev/null
+++ b/docs/zh/guides/domain-templates/tcm.md
@@ -0,0 +1,112 @@
+# 中医模板
+
+Hyper-Extract 提供专门的中医(Traditional Chinese Medicine)文档提取模板。
+
+## 可用模板
+
+### 中药属性
+
+提取中药属性:
+
+```yaml
+name: herb_properties
+type: Model
+schema:
+ - name: herb_name
+ type: string
+ - name: properties
+ type: array
+ - name: channels
+ type: array
+ - name: indications
+ type: array
+```
+
+### 方剂组成
+
+提取方剂组成:
+
+```yaml
+name: formula_composition
+type: List
+schema:
+ item:
+ - name: herb_name
+ type: string
+ - name: dosage
+ type: string
+ - name: role
+ type: string
+```
+
+### 经络图
+
+提取经络关系:
+
+```yaml
+name: meridian_graph
+type: Graph
+schema:
+ nodes:
+ - type: Herb
+ - type: Meridian
+ edges:
+ - type: ENTERS
+```
+
+### 证候推理
+
+提取证候诊断和推理:
+
+```yaml
+name: syndrome_reasoning
+type: TemporalGraph
+schema:
+ nodes:
+ - type: Syndrome
+ - type: Pattern
+ - type: Treatment
+```
+
+## 使用示例
+
+### CLI
+
+```bash
+# 提取中药属性
+he parse herbal_compendium.txt -t tcm/herb_properties -o output/
+
+# 提取方剂组成
+he parse prescription.txt -t tcm/formula_composition -o output/
+```
+
+### Python API
+
+```python
+from hyperextract import Template
+
+# 加载中医模板
+ka = Template.create("tcm/herb_properties")
+
+# 从文档提取
+result = ka.parse(herbal_text)
+
+# 访问中药信息
+for herb in result.get_nodes("Herb"):
+ print(f"Herb: {herb.name}")
+ print(f"Properties: {herb.properties}")
+```
+
+## 支持的文档类型
+
+- 本草纲目
+- 处方单
+- 医案记录
+- 经络论述
+- 方剂药典
+
+## 下一步
+
+- [医学模板](medicine.md)
+- [金融模板](finance.md)
+- [模板库](../../reference/template-gallery.md)
diff --git a/docs/zh/guides/index.md b/docs/zh/guides/index.md
new file mode 100644
index 0000000..e798c43
--- /dev/null
+++ b/docs/zh/guides/index.md
@@ -0,0 +1,34 @@
+# 使用指南
+
+本节提供 Hyper-Extract 的逐步教程和操作指南。
+
+## 本节内容
+
+- [CLI 指南](cli.md) - 命令行界面文档
+- [Python API](python-api.md) - Python API 使用指南
+- [领域模板](domain-templates/index.md) - 特定领域的模板
+
+## 热门指南
+
+### CLI 入门
+
+学习如何使用命令行界面进行快速提取任务。
+
+### Python API 教程
+
+通过详细示例使用 Python API 构建应用程序。
+
+### 领域特定模板
+
+使用金融、法律、医学等的预构建模板。
+
+## 快速链接
+
+- [金融模板](domain-templates/finance.md) - 金融文档提取
+- [法律模板](domain-templates/legal.md) - 法律文档提取
+- [医学模板](domain-templates/medicine.md) - 医疗文档提取
+- [中医模板](domain-templates/tcm.md) - 中医模板
+
+## 示例学习
+
+查看我们的[示例代码库](https://github.com/hyper-extract/hyper-extract/tree/main/examples)获取完整的工作示例。
diff --git a/docs/zh/guides/python-api.md b/docs/zh/guides/python-api.md
new file mode 100644
index 0000000..5101c36
--- /dev/null
+++ b/docs/zh/guides/python-api.md
@@ -0,0 +1,209 @@
+# Python API
+
+本指南介绍如何在 Python 应用程序中使用 Hyper-Extract。
+
+## 安装
+
+```bash
+pip install hyper-extract
+```
+
+## 基本用法
+
+### 导入和初始化
+
+```python
+from hyperextract import Template
+
+# 加载预设模板
+ka = Template.create("general/biography")
+
+# 解析文档
+result = ka.parse(text)
+```
+
+### 使用自定义模板
+
+```python
+from hyperextract import Template
+
+# 从 YAML 加载
+ka = Template.from_yaml("template.yaml")
+
+# 解析文档
+result = ka.parse(document_text)
+
+# 访问结果
+print(result.nodes)
+print(result.edges)
+```
+
+## 自动类型
+
+### AutoModel
+
+```python
+from hyperextract import AutoModel
+from pydantic import BaseModel
+
+class Person(BaseModel):
+ name: str
+ age: int
+ occupation: str
+
+extractor = AutoModel(schema=Person)
+result = extractor.parse("John 是一位 30 岁的工程师。")
+```
+
+### AutoList
+
+```python
+from hyperextract import AutoList
+
+extractor = AutoList(item_type="string")
+result = extractor.parse("配料包括面粉、糖和鸡蛋。")
+print(result.items) # ["面粉", "糖", "鸡蛋"]
+```
+
+### AutoGraph
+
+```python
+from hyperextract import AutoGraph
+
+extractor = AutoGraph(
+ node_types=["Person", "Organization"],
+ edge_types=["WORKS_AT"]
+)
+result = extractor.parse("Alice 在 Google 工作。")
+```
+
+### AutoHypergraph
+
+```python
+from hyperextract import AutoHypergraph
+
+extractor = AutoHypergraph()
+result = extractor.parse("Alice、Bob 和 Carol 合作了。")
+```
+
+## 提取方法
+
+### 使用 atom
+
+```python
+from hyperextract.methods import atom
+
+result = atom.extract(text, schema=MySchema)
+```
+
+### 使用 graph_rag
+
+```python
+from hyperextract.methods import graph_rag
+
+result = graph_rag.extract(
+ text,
+ node_types=["Person", "Company"],
+ edge_types=["WORKS_AT"]
+)
+```
+
+### 使用 cog_rag
+
+```python
+from hyperextract.methods import cog_rag
+
+result = cog_rag.extract(
+ text,
+ task="提取因果关系"
+)
+```
+
+## 配置
+
+### LLM 配置
+
+```python
+from hyperextract import Config
+
+config = Config(
+ llm_provider="openai",
+ llm_model="gpt-4o",
+ api_key="your-api-key"
+)
+
+ka = Template.create("general/biography", config=config)
+```
+
+### Embedding 配置
+
+```python
+config = Config(
+ embedding_provider="openai",
+ embedding_model="text-embedding-3-small"
+)
+```
+
+## 处理结果
+
+### 访问节点
+
+```python
+result = ka.parse(text)
+
+for node in result.nodes:
+ print(f"{node.type}: {node.properties}")
+```
+
+### 访问边
+
+```python
+for edge in result.edges:
+ print(f"{edge.source} --[{edge.type}]--> {edge.target}")
+```
+
+### 序列化
+
+```python
+# 保存为 JSON
+result.to_json("output.json")
+
+# 保存为 YAML
+result.to_yaml("output.yaml")
+
+# 从文件加载
+loaded = Result.from_json("output.json")
+```
+
+## 高级用法
+
+### 自定义解析器
+
+```python
+from hyperextract import Template
+from hyperextract.parsers import CustomParser
+
+class MyParser(CustomParser):
+ def parse(self, text):
+ # 自定义解析逻辑
+ return processed_result
+
+ka = Template(parser=MyParser())
+```
+
+### 批量处理
+
+```python
+from hyperextract import Template
+
+ka = Template.create("general/biography")
+
+documents = ["doc1.txt", "doc2.txt", "doc3.txt"]
+results = ka.batch_parse(documents)
+```
+
+## 下一步
+
+- 探索 [CLI](cli.md)
+- 浏览 [领域模板](domain-templates/index.md)
+- 查看 [参考](../reference/index.md)
diff --git a/docs/zh/index.md b/docs/zh/index.md
new file mode 100644
index 0000000..b97b5b6
--- /dev/null
+++ b/docs/zh/index.md
@@ -0,0 +1,77 @@
+# Hyper-Extract
+
+> **"告别文档焦虑,让信息一目了然"**
+
+**一行命令,将文档转化为结构化知识摘要。**
+
+[![Python Version](https://img.shields.io/badge/python-3.9%2B-blue)](https://python.org)
+[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
+[![Status](https://img.shields.io/badge/status-active-success)]()
+
+## 什么是 Hyper-Extract?
+
+Hyper-Extract 是一个智能的、基于 LLM 的知识提取与演化框架。它极大地简化了将高度非结构化文本转换为持久化、可预测、强类型知识摘要的过程。它能够轻松地将信息提取为多种格式——从简单的**集合**(列表/集合)和 **Pydantic 模型**,到复杂的**知识图谱**、**超图**,甚至**时空图**。
+
+## 核心特性
+
+- 🔷 **8 种自动类型:** 从基础的 `AutoModel`/`AutoList` 到高级的 `AutoGraph`、`AutoHypergraph` 和 `AutoSpatioTemporalGraph`。
+- 🧠 **10+ 提取引擎:** 开箱即用的前沿检索范式支持,如 `graph_rag`、`light_rag` 和 `hyper_rag`。
+- 📝 **声明式 YAML 模板:** 零代码提取定义。包含 6 个领域 80+ 预设模板。
+- 🔄 **增量演化:** 动态输入新文档,持续扩展和更新提取的知识。
+
+## 快速开始
+
+### 安装
+
+```bash
+uv pip install hyper-extract
+```
+
+### 命令行方式
+
+```bash
+he config init -k YOUR_API_KEY
+he parse document.md -o ./output/ -l zh
+he search ./output/ "关键事件有哪些?"
+he feed ./output/ new_document.md
+```
+
+### Python API 方式
+
+```python
+from hyperextract import Template
+
+# 加载预设 YAML 模板
+ka = Template.create("finance/event_timeline")
+
+# 提取并自动解析文档
+result = ka.parse(annual_report_text)
+```
+
+## 文档
+
+- [快速开始](getting-started/index.md) - 快速上手
+- [核心概念](concepts/index.md) - 理解核心概念
+- [使用指南](guides/index.md) - 逐步教程
+- [参考文档](reference/index.md) - API 和配置参考
+
+## 8 种自动类型
+
+| 类型 | 描述 |
+|------|------|
+| AutoModel | Pydantic 模型提取 |
+| AutoList | 列表/集合提取 |
+| AutoSet | 唯一集合提取 |
+| AutoGraph | 知识图谱提取 |
+| AutoHypergraph | 超图提取 |
+| AutoTemporalGraph | 时序知识图谱 |
+| AutoSpatialGraph | 空间知识图谱 |
+| AutoSpatioTemporalGraph | 时空知识图谱 |
+
+## 架构
+
+系统构建在稳固的三元组上:**自动类型**(多类型结构)、**方法**(执行策略)和**模板**(声明式模式)。
+
+## 许可证
+
+基于 **Apache-2.0** 许可证。
diff --git a/docs/zh/reference/cli-reference.md b/docs/zh/reference/cli-reference.md
new file mode 100644
index 0000000..1ed6fbd
--- /dev/null
+++ b/docs/zh/reference/cli-reference.md
@@ -0,0 +1,134 @@
+# CLI 参考
+
+Hyper-Extract 所有 CLI 命令的完整参考。
+
+## 命令概览
+
+| 命令 | 描述 |
+|------|------|
+| `he config` | 管理配置 |
+| `he parse` | 从文档提取知识 |
+| `he search` | 查询提取的知识 |
+| `he feed` | 向知识库添加新文档 |
+| `he list` | 列出可用模板 |
+
+## config
+
+管理 Hyper-Extract 配置。
+
+### 语法
+
+```bash
+he config <action> [options]
+```
+
+### 操作
+
+#### init
+
+初始化配置:
+
+```bash
+he config init -k API_KEY [--provider PROVIDER]
+```
+
+#### show
+
+显示当前配置:
+
+```bash
+he config show [--format json|yaml]
+```
+
+#### set
+
+更新配置选项:
+
+```bash
+he config set KEY VALUE
+```
+
+#### list-templates
+
+列出可用模板:
+
+```bash
+he config list-templates [--category CATEGORY]
+```
+
+## parse
+
+从文档中提取知识。
+
+### 语法
+
+```bash
+he parse <input> [options]
+```
+
+### 选项
+
+| 选项 | 描述 | 默认值 |
+|------|------|--------|
+| `-o, --output` | 输出目录 | 必需 |
+| `-t, --template` | 模板名称 | 自动检测 |
+| `-l, --language` | 文档语言 | 自动检测 |
+| `--method` | 提取方法 | 默认 |
+| `--batch` | 批量处理 | False |
+| `--format` | 输出格式 | json |
+
+## search
+
+查询提取的知识。
+
+### 语法
+
+```bash
+he search <knowledge_base> <query> [options]
+```
+
+### 选项
+
+| 选项 | 描述 | 默认值 |
+|------|------|--------|
+| `--filter` | 按节点/边类型过滤 | 无 |
+| `--limit` | 最大结果数 | 10 |
+| `--format` | 输出格式 | json |
+
+## feed
+
+向现有知识库添加新文档。
+
+### 语法
+
+```bash
+he feed <knowledge_base> <documents...> [options]
+```
+
+## list
+
+列出可用模板。
+
+### 语法
+
+```bash
+he list [options]
+```
+
+### 选项
+
+| 选项 | 描述 | 默认值 |
+|------|------|--------|
+| `--category` | 按类别过滤 | 全部 |
+| `--domain` | 按领域过滤 | 全部 |
+| `--format` | 输出格式 | table |
+
+## 全局选项
+
+| 选项 | 描述 |
+|------|------|
+| `--help` | 显示帮助信息 |
+| `--version` | 显示版本号 |
+| `--verbose` | 启用详细输出 |
+| `--debug` | 启用调试模式 |
+| `--config PATH` | 自定义配置文件 |
diff --git a/docs/zh/reference/index.md b/docs/zh/reference/index.md
new file mode 100644
index 0000000..f9eb73b
--- /dev/null
+++ b/docs/zh/reference/index.md
@@ -0,0 +1,21 @@
+# 参考文档
+
+本节提供详细的 API 和配置参考文档。
+
+## 本节内容
+
+- [CLI 参考](cli-reference.md) - 完整的 CLI 命令参考
+- [模板库](template-gallery.md) - 所有可用模板
+
+## API 参考
+
+详细的 Python API 文档,请参阅 [API 文档](https://hyper-extract.readthedocs.io/)。
+
+## 配置参考
+
+请参阅[配置指南](../getting-started/configuration.md)了解配置选项。
+
+## 下一步
+
+- [CLI 参考](cli-reference.md)
+- [模板库](template-gallery.md)
diff --git a/docs/zh/reference/template-gallery.md b/docs/zh/reference/template-gallery.md
new file mode 100644
index 0000000..ee0e550
--- /dev/null
+++ b/docs/zh/reference/template-gallery.md
@@ -0,0 +1,99 @@
+# 模板库
+
+Hyper-Extract 中所有可用预设模板的完整列表。
+
+## 金融模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `finance/earnings_summary` | 提取财报亮点 |
+| `finance/risk_factor_set` | 提取风险因素 |
+| `finance/ownership_graph` | 提取所有权关系 |
+| `finance/event_timeline` | 提取财务事件时间线 |
+| `finance/sentiment_model` | 提取情感分析 |
+
+## 法律模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `legal/case_facts` | 从判决书中提取案件事实 |
+| `legal/case_citation` | 提取法律引用 |
+| `legal/contract_obligation` | 提取合同义务 |
+| `legal/compliance_list` | 提取合规要求 |
+| `legal/defined_term_set` | 提取定义术语 |
+| `legal/case_fact_timeline` | 提取案件事实时间线 |
+
+## 医学模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `medicine/drug_interaction` | 提取药物相互作用 |
+| `medicine/treatment_map` | 提取治疗计划 |
+| `medicine/anatomy_graph` | 提取解剖学关系 |
+| `medicine/hospital_timeline` | 提取患者住院时间线 |
+| `medicine/discharge_instruction` | 提取出院指导 |
+
+## 中医模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `tcm/herb_property` | 提取中药属性 |
+| `tcm/formula_composition` | 提取方剂组成 |
+| `tcm/herb_relation` | 提取中药关系 |
+| `tcm/meridian_graph` | 提取经络关系 |
+| `tcm/syndrome_reasoning` | 提取证候推理 |
+
+## 工业模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `industry/safety_control` | 提取安全控制 |
+| `industry/equipment_topology` | 提取设备关系 |
+| `industry/operation_flow` | 提取操作流程 |
+| `industry/failure_case` | 提取故障案例分析 |
+| `industry/emergency_response` | 提取应急程序 |
+
+## 通用模板
+
+### 核心模板
+
+| 模板 | 描述 |
+|------|------|
+| `general/biography` | 提取传记信息 |
+| `general/concepts` | 提取概念关系 |
+| `general/workflow` | 提取工作流程步骤 |
+| `general/doc_structure` | 提取文档结构 |
+| `general/base_model` | 基本模型提取 |
+| `general/base_list` | 基本列表提取 |
+| `general/base_set` | 基本集合提取 |
+| `general/base_graph` | 基本图提取 |
+| `general/base_hypergraph` | 基本超图提取 |
+
+## 使用模板
+
+### CLI
+
+```bash
+he parse document.txt -t <template_name>
+```
+
+### Python API
+
+```python
+ka = Template.create("<template_name>")
+result = ka.parse(document_text)
+```
+
+## 创建自定义模板
+
+请参阅[模板设计指南](../concepts/templates.md)了解如何创建您自己的模板。
diff --git a/docs/zh/resources/contributing.md b/docs/zh/resources/contributing.md
new file mode 100644
index 0000000..f4a1b15
--- /dev/null
+++ b/docs/zh/resources/contributing.md
@@ -0,0 +1,116 @@
+# 贡献
+
+感谢您对 Hyper-Extract 贡献的兴趣!
+
+## 贡献方式
+
+### 报告错误
+
+通过提交 GitHub issue 报告错误,包括:
+- 错误的清晰描述
+- 重现步骤
+- 预期与实际行为
+- 环境信息(Python 版本、操作系统等)
+
+### 提出功能建议
+
+我们欢迎功能建议!请:
+1. 检查现有 issue 以避免重复
+2. 清晰描述用例
+3. 解释预期行为
+
+### 贡献代码
+
+#### 开发环境设置
+
+1. Fork 仓库
+2. 克隆您的 fork:
+ ```bash
+ git clone https://github.com/YOUR_USERNAME/hyper-extract.git
+ cd hyper-extract
+ ```
+
+3. 创建虚拟环境:
+ ```bash
+ python -m venv env
+ source env/bin/activate # Windows: env\Scripts\activate
+ ```
+
+4. 安装开发依赖:
+ ```bash
+ pip install -e ".[dev]"
+ ```
+
+5. 安装预提交钩子:
+ ```bash
+ pre-commit install
+ ```
+
+#### 开发工作流程
+
+1. 创建功能分支:
+ ```bash
+ git checkout -b feature/your-feature-name
+ ```
+
+2. 进行更改
+3. 运行测试:
+ ```bash
+ pytest tests/
+ ```
+
+4. 运行代码检查:
+ ```bash
+ ruff check .
+ ```
+
+5. 提交您的更改:
+ ```bash
+ git commit -m "Add your feature"
+ ```
+
+6. 推送并创建 Pull Request
+
+#### 代码风格
+
+- 遵循 PEP 8
+- 使用类型提示
+- 编写文档字符串
+- 为新功能添加测试
+
+### 贡献文档
+
+文档改进始终受欢迎:
+- 修复拼写错误或不清楚的解释
+- 添加示例
+- 改进翻译
+- 更新过时内容
+
+### 翻译贡献
+
+我们欢迎翻译贡献:
+1. 检查现有翻译
+2. 遵循[翻译指南](./translation-guide.md)
+3. 通过 PR 提交翻译
+
+## Pull Request 指南
+
+1. 引用相关 issue
+2. 为新功能包含测试
+3. 根据需要更新文档
+4. 遵循代码风格指南
+5. 确保所有测试通过
+
+## 开发资源
+
+- [GitHub 仓库](https://github.com/hyper-extract/hyper-extract)
+- [Issue 追踪器](https://github.com/hyper-extract/hyper-extract/issues)
+- [讨论区](https://github.com/hyper-extract/hyper-extract/discussions)
+
+## 行为准则
+
+请在所有互动中保持尊重和建设性。我们遵循[贡献者公约](https://www.contributor-covenant.org/)。
+
+## 许可证
+
+通过贡献,您同意您的贡献将在 Apache 2.0 许可证下获得许可。
diff --git a/docs/zh/resources/faq.md b/docs/zh/resources/faq.md
new file mode 100644
index 0000000..b9fb2f3
--- /dev/null
+++ b/docs/zh/resources/faq.md
@@ -0,0 +1,106 @@
+# 常见问题
+
+关于 Hyper-Extract 的常见问题。
+
+## 概述
+
+### 什么是 Hyper-Extract?
+
+Hyper-Extract 是一个智能的、基于 LLM 的知识提取框架,可将非结构化文档转换为结构化知识表示。
+
+### Hyper-Extract 可以处理哪些类型的文档?
+
+Hyper-Extract 可以处理各种文档类型,包括:
+- 纯文本文件
+- PDF
+- Markdown 文件
+- HTML 文档
+- Word 文档
+
+### 支持哪些语言?
+
+Hyper-Extract 支持多种语言,包括英语、中文、日语、韩语等。
+
+## 安装
+
+### 如何安装 Hyper-Extract?
+
+```bash
+pip install hyper-extract
+```
+
+### 系统要求是什么?
+
+- Python 3.9 或更高版本
+- OpenAI API 密钥(或兼容的 LLM API)
+
+## 使用
+
+### 如何从文档中提取知识?
+
+使用 CLI:
+```bash
+he parse document.txt -o output/
+```
+
+使用 Python API:
+```python
+from hyperextract import Template
+ka = Template.create("general/biography")
+result = ka.parse(document_text)
+```
+
+### 如何选择正确的模板?
+
+根据以下条件选择模板:
+1. 文档类型(金融、法律、医学等)
+2. 提取目标(实体、关系、列表等)
+3. 所需输出格式(图、列表、模型等)
+
+### 如何创建自定义模板?
+
+请参阅[模板设计指南](../concepts/templates.md)了解如何创建自定义模板。
+
+## 故障排除
+
+### API 密钥问题
+
+**错误:"未找到 API 密钥"**
+
+解决方案:使用以下方式设置 API 密钥:
+```bash
+he config init -k YOUR_API_KEY
+```
+
+### 提取质量问题
+
+**提取质量低**
+
+改进提示:
+1. 使用领域特定模板
+2. 提供清晰的提取说明
+3. 使用更长的上下文窗口
+4. 调整温度设置
+
+### 性能问题
+
+**提取速度慢**
+
+优化提示:
+1. 使用 `light_rag` 方法加快提取速度
+2. 批量处理多个文档
+3. 使用适当的批量大小
+
+## 贡献
+
+### 如何贡献?
+
+请参阅[贡献指南](contributing.md)了解如何贡献。
+
+### 如何报告错误?
+
+请在我们的 GitHub 仓库上提交问题,包括:
+- 错误的详细描述
+- 重现步骤
+- 预期与实际行为
+- 环境信息
diff --git a/docs/zh/resources/index.md b/docs/zh/resources/index.md
new file mode 100644
index 0000000..7e5802d
--- /dev/null
+++ b/docs/zh/resources/index.md
@@ -0,0 +1,19 @@
+# 资源
+
+本节提供常见问题解答、故障排除和贡献指南。
+
+## 本节内容
+
+- [常见问题](faq.md) - 常见问题及解答
+- [故障排除](troubleshooting.md) - 问题和解决方案
+- [贡献指南](contributing.md) - 如何贡献
+
+## 需要帮助?
+
+- 查看 [常见问题](faq.md)
+- 阅读 [故障排除](troubleshooting.md)
+- 访问 [GitHub Issues](https://github.com/hyper-extract/hyper-extract/issues)
+
+## 贡献
+
+我们欢迎各种贡献!请参阅[贡献指南](contributing.md)了解如何参与。
diff --git a/docs/zh/resources/troubleshooting.md b/docs/zh/resources/troubleshooting.md
new file mode 100644
index 0000000..ba5a0ac
--- /dev/null
+++ b/docs/zh/resources/troubleshooting.md
@@ -0,0 +1,149 @@
+# 故障排除
+
+Hyper-Extract 的常见问题和解决方案。
+
+## 安装问题
+
+### 包安装失败
+
+**问题**: `pip install hyper-extract` 失败
+
+**解决方案**:
+1. 升级 pip:
+ ```bash
+ pip install --upgrade pip
+ ```
+
+2. 使用虚拟环境:
+ ```bash
+ python -m venv env
+ source env/bin/activate # Windows: env\Scripts\activate
+ pip install hyper-extract
+ ```
+
+### 依赖冲突
+
+**问题**: 与其他包的依赖冲突
+
+**解决方案**: 创建干净的虚拟环境:
+```bash
+python -m venv hyper-extract-env
+source hyper-extract-env/bin/activate
+pip install hyper-extract
+```
+
+## API 问题
+
+### API 密钥无效
+
+**问题**: "API 密钥无效" 错误
+
+**解决方案**:
+1. 验证您的 API 密钥是否正确
+2. 检查密钥是否已过期
+3. 确保有足够的额度/配额
+
+### 速率限制
+
+**问题**: "超出速率限制" 错误
+
+**解决方案**:
+1. 在请求之间添加延迟
+2. 使用批量处理
+3. 在配置中减少 `max_workers`
+
+### 超时错误
+
+**问题**: 请求超时
+
+**解决方案**:
+1. 在配置中增加超时时间:
+ ```yaml
+ extraction:
+ timeout: 120
+ ```
+2. 使用更小的文档块
+3. 检查网络连接
+
+## 提取问题
+
+### 空结果
+
+**问题**: 提取返回无结果
+
+**解决方案**:
+1. 验证文档包含可提取的内容
+2. 检查模板是否匹配文档类型
+3. 查看提取日志中的错误
+
+### 提取不正确
+
+**问题**: 提取的数据不正确或不完整
+
+**解决方案**:
+1. 使用更具体的模板
+2. 在模板描述中添加提取提示
+3. 尝试不同的提取方法
+4. 调整置信度阈值
+
+### 内存问题
+
+**问题**: 内存不足错误
+
+**解决方案**:
+1. 以更小的批次处理文档
+2. 减少批量大小
+3. 定期清除缓存
+
+## 性能问题
+
+### 提取缓慢
+
+**问题**: 提取非常慢
+
+**解决方案**:
+1. 使用更快的提取方法:
+ ```python
+ result = atom.extract(text) # 最快
+ ```
+
+2. 启用并行处理:
+ ```python
+ results = ka.batch_parse(docs, parallel=True)
+ ```
+
+3. 使用更轻量的模型加快处理速度
+
+## CLI 问题
+
+### 命令未找到
+
+**问题**: 找不到 `he` 命令
+
+**解决方案**:
+1. 重新安装包:
+ ```bash
+ pip uninstall hyper-extract
+ pip install hyper-extract
+ ```
+
+2. 直接使用 Python 模块:
+ ```bash
+ python -m hyperextract parse document.txt
+ ```
+
+### 未找到配置
+
+**问题**: CLI 找不到配置
+
+**解决方案**: 初始化配置:
+```bash
+he config init -k YOUR_API_KEY
+```
+
+## 仍然有问题?
+
+如果您仍然遇到问题:
+1. 查看[常见问题](faq.md)
+2. 搜索现有的 [GitHub Issues](https://github.com/hyper-extract/hyper-extract/issues)
+3. 创建包含详细信息的新问题
diff --git a/mkdocs.yml b/mkdocs.yml
index e69de29..898d8f6 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -0,0 +1,117 @@
+# Hyper-Extract Documentation Configuration
+
+site_name: Hyper-Extract
+site_description: LLM-powered knowledge extraction framework
+site_author: Hyper-Extract Team
+site_url: https://hyper-extract.github.io/
+
+repo_name: hyper-extract/hyper-extract
+repo_url: https://github.com/hyper-extract/hyper-extract
+edit_uri: edit/main/docs/
+
+theme:
+ name: material
+ language: en
+ features:
+ - navigation.instant
+ - navigation.tabs
+ - navigation.sections
+ - navigation.indexes
+ - toc.integrate
+ - toc.follow
+ - search.suggest
+ - search.highlight
+ - content.code.copy
+ - content.code.annotate
+ palette:
+ - media: "(prefers-color-scheme: light)"
+ scheme: default
+ primary: indigo
+ accent: indigo
+ toggle:
+ icon: material/brightness-7
+ name: Switch to dark mode
+ - media: "(prefers-color-scheme: dark)"
+ scheme: slate
+ primary: indigo
+ accent: indigo
+ toggle:
+ icon: material/brightness-4
+ name: Switch to light mode
+ font:
+ text: Roboto
+ code: Roboto Mono
+
+plugins:
+ - search:
+ separator: '[\s\-,:!=\[\]()"/]+|(?<!:)(?://|(?<!--))'
+ - i18n:
+ docs_structure: folder
+ fallback_to_default: true
+ reconfigure_material: true
+ reconfigure_search: true
+
+extra:
+ social:
+ - icon: fontawesome/brands/github
+ link: https://github.com/hyper-extract/hyper-extract
+ generator: false
+ alternate:
+ - name: English
+ link: /en/
+ lang: en
+ - name: 中文
+ link: /zh/
+ lang: zh
+
+nav:
+ - Home: en/index.md
+ - Getting Started:
+ - en/getting-started/index.md
+ - en/getting-started/installation.md
+ - en/getting-started/quickstart.md
+ - en/getting-started/configuration.md
+ - Concepts:
+ - en/concepts/index.md
+ - en/concepts/auto-types.md
+ - en/concepts/methods.md
+ - en/concepts/templates.md
+ - Guides:
+ - en/guides/index.md
+ - en/guides/cli.md
+ - en/guides/python-api.md
+ - en/guides/domain-templates/index.md
+ - en/guides/domain-templates/finance.md
+ - en/guides/domain-templates/legal.md
+ - en/guides/domain-templates/medicine.md
+ - en/guides/domain-templates/tcm.md
+ - Reference:
+ - en/reference/index.md
+ - en/reference/cli-reference.md
+ - en/reference/template-gallery.md
+ - Resources:
+ - en/resources/faq.md
+ - en/resources/troubleshooting.md
+ - en/resources/contributing.md
+
+markdown_extensions:
+ - pymdownx.highlight:
+ anchor_linenums: true
+ - pymdownx.inlinehilite
+ - pymdownx.snippets
+ - pymdownx.superfences
+ - admonition
+ - pymdownx.details
+ - tables
+ - toc:
+ permalink: true
+ - attr_list
+ - md_in_html
+ - pymdownx.emoji:
+ emoji_index: !!python/name:materialx.emoji.material
+ emoji_generator: !!python/name:materialx.emoji.material
+ - pymdownx.mark
+ - attr_list
+
+extra_css:
+ - stylesheets/extra.css
diff --git a/pyproject.toml b/pyproject.toml
index be483ee..a98d5fe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,6 +47,7 @@ dependencies = [
dev = [
"mkdocs>=1.6.1",
"mkdocs-material>=9.7.1",
+ "mkdocs-static-i18n>=1.0.0",
"mkdocstrings[python]>=1.0.0",
"pytest>=9.0.2",
]
diff --git a/uv.lock b/uv.lock
index 5fd18c4..3d07d7f 100644
--- a/uv.lock
+++ b/uv.lock
@@ -902,12 +902,12 @@ dependencies = [
{ name = "langchain" },
{ name = "langchain-community" },
{ name = "langchain-openai" },
- { name = "loguru" },
{ name = "ontomem" },
{ name = "ontosight" },
{ name = "python-dotenv" },
{ name = "rich" },
{ name = "semhash" },
+ { name = "structlog" },
{ name = "tomli-w" },
{ name = "typer" },
]
@@ -928,6 +928,7 @@ google = [
dev = [
{ name = "mkdocs" },
{ name = "mkdocs-material" },
+ { name = "mkdocs-static-i18n" },
{ name = "mkdocstrings", extra = ["python"] },
{ name = "pytest" },
]
@@ -941,12 +942,12 @@ requires-dist = [
{ name = "langchain-community", specifier = ">=0.4.1" },
{ name = "langchain-google-genai", marker = "extra == 'google'", specifier = ">=2.1.0" },
{ name = "langchain-openai", specifier = ">=1.1.7" },
- { name = "loguru", specifier = ">=0.7.3" },
{ name = "ontomem", specifier = ">=0.2.3" },
{ name = "ontosight", specifier = ">=0.1.5" },
{ name = "python-dotenv", specifier = ">=1.2.1" },
{ name = "rich", specifier = ">=13.7.0" },
{ name = "semhash", specifier = ">=0.3.2" },
+ { name = "structlog", specifier = ">=25.0.0" },
{ name = "tomli-w", specifier = ">=1.0.0" },
{ name = "typer", specifier = ">=0.13.0" },
]
@@ -956,6 +957,7 @@ provides-extras = ["anthropic", "google", "all"]
dev = [
{ name = "mkdocs", specifier = ">=1.6.1" },
{ name = "mkdocs-material", specifier = ">=9.7.1" },
+ { name = "mkdocs-static-i18n", specifier = ">=1.0.0" },
{ name = "mkdocstrings", extras = ["python"], specifier = ">=1.0.0" },
{ name = "pytest", specifier = ">=9.0.2" },
]
@@ -1309,19 +1311,6 @@ wheels = [
{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/34/01/9a3f0ff60afcb30383ea9775e9f9a233c0127bad7c786d878f78b487bebb/langsmith-0.6.1-py3-none-any.whl", hash = "sha256:cad1f0a5cb8baf01490d2d90b7515d2cecc31648237bf070d2e6c0e7d58a2079", size = 282977, upload-time = "2026-01-06T20:15:36.579Z" },
]
-[[package]]
-name = "loguru"
-version = "0.7.3"
-source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }
-dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
- { name = "win32-setctime", marker = "sys_platform == 'win32'" },
-]
-sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/3a/05/a1dae3dffd1116099471c643b8924f5aa6524411dc6c63fdae648c4f1aca/loguru-0.7.3.tar.gz", hash = "sha256:19480589e77d47b8d85b2c827ad95d49bf31b0dcde16593892eb51dd18706eb6", size = 63559, upload-time = "2024-12-06T11:20:56.608Z" }
-wheels = [
- { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c", size = 61595, upload-time = "2024-12-06T11:20:54.538Z" },
-]
-
[[package]]
name = "markdown"
version = "3.10"
@@ -1530,6 +1519,18 @@ wheels = [
{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31" },
]
+[[package]]
+name = "mkdocs-static-i18n"
+version = "1.3.1"
+source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }
+dependencies = [
+ { name = "mkdocs" },
+]
+sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/ce/f9/51e2ffda9c7210bc35a24f3717b08c052cd4b728dfa87f901c00d8005259/mkdocs_static_i18n-1.3.1.tar.gz", hash = "sha256:a6125ea7db6cc1a900d76a967f262535af09831160a93c56d7f0d522a79b5faf", size = 1371325, upload-time = "2026-02-20T10:42:41.835Z" }
+wheels = [
+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/6a/0b/43ff4afb6b438d47718b1959a22075ed95d8460d8c47381878b37a40de63/mkdocs_static_i18n-1.3.1-py3-none-any.whl", hash = "sha256:4036e24795a150c9c4d4b001ed24a43aec01335f76188dbe5a5d8fb4a27eba65", size = 21853, upload-time = "2026-02-20T10:42:40.551Z" },
+]
+
[[package]]
name = "mkdocstrings"
version = "1.0.0"
@@ -3273,15 +3274,6 @@ wheels = [
{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" },
]
-[[package]]
-name = "win32-setctime"
-version = "1.2.0"
-source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }
-sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/b3/8f/705086c9d734d3b663af0e9bb3d4de6578d08f46b1b101c2442fd9aecaa2/win32_setctime-1.2.0.tar.gz", hash = "sha256:ae1fdf948f5640aae05c511ade119313fb6a30d7eabe25fef9764dca5873c4c0", size = 4867, upload-time = "2024-12-07T15:28:28.314Z" }
-wheels = [
- { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e1/07/c6fe3ad3e685340704d314d765b7912993bcb8dc198f0e7a89382d37974b/win32_setctime-1.2.0-py3-none-any.whl", hash = "sha256:95d644c4e708aba81dc3704a116d8cbc974d70b3bdb8be1d150e36be6e9d1390", size = 4083, upload-time = "2024-12-07T15:28:26.465Z" },
-]
-
[[package]]
name = "xxhash"
version = "3.6.0"