Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.
docs: add AutoDocument to list-template type legend
Frankie-Xuaebb5811d791
diff --git a/docs/en/cli/commands/list.md b/docs/en/cli/commands/list.mdindex 128188a..b35a6c8 100644--- a/docs/en/cli/commands/list.md+++ b/docs/en/cli/commands/list.md@@ -49,6 +49,7 @@ Templates are organized by output type:| Type | Templates ||------|-----------|+| `document` | Chunked raw text without LLM extraction || `model` | Structured data extraction || `list` | Ordered collections || `set` | Deduplicated collections |diff --git a/docs/zh/cli/commands/list.md b/docs/zh/cli/commands/list.mdindex 999db49..2f3f3de 100644--- a/docs/zh/cli/commands/list.md+++ b/docs/zh/cli/commands/list.md@@ -49,6 +49,7 @@ medicine/drug_interaction graph Drug interaction network| 类型 | 模板 ||------|-----------|+| `document` | 分块原文,不跑 LLM 抽取 || `model` | 结构化数据提取 || `list` | 有序集合 || `set` | 去重集合 |diff --git a/hyperextract/cli/commands/list.py b/hyperextract/cli/commands/list.pyindex 8f9fc12..2b8907f 100644--- a/hyperextract/cli/commands/list.py+++ b/hyperextract/cli/commands/list.py@@ -99,8 +99,12 @@ def template(console.print(f"\n[dim]Total: {len(templates)} templates[/dim]")console.print()console.print("[dim]Type explanations:[/dim]")+ console.print(" [cyan]document[/cyan] - Chunked raw text (no LLM extraction)")console.print(" [cyan]graph[/cyan] - Entity-relationship graph (binary relations)")console.print(" [cyan]hypergraph[/cyan] - Hypergraph (n-ary relations)")+ console.print(" [cyan]temporal_graph[/cyan] - Graph with time context")+ console.print(" [cyan]spatial_graph[/cyan] - Graph with location context")+ console.print(" [cyan]spatio_temporal_graph[/cyan] - Graph with time and location")console.print(" [cyan]list[/cyan] - Key-value list")console.print(" [cyan]model[/cyan] - Structured data model")console.print(" [cyan]set[/cyan] - Entity collection")diff --git a/hyperextract/types/__init__.py b/hyperextract/types/__init__.pyindex 51bd87d..49e6cca 100644--- a/hyperextract/types/__init__.py+++ b/hyperextract/types/__init__.py@@ -8,6 +8,7 @@ handling the complexities of LLM interaction, text chunking, and result merging| Class | Structure | Core Use Case | Key Feature || :--- | :--- | :--- | :--- |+| **`AutoDocument`** | Text Chunks | Raw corpus retrieval | No LLM extraction; stores and searches chunks || **`AutoModel`** | Single Object | Document Summaries, Metadata | Merges all chunks into ONE consistent object || **`AutoList`** | List[Item] | Event Logs, Todo Lists | Appends items from all chunks commonly || **`AutoSet`** | Set[Item] | Entity Registries, Glossaries | Deduplicates items by key & merges details |@@ -20,6 +21,9 @@ handling the complexities of LLM interaction, text chunking, and result merging# 📚 Detailed Scope Description## 1. Scalar & Document Types (标量与文档型)+* **`AutoDocument`**: Designed for **"One Document -> Retrievable Chunks"**.+ * *Scope*: Keep the source text as chunks when you do not want LLM extraction (baseline retrieval, or a fallback when extraction quality/cost is a concern).+ * *Logic*: `feed_text` splits text, stores chunks, and `search` returns the raw chunks. YAML `type: document`.* **`AutoModel`**: Designed for **"One Document -> One Object"**.* *Scope*: When you need to summarize a whole file into a single structure (e.g., "Research Report" with fields for summary, author, conclusion).* *Logic*: It treats every text chunk as a partial view of the *same* object and uses LLM to merge them.diff --git a/tests/cli/test_verbose.py b/tests/cli/test_verbose.pyindex dffaa27..dbb96ca 100644--- a/tests/cli/test_verbose.py+++ b/tests/cli/test_verbose.py@@ -114,6 +114,15 @@ class TestCLINoVerboseFlag:result = runner.invoke(app, ["list", "template", "--help"])assert result.exit_code == 0+ def test_list_template_legend_includes_document(self):+ """Type explanations mention AutoDocument's YAML type."""+ result = runner.invoke(app, ["list", "template"])+ assert result.exit_code == 0, result.output+ assert "document" in result.output+ assert "temporal_graph" in result.output+ assert "spatial_graph" in result.output+ assert "spatio_temporal_graph" in result.output+def test_config_help_works(self):"""he config --help exits cleanly."""result = runner.invoke(app, ["config", "--help"])