Skip to content

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

feat: 更新通用领域模板,添加规章制度相关内容

yifanfeng970385c61f15bf
diff --git a/hyperextract/templates/README.md b/hyperextract/templates/README.md
index 89c6e70..2c5cf32 100644
--- a/hyperextract/templates/README.md
+++ b/hyperextract/templates/README.md
@@ -8,7 +8,7 @@ This library is organized by **Domain**, ensuring that the extraction logic matc
| Domain | Description | Key Focus |
| :--- | :--- | :--- |
-| **`general`** | General Purpose | Arbitrary Text, Encyclopedias, Biographies |
+| **`general`** | General Purpose | Arbitrary Text, Encyclopedias, Biographies, Regulations |
| **`finance`** | Finance & Investment | Reports, Filings, Transcripts, Earnings Calls, Market News |
| **`medicine`** | Medicine & Health | Clinical Records, Guidelines, Drug Info |
| **`tcm`** | Traditional Chinese Medicine | Case Records, Herbology, Acupuncture |
@@ -60,6 +60,17 @@ The default choice for unstructured text that doesn't fit a specific industry.
| **`ArgumentMap`** | `AutoHypergraph` | **Logical Argument Map**. Models complex logic: multiple premises supporting a conclusion. | Philosophical/Scientific books |
| **`ConceptEvolution`** | `AutoTemporalGraph` | **Conceptual History**. Tracks how a specific idea or term evolves throughout a text. | History of ideas, evolving concepts |
+* **Regulations & Compliance**: Internal policies, administrative regulations, SOPs, and compliance guidelines.
+
+| Template Name | Primitive | Description | Typical Use Case |
+| :--- | :--- | :--- | :--- |
+| **`RegulationProfile`** | `AutoModel` | **Policy Snapshot**. Extracts policy name, version, scope, effective date, and core purpose. | Policy overview, version control |
+| **`ComplianceLogic`** | `AutoHypergraph` | **Compliance Logic Map**. Models complex "Who, Under what conditions, Must/Must not do What" logic. | Compliance auditing, risk identification |
+| **`PenaltyRegistry`** | `AutoSet` | **Violation-Penalty Registry**. Aggregates unique violations and their specific consequences into a ledger. | Risk management, compliance check |
+| **`OperationalProcedure`** | `AutoGraph` | **Operational Workflow**. Extracts sequential steps for applications, approvals, or operational procedures. | SOP visualization, process guides |
+| **`PenaltyMapping`** | `AutoGraph` | **Enforcement Chain**. Describes the path from violation trigger to handling process and final consequences. | Root cause analysis, penalty logic |
+| **`ClauseList`** | `AutoList` | **Atomic Clause List**. Dissects the regulation into individual atomic clauses for quick indexing. | Clause retrieval, document comparison |
+
### 2. `finance` (Finance)
Optimized for complex financial relationships, market sentiment, and temporal events.
diff --git a/hyperextract/templates/README_ZH.md b/hyperextract/templates/README_ZH.md
index 3c5843f..46cb6e7 100644
--- a/hyperextract/templates/README_ZH.md
+++ b/hyperextract/templates/README_ZH.md
@@ -8,7 +8,7 @@
| 领域代码 | 领域名称 | 核心关注点 |
| :--- | :--- | :--- |
-| **`general`** | 通用/百科 | 任意文本、百科全书、人物传记 |
+| **`general`** | 通用/百科 | 任意文本、百科全书、人物传记、规章制度 |
| **`finance`** | 金融投资 | 财报、研报、会议纪要、金融资讯 |
| **`medicine`** | 医疗健康 | 临床指南、病历、药品文档 |
| **`tcm`** | 中医中药 | 医案、本草、方剂、经络 |
@@ -60,6 +60,17 @@
| **`ArgumentMap`** | `AutoHypergraph` | **论点逻辑图**。建模复杂的论证逻辑:多个前提支持一个结论。 | 学术著作、分析性散文 |
| **`ConceptEvolution`** | `AutoTemporalGraph` | **概念演变史**。追踪一个特定概念、词汇随文脉演变的轨迹。 | 思想史书籍、长篇论著 |
+* **规章制度与合规文档**:公司内部管理制度、行政法规、操作手册、合规指南。
+
+| 模板名称 | 底层原语 | 描述 | 典型应用场景 |
+| :--- | :--- | :--- | :--- |
+| **`RegulationProfile`** | `AutoModel` | **规章元数据快照**。提取制度的名称、版本、适用范围、生效日期及核心宗旨。 | 制度概览、版本管理 |
+| **`ComplianceLogic`** | `AutoHypergraph` | **合规行为超图**。建模“在何种条件下,何种主体,必须/禁止执行何种操作”的复杂逻辑。 | 合规审计、风险识别 |
+| **`PenaltyRegistry`** | `AutoSet` | **违规处罚对照表**。去重汇总特定的违规行为及其对应的后果,形成清晰的处罚台账。 | 内部风控、合规检查 |
+| **`OperationalProcedure`** | `AutoGraph` | **执行程序流程图**。提取规章中规定的申报、审批或操作的具体先后步骤。 | 操作导引、SOP 流程可视化 |
+| **`PenaltyMapping`** | `AutoGraph` | **违规处罚因果链**。描述从“违规行为”到“处理程序”再到“最终结果”的演变路径。 | 风险溯源、处罚逻辑分析 |
+| **`ClauseList`** | `AutoList` | **规章条文清单**。将规章制度拆解为逐条的原子化条文,方便快速索引。 | 条文检索、全文比对 |
+
### 2. `finance` (金融)
专注于提取复杂的交易关系、市场观点及时间敏感事件。