Hypergraph is more powerful. Transform unstructured text into structured knowledge with LLMs. Graphs, hypergraphs, and spatio-temporal extractions — with one command.
refactor(templates): migrate legacy templates and test samples to new structure
yifanfeng9797d45f3b8c00
diff --git a/hyperextract/cli/cli.py b/hyperextract/cli/cli.pyindex 14dfdc8..0a5c1c6 100644--- a/hyperextract/cli/cli.py+++ b/hyperextract/cli/cli.py@@ -64,6 +64,9 @@ def main(table.add_row("he show", "<kb_path>", "Visualize knowledge base")table.add_row("he search", "<query> -k <kb>", "Semantic search in knowledge base")table.add_row("he talk", "-k <kb>", "Chat with knowledge base")+ table.add_row("he config", "--help", "Manage LLM and Embedder configuration")+ table.add_row("he feed", "-k <kb>", "Feed knowledge into knowledge base")+ table.add_row("he build-index", "-k <kb>", "Build search index for knowledge base")panel = Panel(table,diff --git "a/hyperextract/templates/PYTHON\350\275\254YAML\351\205\215\347\275\256\346\214\207\345\215\227.md" "b/hyperextract/templates/PYTHON\350\275\254YAML\351\205\215\347\275\256\346\214\207\345\215\227.md"deleted file mode 100644index 0df2355..0000000--- "a/hyperextract/templates/PYTHON\350\275\254YAML\351\205\215\347\275\256\346\214\207\345\215\227.md"+++ /dev/null@@ -1,361 +0,0 @@-# Python模板转YAML配置指南--本文档说明如何将现有的Python模板文件转换为YAML配置文件格式。-------## 目录结构--```-hyperextract/templates/presets/-├── finance/ # 财经领域-├── medicine/ # 医疗领域-├── tcm/ # 中医领域-├── law/ # 法律领域-├── general/ # 通用领域-└── ... # 其他领域-```--每个YAML文件代表一个模板。-------## YAML配置结构--以下是完整的配置字段说明:--```yaml-# 必需字段-name: 模板名称 # 模板类名,如 EarningsCallSummary-autotype: model # 类型:model | list | set | graph | hypergraph | temporal_graph | spatial_graph | spatio_temporal_graph-tag: [finance] # 标签数组,用于索引和检索,如 [finance], [medicine], [general] 等--# 语言配置(目前只用中文)-language: zh # 语言代码,目前统一使用 zh--# 描述(多语言格式)-description:- zh: 中文描述文字 # 注意:要用 zh: 格式,即使只有一个语言--# Schema定义(根据autotype不同)-# autotype: model 时使用 schema-schema:- fields:- - name: 字段名- type: string # 类型:string | int | float | bool | array- description:- zh: 字段描述 # 注意:这里也要用 zh: 格式- required: false # 是否必填,默认 false- default: "" # 默认值--# autotype: list 或 set 时使用 item_schema-item_schema:- fields:- - name: 字段名- type: string- description:- zh: 字段描述- required: false- default: ""--# autotype: graph 类时使用 node_schema 和 edge_schema-node_schema:- fields:- - name: 字段名- type: string- description:- zh: 字段描述--edge_schema:- fields:- - name: 字段名- type: string- description:- zh: 字段描述--# 提取指南(多语言格式)-extraction_guide:- target:- zh: |- 你是一位xxx专家...- 这里写角色定义和提取任务说明-- rules:- zh: |- 1. 规则1- 2. 规则2-- rules_for_nodes:- zh: |- 1. 节点规则1- 2. 节点规则2-- rules_for_edges:- zh: |- 1. 边规则1- 2. 边规则2-- rules_for_time: # temporal_graph / spatio_temporal_graph 使用- zh: |- 1. 时间规则1-- rules_for_location: # spatial_graph / spatio_temporal_graph 使用- zh: |- 1. 位置规则1--# 标识配置-identifiers:- item_id: 字段名 # set 类型使用- node_id: 字段名 # graph 类型使用- edge_id: "{source}|{relation}" # graph 类型使用,支持模板格式- edge_members: # graph 类型使用- source: source- target: target- time_field: 字段名 # temporal_graph / spatio_temporal_graph 使用- location_field: 字段名 # spatial_graph / spatio_temporal_graph 使用--# 运行时参数(可选,不填则使用默认值)-parameters:- extraction_mode: two_stage # graph 类型使用:one_stage | two_stage- node_merge_strategy: llm_balanced # graph 类型使用,不填默认为 llm_balanced- edge_merge_strategy: llm_balanced # graph 类型使用,不填默认为 llm_balanced- observation_time: "2024-01-01" # temporal_graph / spatio_temporal_graph 使用- observation_location: "北京" # spatial_graph / spatio_temporal_graph 使用- chunk_size: 2048- chunk_overlap: 256- max_workers: 10- verbose: false--# 展示配置(必需)-# 注意:支持模板字符串格式,使用 {字段名} 占位,可组合多个字段-display:- label: 字段名 # model / list / set 使用- node_label: "{字段1} ({字段2})" # graph 类型使用,支持模板格式如 "{name} ({type})"- edge_label: "{字段1}" # graph 类型使用,可使用模板如 "{relation_type}"-```-------## 多语言字段格式要求--**重要**:以下字段都需要使用 `zh:` 格式,即使只有一个语言:--### 1. 整体description--```yaml-# 正确格式-description:- zh: 这是一个描述文字-```--### 2. Schema字段的description--```yaml-# 正确格式(每个字段的description都要用zh:格式)-schema:- fields:- - name: company_name- type: string- description:- zh: 公司名称- required: false-```--### 3. extraction_guide中的字段--```yaml-# 正确格式(每个子字段都要用zh:格式)-extraction_guide:- target:- zh: |- 你是一位专业的财务分析师,擅长从财报电话会议中提取关键信息。- 请从财报电话会议记录中提取关键财务指标、业绩指引和整体基调。-- rules:- zh: |- 1. 每个字段对应一个独立的信息项,禁止合并- 2. 数据必须与原文保持一致,不得编造- 3. 如果信息缺失,该字段留空-```-------## 各AutoType配置对照表--| AutoType | Schema字段 | identifiers必需字段 | 特有parameters |-|----------|-----------|-------------------|---------------|-| model | schema | - | - |-| list | item_schema | - | - |-| set | item_schema | item_id | - |-| graph | node_schema + edge_schema | node_id, edge_id, edge_members | extraction_mode |-| hypergraph | node_schema + edge_schema | node_id, edge_id, edge_members | extraction_mode |-| temporal_graph | node_schema + edge_schema | node_id, edge_id, edge_members, time_field | extraction_mode, observation_time |-| spatial_graph | node_schema + edge_schema | node_id, edge_id, edge_members, location_field | extraction_mode, observation_location |-| spatio_temporal_graph | node_schema + edge_schema | node_id, edge_id, edge_members, time_field, location_field | extraction_mode, observation_time, observation_location |--**注意**:parameters不填时使用默认值(merge_strategy默认为llm_balanced)-------## 转换示例--### Python模板 (原格式)--```python-class EarningsCallSummary(AutoModel):- schema = EarningsCallSummarySchema-- def __init__(self, llm_client, embedder):- super().__init__(- data_schema=EarningsCallSummarySchema,- llm_client=llm_client,- embedder=embedder,- prompt="""你是一位专业的财务分析师...""",- strategy_or_merger=MergeStrategy.LLM.BALANCED,- )-```--### YAML配置 (目标格式)--```yaml-name: EarningsCallSummary-autotype: model-tag: [finance]--language: zh--description:- zh: 财报电话会议摘要--schema:- fields:- - name: company_name- type: string- description:- zh: 公司名称- - name: quarter- type: string- description:- zh: 报告季度- - name: revenue- type: string- description:- zh: 营收数据- - name: guidance- type: string- description:- zh: 业绩指引--extraction_guide:- target:- zh: |- 你是一位专业的财务分析师,擅长从财报电话会议中提取关键信息。- 请从财报电话会议记录中提取关键财务指标、业绩指引和整体基调。- rules:- zh: |- 1. 每个字段对应一个独立的信息项,禁止合并- 2. 数据必须与原文保持一致,不得编造- 3. 如果信息缺失,该字段留空--identifiers: {}--parameters: {}--display:- label: company_name-```-------## 常用配置值--### merge_strategy(不填默认为 llm_balanced)-- `none`: 不合并-- `field`: 基于字段合并-- `llm_balanced`: LLM平衡合并(默认)-- `llm_conservative`: LLM保守合并--### extraction_mode (graph类型)-- `one_stage`: 单阶段提取(同时提取节点和边)-- `two_stage`: 双阶段提取(先提取节点,再提取边)-------## 时空图参数的特殊处理--对于 `temporal_graph`、`spatial_graph`、`spatio_temporal_graph` 类型的模板,有两个特殊的参数:--### observation_time 和 observation_location--- **observation_time**: 观察日期,用于解析相对时间表达式(如"去年"、"昨天")-- **observation_location**: 观察位置,用于解析相对位置表达式(如"这里"、"附近")--### 在YAML配置中--这两个参数**不应该在YAML配置文件中硬编码**,应该由用户在运行时提供:--```yaml-parameters:- extraction_mode: two_stage- # observation_time 和 observation_location 由用户在运行时提供-```--### 在运行时传入--使用 `TemplateFactory.create` 时,可以通过 kwargs 传入这些参数:--```python-from hyperextract.templates.generator import TemplateRegistry, TemplateFactory--# 加载配置-registry = TemplateRegistry()-registry.load_from_directory("hyperextract/templates/presets")-config = registry.get("FinancialDataTemporalGraph")--# 创建模板时传入参数-template = TemplateFactory.create(- config,- llm,- embedder,- observation_time="2024-06-15", # 覆盖默认值- observation_location="北京", # 覆盖默认值- chunk_size=4096, # 也可以覆盖其他参数-)-```--### 在提示词中引用--可以在 extraction_guide 中使用这些参数占位符:--```yaml-extraction_guide:- rules_for_time:- zh: |- 1. 相对时间解析(基于观察日期)- - 当前观察日期为 {observation_time}- - "去年" -> 计算 {observation_time} 前一年的年份- - "昨天" -> 计算 {observation_time} 前一天的日期-- rules_for_location:- zh: |- 1. 相对位置解析(基于观察位置)- - 当前观察位置为 {observation_location}- - "这里"、"本地" -> {observation_location}- - "附近"、"周边" -> {observation_location} 附近区域-```-------## 转换检查清单--转换时请确认:--- [ ] name 字段正确-- [ ] autotype 字段正确-- [ ] tag 数组包含正确的领域标签-- [ ] description 使用 `zh:` 格式-- [ ] schema/item_schema/node_schema/edge_schema 的每个字段的 description 都使用 `zh:` 格式-- [ ] extraction_guide 的每个子字段(target, rules, rules_for_nodes 等)都使用 `zh:` 格式-- [ ] identifiers 配置正确(graph类型需要完整配置)-- [ ] parameters 可选配置-- [ ] display 配置必须存在(label / node_label + edge_label)diff --git a/hyperextract/templates/README.md b/hyperextract/templates/README.mdindex f2af44a..e7ffa09 100644--- a/hyperextract/templates/README.md+++ b/hyperextract/templates/README.md@@ -1,8 +1,6 @@-# Hyper-Extract Domain Knowledge Templates+# Hyper-Extract Core Domain Templates-The **Hyper-Extract Domain Templates** library allows you to extract structured knowledge graphs (Temporal, Spatial, Hypergraph, etc.) directly from raw documents.--This library is organized by **Domain**, ensuring that the extraction logic matches the specific vocabulary, document structures, and extraction goals of different industries.+The **Hyper-Extract Domain Templates** library provides structured knowledge graph extraction from raw documents.> 切换至 [中文版](./README_ZH.md)@@ -12,32 +10,22 @@ This library is organized by **Domain**, ensuring that the extraction logic matc```templates/-├── presets/ # Preset templates (system-provided)-│ ├── agriculture/-│ ├── biology/-│ ├── finance/-│ └── ...+├── presets/ # Domain templates (6 core domains)+│ ├── finance/ # Finance & Investment+│ ├── general/ # General Purpose+│ ├── industry/ # Industry & Manufacturing+│ ├── legal/ # Legal & Compliance+│ ├── medicine/ # Medicine & Healthcare+│ └── tcm/ # Traditional Chinese Medicine├── customs/ # Custom templates (user-created)-│ └── (user templates)-├── legacy/ # Deprecated Python templates-│ ├── zh/-│ └── en/-├── README.md-└── README_ZH.md+└── README.md```-### presets vs customs--| Directory | Purpose | Description |-|-----------|---------|-------------|-| `presets/` | Preset templates | System-provided knowledge templates, read-only |-| `customs/` | Custom templates | User-created templates, can override presets |-----## 🚀 Usage+## 🚀 Quick Start-### Recommended: Using YAML Config+### Using YAML Config (Recommended)```pythonfrom hyperextract.utils.template_engine import Gallery, TemplateFactory@@ -46,7 +34,7 @@ from langchain_openai import ChatOpenAI, OpenAIEmbeddingsllm = ChatOpenAI(model="gpt-4o-mini")embedder = OpenAIEmbeddings()-# Get template (auto-loaded presets and customs)+# Get templateconfig = Gallery.get("KnowledgeGraph")# Create template@@ -57,53 +45,22 @@ result = template.parse("Your text here...")print(Gallery.list_all())```-### Creating Custom Templates--Users can create their own templates in `templates/customs/`:--```python-# Add custom template directory (auto-loaded)-Gallery.add_path("/path/to/my/templates")--# Get custom template-config = Gallery.get("MyCustomTemplate")-```--### Deprecated: Using Python Class--```python-from hyperextract.templates.legacy.zh.general import KnowledgeGraph-from langchain_openai import ChatOpenAI, OpenAIEmbeddings--llm = ChatOpenAI(model="gpt-4o-mini")-embedder = OpenAIEmbeddings()--template = KnowledgeGraph(llm_client=llm, embedder=embedder)-result = template.parse("Your text here...")-```--> ⚠️ **Warning**: The Python class templates in `legacy/` are deprecated and will be removed in a future version. Please migrate to YAML config based templates.-----## 📋 Table of Contents--- [📚 General](#1-general-general-purpose)-- [💰 Finance](#2-finance-finance)-- [🏥 Medicine](#3-medicine-medicine)-- [🌿 TCM](#4-tcm-traditional-chinese-medicine)-- [⚙️ Industry](#5-industry-industry)-- [📜 History](#6-history-history)-- [🧬 Biology](#7-biology-biology)-- [⚖️ Legal](#8-legal-legal)-- [🎭 Literature](#9-literature-literature--fiction)-- [📰 News](#10-news-news--journalism)-- [🌾 Agriculture](#11-agriculture-agriculture)-- [🍜 Food](#12-food-food)+## 📋 Domain Index++| Domain | Description | Key Focus |+| :--- | :--- | :--- |+| **`general`** | General Purpose | Arbitrary text, encyclopedias, biographies, regulations |+| **`finance`** | Finance & Investment | Reports, filings, transcripts, earnings calls |+| **`medicine`** | Medicine & Healthcare | Clinical records, guidelines, drug information |+| **`tcm`** | Traditional Chinese Medicine | Case records, herbology, acupuncture |+| **`industry`** | Industry & Manufacturing | Maintenance, safety, operations |+| **`legal`** | Legal & Compliance | Contracts, judgments, regulations |----## Primitive Types Overview+## 🔧 Primitive Types| Primitive | Description || :--- | :--- |@@ -116,26 +73,7 @@ result = template.parse("Your text here...")----## Domain Index--| Domain | Description | Key Focus |-| :--- | :--- | :--- |-| **`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 |-| **`industry`** | Industry | Maintenance, Safety, Operations |-| **`history`** | History & Culture | Chronicles, Timelines, Archives |-| **`biology`** | Biological Science | Genomics, Proteomics, Ecology |-| **`legal`** | Legal & Compliance | Contracts, Judgments, Regulations |-| **`literature`** | Literature & Fiction | Scripts, Novels, World Building |-| **`news`** | News & Media | Investigative Reports, Breaking News |-| **`agriculture`** | Agriculture | Crop Management, Soil Analysis |-| **`food`** | Food & Culinary | Recipes, Menu Engineering |-------## Domain Details+## 📚 Domain Details### 1. 📚 `general` (General Purpose)@@ -176,8 +114,6 @@ The default choice for unstructured text that doesn't fit a specific industry.| **`PenaltyMapping`** | `AutoGraph` | Violation → Process → Consequence chain | Root cause analysis || **`ClauseList`** | `AutoList` | Atomic clauses for quick indexing | Clause retrieval |-[↑ Back to Top](#table-of-contents)----### 2. 💰 `finance` (Finance)@@ -233,8 +169,6 @@ Optimized for complex financial relationships, market sentiment, and temporal ev| **`MultiSourceSentimentHypergraph`** | `AutoHypergraph` | Cross-source sentiment fusion | Ensemble scoring || **`MarketNarrativeTimeline`** | `AutoTemporalGraph` | Narrative evolution over time | Thematic investing |-[↑ Back to Top](#table-of-contents)----### 3. 🏥 `medicine` (Medicine)@@ -282,8 +216,6 @@ Focuses on causality, standardized terminology (UMLS), and precise relationships| **`ContraindicationList`** | `AutoList` | Absolute contraindications | Prescription blocking || **`AdverseReactionStats`** | `AutoList` | Reactions by system with frequency | Pharmacovigilance |-[↑ Back to Top](#table-of-contents)----### 4. 🌿 `tcm` (Traditional Chinese Medicine)@@ -320,8 +252,6 @@ Specialized for syndrome differentiation (`Bian Zheng`) and herbal compatibility| **`AcupointLocationMap`** | `AutoGraph` | Acupoint spatial relationships | Acupuncture teaching || **`MeridianFlowGraph`** | `AutoGraph` | Twelve meridian pathways | Meridian theory |-[↑ Back to Top](#table-of-contents)----### 5. ⚙️ `industry` (Industry)@@ -370,84 +300,9 @@ Focuses on operational data in manufacturing, energy, and power sectors.| **`IncidentCausalityMap`** | `AutoHypergraph` | Hazard, trigger, violation, consequence | Accident simulation || **`SafetyTimeline`** | `AutoTemporalGraph` | Operations and response sequences | Accident review |-[↑ Back to Top](#table-of-contents)-----### 6. 📜 `history` (History)--Focuses on long-span timelines and social network reconstruction.--* **Historical Monographs**: Academic analysis of periods, events, figures.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`HistoricalKnowledgeGraph`** | `AutoGraph` | Kinship, Minister-Ruler, causality | Social network analysis |-| **`MultiParticipantEventMap`** | `AutoHypergraph` | Events as hyperedges connecting participants | Event reconstruction |--* **Chronicles**: Strictly chronological records.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`ChronologicalEventChain`** | `AutoTemporalGraph` | Atomic events with timestamps | Timeline generation |-| **`HistoricalContextGraph`** | `AutoGraph` | Static relationships (kinship, alliances) | Background mining |-| **`PoliticalStruggleHypergraph`** | `AutoHypergraph` | {Attacker, Defender, Planner, Traitor} in battles | Faction analysis |--* **Oral History**: First-person memoirs with non-linear narratives.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`PersonalTrajectoryHypergraph`** | `AutoHypergraph` | Life stages as {Period, Location, Peers, Experience} | Biography writing |-| **`NarrativeRelationGraph`** | `AutoGraph` | Interpersonal interactions from narrator's view | Social network analysis |-| **`MemoryFlashbackList`** | `AutoList` | Specific anecdotes, feelings, side descriptions | Historical detail |--* **Archival Correspondence**: Letters revealing hidden social networks.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`EpistolaryKnowledgeGraph`** | `AutoGraph` | Entities and relations within letter content | Historical material mining |--[↑ Back to Top](#table-of-contents)-------### 7. 🧬 `biology` (Biology)--Beyond genomics: proteomics, metabolism, and ecology.--* **Biological Monographs**: Species taxonomy, evolutionary history.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`SpeciesInteractionWeb`** | `AutoGraph` | Predation, parasitism, competition, symbiosis | Food web analysis |-| **`TaxonomicTree`** | `AutoGraph` | Kingdom → Phylum → ... → Species hierarchy | Taxonomy database |--* **Protein Structure Summaries**: Crystal structures, binding sites.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`ProteinComplexMap`** | `AutoHypergraph` | Multi-subunit assemblies | Complex databases |-| **`BindingSiteModel`** | `AutoModel` | Active site residues, binding pocket chemistry | Drug design |--* **Metabolic Pathway Descriptions**: Biochemical cascades.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`BiochemicalReactionHypergraph`** | `AutoHypergraph` | Enzyme + Substrate → Product reactions | Pathway mapping |-| **`RegulatoryNetwork`** | `AutoGraph` | TF → Promoter → Gene expression | Gene regulation analysis |--* **Ecological Surveys**: Species distribution, habitat characteristics.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`PhylogeneticRelationGraph`** | `AutoGraph` | Evolutionary relationships, branching patterns | Phylogenetic trees |-| **`BiodiversityRegistry`** | `AutoSet` | Observed species and populations | Biodiversity assessment |--[↑ Back to Top](#table-of-contents)-------### 8. ⚖️ `legal` (Legal)+### 6. ⚖️ `legal` (Legal)Precise logical conditions, obligations, and citations.@@ -481,119 +336,16 @@ Precise logical conditions, obligations, and citations.| **`ComplianceRequirementList`** | `AutoList` | Specific affirmative/negative duties | Gap analysis || **`BeneficialOwnershipGraph`** | `AutoGraph` | Corporate ownership layers to UBO | AML/KYC screening |-[↑ Back to Top](#table-of-contents)-------### 9. 🎭 `literature` (Literature & Fiction)--Narrative structure, character interactions, world-building.--* **Screenplays / Scripts**: Highly structured (Scene, Action, Dialogue).--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`SceneEventHypergraph`** | `AutoHypergraph` | Scene as {Characters, Location, Props, Actions} | Scene analysis |-| **`CharacterArcTimeline`** | `AutoTemporalGraph` | Character location, emotion, actions over time | Development analysis |--* **Novels**: Complex plots, numerous characters.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`ComplexCharacterRelation`** | `AutoHypergraph` | Multi-party structures (triangles, alliances) | Ensemble analysis |-| **`StoryEntityGraph`** | `AutoGraph` | Items, locations, ownership | World-building DB |-| **`NarrativeEventChain`** | `AutoTemporalGraph` | Key plot points by internal timeline | Synopsis generation |--* **Literary Criticism**: Themes, motifs, intertextuality.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`MotifAssociationNet`** | `AutoGraph` | Recurring symbols and motifs | Semiotics |-| **`CritiqueArgumentHypergraph`** | `AutoHypergraph` | {Evidence1, Evidence2, Quote} → Thesis | Paper analysis |-| **`NarrativeStructureTree`** | `AutoGraph` | Hierarchical narrative structure | Narratology |--[↑ Back to Top](#table-of-contents)-------### 10. 📰 `news` (News & Journalism)--Focuses on 5Ws (Who, What, Where, When, Why), event causality, viewpoint analysis.--* **Investigative Journalism**: Long-form reporting revealing complex truths.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`InvestigativeContextGraph`** | `AutoGraph` | Baseline relationships (employment, kinship) | Entity mapping |-| **`ComplexRelationNet`** | `AutoHypergraph` | Multi-party connections (family, political, business) | Political analysis |-| **`KeyEventSequence`** | `AutoGraph` | Chronological sequence of critical events | Backgrounders |--* **Breaking News Wires**: Short, factual updates.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`NewsEntityGraph`** | `AutoGraph` | Key entities (people, orgs, locations, events) | News feeds |-| **`NewsSummaryModel`** | `AutoModel` | 5W1H extraction | News aggregation |-| **`LiveUpdateTimeline`** | `AutoGraph` | Minute-by-minute updates | Live blog summary |--* **Policy Analysis & Editorials**: Opinions, arguments, future impacts.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`ViewpointStructure`** | `AutoHypergraph` | {Claim, Premises, Conclusion} | Opinion mining |-| **`ImpactChain`** | `AutoGraph` | Policy → Affected Groups → Consequences | Policy reviews |--[↑ Back to Top](#table-of-contents)-----### 11. 🌾 `agriculture` (Agriculture)--Crop lifecycle, field monitoring, soil health.--* **Agricultural Manuals**: Planting standards, pest control.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`CropGrowthCycle`** | `AutoTemporalGraph` | Farming operations per growth stage | Planting calendar |-| **`PestControlHypergraph`** | `AutoHypergraph` | {Crop, Stage, Factor} → {Target, Agent, Dosage} | Smart crop protection |--* **Crop Scouting Reports**: Field observations.+## 📝 Creating Custom Templates-| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`FieldObservationList`** | `AutoList` | {Field ID, Crop, Stage, Issue, Severity, Recommendation} | Pest early warning |--* **Soil Analysis Reports**: Soil chemistry and fertilization recommendations.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`SoilNutrientModel`** | `AutoModel` | pH, Organic Matter, N-P-K, micronutrients | Fertilizer prescription |-| **`AmendmentPlan`** | `AutoGraph` | Test Result → Limiting Factor → Method → Outcome | Precision agriculture |--[↑ Back to Top](#table-of-contents)-------### 12. 🍜 `food` (Food)--Recipe standardization, ingredient pairing, food reviews.--* **Standardized Recipes**: Ingredient lists, cooking steps.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`RecipeCollection`** | `AutoSet` | Unique dish entities and classifications | Menu digitization |-| **`StandardRecipeCard`** | `AutoModel` | Complete ingredients, steps, tips | Kitchen SOP cards |-| **`IngredientCompositionHypergraph`** | `AutoHypergraph` | {Dish, Main, Accessory, Seasoning} relationships | Cost, allergen management |--* **Food Reviews**: Professional evaluations.--| Template | Primitive | Description | Use Case |-| :--- | :--- | :--- | :--- |-| **`DishReviewSummary`** | `AutoList` | Core points, recommendation level, price | Must-try lists |-| **`SensoryEvaluationGraph`** | `AutoGraph` | Dish → Taste/Texture → Ingredient/Technique | Flavor analysis |+Users can create their own templates in `templates/customs/`:-[↑ Back to Top](#table-of-contents)+```python+# Add custom template directory (auto-loaded)+Gallery.add_path("/path/to/my/templates")----+# Get custom template+config = Gallery.get("MyCustomTemplate")+```diff --git a/hyperextract/templates/README_ZH.md b/hyperextract/templates/README_ZH.mdindex a816157..e15752d 100644--- a/hyperextract/templates/README_ZH.md+++ b/hyperextract/templates/README_ZH.md@@ -1,9 +1,7 @@-# Hyper-Extract 领域知识抽取模板+# Hyper-Extract 核心领域知识模板**Hyper-Extract 领域模板库** 旨在为不同垂直行业提供专业的非结构化文本抽取能力。-本库按 **领域 (Domain)** 组织,每个领域针对其特定的文档类型、行业术语和业务逻辑进行了优化。-> 切换至 [English Version](./README.md)---@@ -12,30 +10,20 @@```templates/-├── presets/ # 预设模板(系统预置)-│ ├── agriculture/-│ ├── biology/-│ ├── finance/-│ └── ...+├── presets/ # 领域模板(6个核心领域)+│ ├── finance/ # 金融投资+│ ├── general/ # 通用领域+│ ├── industry/ # 工业制造+│ ├── legal/ # 法律合规+│ ├── medicine/ # 医疗健康+│ └── tcm/ # 中医中药├── customs/ # 自定义模板(用户可自行创建)-│ └── (用户模板)-├── legacy/ # 废弃的 Python 模板-│ ├── zh/-│ └── en/-├── README.md└── README_ZH.md```-### presets vs customs--| 目录 | 用途 | 说明 |-|------|------|------|-| `presets/` | 预设模板 | 系统预置的知识模板,用户只能读取使用 |-| `customs/` | 自定义模板 | 用户自行创建的模板,可覆盖同名预设 |-----## 🚀 使用方式+## 🚀 快速开始### 推荐方式:使用 YAML 配置@@ -46,7 +34,7 @@ from langchain_openai import ChatOpenAI, OpenAIEmbeddingsllm = ChatOpenAI(model="gpt-4o-mini")embedder = OpenAIEmbeddings()-# 直接获取模板(自动加载 presets 和 customs)+# 获取模板config = Gallery.get("KnowledgeGraph")# 创建模板@@ -57,53 +45,22 @@ result = template.parse("您的文本内容...")print(Gallery.list_all())```-### 创建自定义模板--用户可以在 `templates/customs/` 目录下创建自己的模板:--```python-# 添加自定义模板目录(自动加载)-Gallery.add_path("/path/to/my/templates")--# 获取自定义模板-config = Gallery.get("MyCustomTemplate")-```--### 废弃方式:使用 Python 类--```python-from hyperextract.templates.legacy.zh.general import KnowledgeGraph-from langchain_openai import ChatOpenAI, OpenAIEmbeddings--llm = ChatOpenAI(model="gpt-4o-mini")-embedder = OpenAIEmbeddings()--template = KnowledgeGraph(llm_client=llm, embedder=embedder)-result = template.parse("您的文本内容...")-```--> ⚠️ **警告**: `legacy/` 目录下的 Python 类模板已废弃,将在未来版本中删除。请迁移到基于 YAML 配置的模板。-----## 📋 目录--- [📚 通用](#1-general-通用general-purpose)-- [💰 金融](#2-finance-金融)-- [🏥 医疗](#3-medicine-医学)-- [🌿 中医](#4-tcm-中医中药)-- [⚙️ 工业](#5-industry-工业)-- [📜 历史](#6-history-历史)-- [🧬 生物](#7-biology-生物科学)-- [⚖️ 法律](#8-legal-法律)-- [🎭 文学](#9-literature-文学与影视)-- [📰 新闻](#10-news-新闻传媒)-- [🌾 农业](#11-agriculture-农业)-- [🍜 美食](#12-food-美食餐饮)+## 📋 领域索引++| 领域 | 描述 | 核心关注点 |+| :--- | :--- | :--- |+| **`general`** | 通用领域 | 任意文本、百科全书、人物传记、规章制度 |+| **`finance`** | 金融投资 | 财报、研报、会议纪要、金融资讯 |+| **`medicine`** | 医疗健康 | 临床指南、病历、药品文档 |+| **`tcm`** | 中医中药 | 医案、本草、方剂、经络 |+| **`industry`** | 工业制造 | 运维日志、安全报告、技术规格 |+| **`legal`** | 法律合规 | 合同协议、判决书、监管文件 |----## 底层原语说明+## 🔧 底层原语| 原语 | 说明 || :--- | :--- |@@ -116,28 +73,9 @@ result = template.parse("您的文本内容...")----## 领域索引--| 领域代码 | 领域名称 | 核心关注点 |-| :--- | :--- | :--- |-| **`general`** | 通用/百科 | 任意文本、百科全书、人物传记、规章制度 |-| **`finance`** | 金融投资 | 财报、研报、会议纪要、金融资讯 |-| **`medicine`** | 医疗健康 | 临床指南、病历、药品文档 |-| **`tcm`** | 中医中药 | 医案、本草、方剂、经络 |-| **`industry`** | 工业 | 运维日志、安全报告、技术规格 |-| **`history`** | 历史文化 | 编年史、信札、口述历史 |-| **`biology`** | 生物科学 | 蛋白组、代谢通路、生态调查 |-| **`legal`** | 法律合规 | 合同协议、判决书、监管文件 |-| **`literature`** | 文学与影视 | 剧本、小说、设定集 |-| **`news`** | 新闻传媒 | 调查报道、突发快讯 |-| **`agriculture`** | 农业 | 巡田报告、土壤分析 |-| **`food`** | 美食餐饮 | 标准化食谱、菜单分析 |-------## 领域详情+## 📚 领域详情-### 1. 📚 `general` (通用)+### 1. 📚 `general` (通用领域)适用于无法归类或多领域交叉的文本,通过提取基础实体和SPO关系构建通用图谱。@@ -176,11 +114,9 @@ result = template.parse("您的文本内容...")| **`PenaltyMapping`** | `AutoGraph` | 违规到结果的演变路径 | 风险溯源 || **`ClauseList`** | `AutoList` | 原子化条文 | 条文检索 |-[↑ 返回目录](#目录)-----### 2. 💰 `finance` (金融)+### 2. 💰 `finance` (金融投资)专注于提取复杂的交易关系、市场观点及时间敏感事件。@@ -233,11 +169,9 @@ result = template.parse("您的文本内容...")| **`MultiSourceSentimentHypergraph`** | `AutoHypergraph` | 多源情绪融合 | 集成评分 || **`MarketNarrativeTimeline`** | `AutoTemporalGraph` | 市场叙事演变 | 主题投资 |-[↑ 返回目录](#目录)-----### 3. 🏥 `medicine` (医学)+### 3. 🏥 `medicine` (医疗健康)专注于疾病诊疗逻辑、标准化术语映射及因果关系提取。@@ -282,8 +216,6 @@ result = template.parse("您的文本内容...")| **`ContraindicationList`** | `AutoList` | 绝对禁忌 | 处方拦截 || **`AdverseReactionStats`** | `AutoList` | 不良反应及发生率 | 药物警戒 |-[↑ 返回目录](#目录)----### 4. 🌿 `tcm` (中医中药)@@ -320,11 +252,9 @@ result = template.parse("您的文本内容...")| **`AcupointLocationMap`** | `AutoGraph` | 腧穴空间定位 | 针灸教学 || **`MeridianFlowGraph`** | `AutoGraph` | 十二经脉循行 | 经络理论 |-[↑ 返回目录](#目录)-----### 5. ⚙️ `industry` (工业)+### 5. ⚙️ `industry` (工业制造)专注于电力、制造、能源等行业的运维数据与日志分析。@@ -370,84 +300,9 @@ result = template.parse("您的文本内容...")| **`IncidentCausalityMap`** | `AutoHypergraph` | 隐患→触发→违章→后果 | 事故推演 || **`SafetyTimeline`** | `AutoTemporalGraph` | 操作与响应序列 | 事故复盘 |-[↑ 返回目录](#目录)-----### 6. 📜 `history` (历史)--专注于长跨度时间线梳理及人物社会网络构建。--* **历史专著**:对特定断代、事件或人物的深度分析。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`HistoricalKnowledgeGraph`** | `AutoGraph` | 人物关系、事件因果 | 社会网络分析 |-| **`MultiParticipantEventMap`** | `AutoHypergraph` | 多方参与事件 | 事件还原 |--* **编年史**:按时间顺序记录的历史事件。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`ChronologicalEventChain`** | `AutoTemporalGraph` | 带时间戳的原子事件 | 年表生成 |-| **`HistoricalContextGraph`** | `AutoGraph` | 静态关联(亲属、联盟)| 背景挖掘 |-| **`PoliticalStruggleHypergraph`** | `AutoHypergraph` | 攻守方、策划者、变节者 | 派系分析 |--* **口述历史**:第一人称回忆录。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`PersonalTrajectoryHypergraph`** | `AutoHypergraph` | 人生阶段超边 | 传记编撰 |-| **`NarrativeRelationGraph`** | `AutoGraph` | 主观视角人物互动 | 社会网络分析 |-| **`MemoryFlashbackList`** | `AutoList` | 轶事、感悟、侧面描写 | 历史细节 |--* **档案信札**:历史人物往来书信。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`EpistolaryKnowledgeGraph`** | `AutoGraph` | 信件内容中的人物事件 | 史料挖掘 |--[↑ 返回目录](#目录)-------### 7. 🧬 `biology` (生物科学)--从基因组扩展到蛋白质组学、代谢通路及生态学。--* **生物学专著**:物种分类、进化历史。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`SpeciesInteractionWeb`** | `AutoGraph` | 捕食、寄生、竞争、共生 | 食物网分析 |-| **`TaxonomicTree`** | `AutoGraph` | 界门纲目科属种层级 | 分类学数据库 |--* **蛋白质结构摘要**:晶体结构、配体结合位点。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`ProteinComplexMap`** | `AutoHypergraph` | 多亚基复合物 | 蛋白数据库 |-| **`BindingSiteModel`** | `AutoModel` | 活性位点、化学性质 | 药物设计 |--* **代谢通路描述**:生化反应级联。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`BiochemicalReactionHypergraph`** | `AutoHypergraph` | 酶+底物→产物反应 | 通路图谱 |-| **`RegulatoryNetwork`** | `AutoGraph` | 转录因子→启动子→基因表达 | 基因调控分析 |--* **生态调查**:物种形态、分布、生境特征。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`PhylogeneticRelationGraph`** | `AutoGraph` | 亲缘关系、演化距离 | 系统发育树 |-| **`BiodiversityRegistry`** | `AutoSet` | 观测物种及种群 | 生物多样性评估 |--[↑ 返回目录](#目录)-------### 8. ⚖️ `legal` (法律)+### 6. ⚖️ `legal` (法律合规)专注于权利义务逻辑、条件约束及法律事实。@@ -481,119 +336,16 @@ result = template.parse("您的文本内容...")| **`ComplianceRequirementList`** | `AutoList` | 具体义务或整改措施 | 合规分析 || **`BeneficialOwnershipGraph`** | `AutoGraph` | 股权穿透至UBO | AML/KYC |-[↑ 返回目录](#目录)-----### 9. 🎭 `literature` (文学与影视)--专注于叙事结构分析、角色互动及世界观设定。--* **影视剧本**:格式严格的文本(场景、对白)。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`SceneEventHypergraph`** | `AutoHypergraph` | 场景超边 | 剧本统筹 |-| **`CharacterArcTimeline`** | `AutoTemporalGraph` | 角色成长路径 | 人物分析 |--* **长篇小说**:复杂情节、众多人物。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`ComplexCharacterRelation`** | `AutoHypergraph` | 多方社会结构 | 群像分析 |-| **`StoryEntityGraph`** | `AutoGraph` | 物品、地点归属 | 世界观设定 |-| **`NarrativeEventChain`** | `AutoTemporalGraph` | 关键情节转折 | 梗概生成 |--* **文学评论**:主题、意象、结构分析。+## 📝 创建自定义模板-| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`MotifAssociationNet`** | `AutoGraph` | 反复出现的意象 | 符号学分析 |-| **`CritiqueArgumentHypergraph`** | `AutoHypergraph` | 论据→观点 | 论文分析 |-| **`NarrativeStructureTree`** | `AutoGraph` | 叙事结构层级 | 叙事学研究 |--[↑ 返回目录](#目录)-------### 10. 📰 `news` (新闻传媒)--专注于新闻要素 (5W1H)、事件因果链及观点分析。--* **深度调查报道**:揭示复杂社会关系的长篇报道。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`InvestigativeContextGraph`** | `AutoGraph` | 静态关系(任职、亲属)| 实体映射 |-| **`ComplexRelationNet`** | `AutoHypergraph` | 多方社会关联 | 政商分析 |-| **`KeyEventSequence`** | `AutoGraph` | 关键事件时间线 | 深度回顾 |--* **突发新闻与电讯**:注重时效性的短消息。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`NewsEntityGraph`** | `AutoGraph` | 核心实体及关系 | 新闻流 |-| **`NewsSummaryModel`** | `AutoModel` | 5W1H提取 | 新闻聚合 |-| **`LiveUpdateTimeline`** | `AutoGraph` | 分钟级更新 | 直播整理 |--* **政策解读与社论**:观点、论证逻辑分析。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`ViewpointStructure`** | `AutoHypergraph` | 观点→论据→结论 | 舆情分析 |-| **`ImpactChain`** | `AutoGraph` | 政策→影响群体→后果 | 政策解读 |--[↑ 返回目录](#目录)-------### 11. 🌾 `agriculture` (农业)--专注于作物全生命周期管理、田间监测及土壤健康数据。--* **农业技术手册**:种植规范、病虫害防治。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`CropGrowthCycle`** | `AutoTemporalGraph` | 各生长阶段农事操作 | 种植日历 |-| **`PestControlHypergraph`** | `AutoHypergraph` | 作物+阶段+诱因→防治方案 | 智能植保 |--* **巡田报告**:作物生长阶段及病虫害实地观察。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`FieldObservationList`** | `AutoList` | 地块、作物、问题、建议 | 病虫害预警 |--* **土壤分析报告**:化学成分及施肥建议。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`SoilNutrientModel`** | `AutoModel` | pH、有机质、N-P-K | 配方施肥 |-| **`AmendmentPlan`** | `AutoGraph` | 检测→限制因子→措施→目标 | 精准农业 |--[↑ 返回目录](#目录)-------### 12. 🍜 `food` (美食餐饮)--专注于食谱标准化、食材配伍逻辑及美食评价数据。--* **标准化食谱**:配料表、烹饪步骤。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`RecipeCollection`** | `AutoSet` | 唯一菜品实体及分类 | 菜单数字化 |-| **`StandardRecipeCard`** | `AutoModel` | 完整配料、步骤、技巧 | 后厨SOP |-| **`IngredientCompositionHypergraph`** | `AutoHypergraph` | 菜品主料辅料调味关系 | 成本过敏原管理 |--* **美食评论与感官评价**:专业食评人或研发团队评价。--| 模板 | 原语 | 描述 | 应用场景 |-| :--- | :--- | :--- | :--- |-| **`DishReviewSummary`** | `AutoList` | 核心评价点、推荐等级 | 必吃榜单 |-| **`SensoryEvaluationGraph`** | `AutoGraph` | 菜品→口感→食材/技法 | 风味归因 |+用户可以在 `templates/customs/` 目录下创建自己的模板:-[↑ 返回目录](#目录)+```python+# 添加自定义模板目录(自动加载)+Gallery.add_path("/path/to/my/templates")----+# 获取自定义模板+config = Gallery.get("MyCustomTemplate")+```diff --git a/hyperextract/templates/legacy/README.md b/hyperextract/templates/legacy/README.mdindex b46f875..e0f413a 100644--- a/hyperextract/templates/legacy/README.md+++ b/hyperextract/templates/legacy/README.md@@ -1,21 +1,55 @@-# Legacy Templates (废弃模板)+# Legacy Templates (废弃与归档模板)-> ⚠️ **警告**: 此目录下的所有 Python 模板文件已被废弃,将在未来版本中删除。+> ⚠️ **警告**: 此目录包含废弃的 Python 模板和归档的领域模板。++## 目录结构++```+legacy/+├── presets/ # 归档的领域模板(6个)+│ ├── agriculture/ # 农业+│ ├── biology/ # 生物科学+│ ├── food/ # 美食餐饮+│ ├── history/ # 历史+│ ├── literature/ # 文学与影视+│ └── news/ # 新闻传媒+├── zh/ # 废弃的Python模板+├── README_FULL.md # 完整版英文文档+└── README_ZH_FULL.md # 完整版中文文档+```## 说明-此目录包含旧版本的 Python 类模板,已被 YAML 配置文件模板取代。+此目录包含两部分内容:++### 1. 废弃的 Python 类模板 (`zh/`)++旧版本的 Python 类模板,已被 YAML 配置文件模板取代,将在未来版本中删除。++### 2. 归档的领域模板 (`presets/`)++以下6个领域模板已从核心模板中移除,归档至此:+- **agriculture** (农业) - 作物全生命周期管理、田间监测+- **biology** (生物科学) - 蛋白组、代谢通路、生态调查+- **food** (美食餐饮) - 标准化食谱、菜单分析+- **history** (历史) - 编年史、信札、口述历史+- **literature** (文学与影视) - 剧本、小说、设定集+- **news** (新闻传媒) - 调查报道、突发快讯++这些模板仍然可用,但不再是核心维护的领域。## 迁移指南-### 旧的使用方式(已废弃)+### Python 类模板迁移(已废弃)++#### 旧的使用方式(已废弃)```pythonfrom hyperextract.templates.legacy.zh.general import LifeEventTimelinetemplate = LifeEventTimeline(llm_client=llm, embedder=embedder)```-### 新的使用方式(推荐)+#### 新的使用方式(推荐)```pythonfrom hyperextract.utils.template_engine import Gallery, TemplateFactory@@ -26,13 +60,42 @@ config = Gallery.get("LifeEventTimeline")template = TemplateFactory.create(config, llm_client, embedder)```+### 使用归档的领域模板++归档的领域模板(agriculture、biology、food、history、literature、news)仍可通过以下方式使用:++```python+from hyperextract.utils.template_engine import Gallery, TemplateFactory++# 添加归档模板路径+Gallery.add_path("hyperextract/templates/legacy/presets")++# 获取归档模板+config = Gallery.get("CropGrowthCycle") # agriculture+template = TemplateFactory.create(config, llm_client, embedder)+```+## 删除时间线+### Python 类模板- **当前版本**: 标记为废弃,但仍可使用- **下个版本**: 在文档中明确推荐使用 YAML 配置方式- **未来版本 (v2.0)**: 删除此目录+### 归档领域模板+- **当前版本**: 从核心模板移除,归档至 legacy/presets+- **维护状态**: 低优先级维护,仅修复关键bug+- **未来计划**: 根据用户反馈决定是否恢复或永久移除+## 相关文档+### 核心文档+- [核心模板使用说明](../README.md) - 6个核心领域模板+- [核心模板使用说明(中文)](../README_ZH.md) - 6个核心领域模板(中文版)++### 完整文档+- [完整版英文文档](./README_FULL.md) - 包含全部12个领域的详细说明+- [完整版中文文档](./README_ZH_FULL.md) - 包含全部12个领域的详细说明(中文版)++### 迁移指南- [PYTHON转YAML配置指南](../PYTHON转YAML配置指南.md)-- [模板使用说明](../README.md)diff --git a/hyperextract/templates/legacy/README_FULL.md b/hyperextract/templates/legacy/README_FULL.mdnew file mode 100644index 0000000..f2af44a--- /dev/null+++ b/hyperextract/templates/legacy/README_FULL.md@@ -0,0 +1,599 @@+# Hyper-Extract Domain Knowledge Templates++The **Hyper-Extract Domain Templates** library allows you to extract structured knowledge graphs (Temporal, Spatial, Hypergraph, etc.) directly from raw documents.++This library is organized by **Domain**, ensuring that the extraction logic matches the specific vocabulary, document structures, and extraction goals of different industries.++> 切换至 [中文版](./README_ZH.md)++---++## 📁 Directory Structure++```+templates/+├── presets/ # Preset templates (system-provided)+│ ├── agriculture/+│ ├── biology/+│ ├── finance/+│ └── ...+├── customs/ # Custom templates (user-created)+│ └── (user templates)+├── legacy/ # Deprecated Python templates+│ ├── zh/+│ └── en/+├── README.md+└── README_ZH.md+```++### presets vs customs++| Directory | Purpose | Description |+|-----------|---------|-------------|+| `presets/` | Preset templates | System-provided knowledge templates, read-only |+| `customs/` | Custom templates | User-created templates, can override presets |++---++## 🚀 Usage++### Recommended: Using YAML Config++```python+from hyperextract.utils.template_engine import Gallery, TemplateFactory+from langchain_openai import ChatOpenAI, OpenAIEmbeddings++llm = ChatOpenAI(model="gpt-4o-mini")+embedder = OpenAIEmbeddings()++# Get template (auto-loaded presets and customs)+config = Gallery.get("KnowledgeGraph")++# Create template+template = TemplateFactory.create(config, llm, embedder)+result = template.parse("Your text here...")++# List all available templates+print(Gallery.list_all())+```++### Creating Custom Templates++Users can create their own templates in `templates/customs/`:++```python+# Add custom template directory (auto-loaded)+Gallery.add_path("/path/to/my/templates")++# Get custom template+config = Gallery.get("MyCustomTemplate")+```++### Deprecated: Using Python Class++```python+from hyperextract.templates.legacy.zh.general import KnowledgeGraph+from langchain_openai import ChatOpenAI, OpenAIEmbeddings++llm = ChatOpenAI(model="gpt-4o-mini")+embedder = OpenAIEmbeddings()++template = KnowledgeGraph(llm_client=llm, embedder=embedder)+result = template.parse("Your text here...")+```++> ⚠️ **Warning**: The Python class templates in `legacy/` are deprecated and will be removed in a future version. Please migrate to YAML config based templates.++---++## 📋 Table of Contents++- [📚 General](#1-general-general-purpose)+- [💰 Finance](#2-finance-finance)+- [🏥 Medicine](#3-medicine-medicine)+- [🌿 TCM](#4-tcm-traditional-chinese-medicine)+- [⚙️ Industry](#5-industry-industry)+- [📜 History](#6-history-history)+- [🧬 Biology](#7-biology-biology)+- [⚖️ Legal](#8-legal-legal)+- [🎭 Literature](#9-literature-literature--fiction)+- [📰 News](#10-news-news--journalism)+- [🌾 Agriculture](#11-agriculture-agriculture)+- [🍜 Food](#12-food-food)++---++## Primitive Types Overview++| Primitive | Description |+| :--- | :--- |+| **`AutoGraph`** | Knowledge Graph - extracts entities and pairwise relationships |+| **`AutoSet`** | Entity Set - deduplicates and collects unique entities |+| **`AutoList`** | List - extracts arrays of values (keywords, items, etc.) |+| **`AutoModel`** | Data Model - extracts structured data fields (like an infobox) |+| **`AutoTemporalGraph`** | Temporal Graph - builds time-ordered event sequences |+| **`AutoHypergraph`** | Hypergraph - models complex multi-entity relationships |++---++## Domain Index++| Domain | Description | Key Focus |+| :--- | :--- | :--- |+| **`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 |+| **`industry`** | Industry | Maintenance, Safety, Operations |+| **`history`** | History & Culture | Chronicles, Timelines, Archives |+| **`biology`** | Biological Science | Genomics, Proteomics, Ecology |+| **`legal`** | Legal & Compliance | Contracts, Judgments, Regulations |+| **`literature`** | Literature & Fiction | Scripts, Novels, World Building |+| **`news`** | News & Media | Investigative Reports, Breaking News |+| **`agriculture`** | Agriculture | Crop Management, Soil Analysis |+| **`food`** | Food & Culinary | Recipes, Menu Engineering |++---++## Domain Details++### 1. 📚 `general` (General Purpose)++The default choice for unstructured text that doesn't fit a specific industry.++* **Arbitrary Text (Universal Extraction)**: Any type of text for direct entity and relationship extraction.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`KnowledgeGraph`** | `AutoGraph` | General-purpose knowledge graph extraction | Open-domain text, web pages |+| **`EntityRegistry`** | `AutoSet` | Deduplicates unique entities (People, Orgs) | Entity collection, NER tasks |+| **`KeywordList`** | `AutoList` | Core concepts, topics, or tags | Content indexing, tagging |++* **Wikipedia / Encyclopedias**: Comprehensive entity descriptions with structured attributes.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`EncyclopediaItem`** | `AutoModel` | Structured profile (infobox style) | Wiki pages, dictionaries |+| **`ConceptHierarchy`** | `AutoGraph` | Taxonomy: Subclass-Of, Part-Of relations | Scientific wikis, textbooks |+| **`CrossReferenceNet`** | `AutoGraph` | Hyperlinks and citations between concepts | Navigation maps |++* **Biographies & Memoirs**: Life stories focusing on key events and relationships.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`LifeEventTimeline`** | `AutoTemporalGraph` | Chronological life events with timestamps | Biographies, diaries |+| **`SocialNetwork`** | `AutoGraph` | Interpersonal relationships and interactions | Character studies |+| **`PersonalProfile`** | `AutoModel` | Static attributes (birth, education, career) | Profiles, CVs |++* **Regulations & Compliance**: Policies, SOPs, and compliance guidelines.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`RegulationProfile`** | `AutoModel` | Policy name, version, scope, effective date | Policy overview, version control |+| **`ComplianceLogic`** | `AutoHypergraph` | Complex "Who + Condition → Must/Must Not Do What" | Compliance auditing |+| **`PenaltyRegistry`** | `AutoSet` | Unique violations and consequences | Risk management |+| **`OperationalProcedure`** | `AutoGraph` | Sequential steps for applications/approvals | SOP visualization |+| **`PenaltyMapping`** | `AutoGraph` | Violation → Process → Consequence chain | Root cause analysis |+| **`ClauseList`** | `AutoList` | Atomic clauses for quick indexing | Clause retrieval |++[↑ Back to Top](#table-of-contents)++---++### 2. 💰 `finance` (Finance)++Optimized for complex financial relationships, market sentiment, and temporal events.++* **SEC Filings (10-K / 10-Q / 8-K)**: Standardized regulatory filings with financial statements, MD&A, risk factors.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`FilingFinancialSnapshot`** | `AutoModel` | Key figures from financial statements | Fundamental screening |+| **`MDANarrativeGraph`** | `AutoGraph` | Causal relationships from MD&A | Narrative analytics |+| **`FilingRiskFactorSet`** | `AutoSet` | Risk factors from Item 1A | Risk monitoring |+| **`MaterialEventTimeline`** | `AutoTemporalGraph` | Material events from 8-K reports | Event-driven analysis |+| **`SegmentPerformanceList`** | `AutoList` | Revenue, income by segment/region | Segment valuation |+| **`FinancialDataTemporalGraph`** | `AutoTemporalGraph` | Financial metrics across reporting periods | Trend analysis |+| **`RiskAssessmentGraph`** | `AutoGraph` | Risk factor → Financial impact paths | Risk monitoring |+| **`SupplyChainGraph`** | `AutoGraph` | Supply chain entities and risks | ESG analysis |++* **Equity Research Reports**: Analyst reports with ratings, target prices, investment logic.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ResearchNoteSummary`** | `AutoModel` | Ratings, target price, investment logic | Report database |+| **`FinancialForecast`** | `AutoList` | Projected Revenue, EPS, PE | Consensus analysis |+| **`ValuationLogicMap`** | `AutoGraph` | Causal chains for stock performance | Strategy mapping |+| **`FactorInfluenceHypergraph`** | `AutoHypergraph` | Macro → Industry → Company relationships | Factor attribution |+| **`RiskFactorList`** | `AutoList` | Downside risks | Risk monitoring |++* **Prospectuses / IPO (S-1)**: Company history, shareholder structure, use of proceeds.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ShareholderStructure`** | `AutoGraph` | Ownership percentages, controlling paths | Due diligence |+| **`ProceedsUsage`** | `AutoList` | Project names, amounts, timelines | Post-IPO monitoring |+| **`CompanyHistoryTimeline`** | `AutoTemporalGraph` | Founding, funding, pivots | History mapping |++* **Earnings Call Transcripts**: Quarterly conference calls with financial results and guidance.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`EarningsCallSummary`** | `AutoModel` | Metrics, guidance, call tone | Quarterly review |+| **`ManagementGuidanceList`** | `AutoList` | Forward-looking statements | Guidance tracking |+| **`DiscussionGraph`** | `AutoGraph` | Entity relationships in Q&A | Analyst focus analysis |+| **`CallSentimentHypergraph`** | `AutoHypergraph` | Multi-dimensional sentiment analysis | Trading signals |++* **Financial News & Market Commentary**: News articles and market commentary.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`MarketSentimentModel`** | `AutoModel` | Sentiment polarity, entities, price impact | Trading signals |+| **`FinancialEventCausalGraph`** | `AutoGraph` | Event → Entity → Market reaction | Strategy analysis |+| **`MultiSourceSentimentHypergraph`** | `AutoHypergraph` | Cross-source sentiment fusion | Ensemble scoring |+| **`MarketNarrativeTimeline`** | `AutoTemporalGraph` | Narrative evolution over time | Thematic investing |++[↑ Back to Top](#table-of-contents)++---++### 3. 🏥 `medicine` (Medicine)++Focuses on causality, standardized terminology (UMLS), and precise relationships.++* **Medical Textbooks**: Anatomy, pathology, treatment protocols.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`PathologyHypergraph`** | `AutoHypergraph` | Gene + Env + Trigger → Disease | Research KB |+| **`MedicalConceptNet`** | `AutoGraph` | Medical terms and semantic relations | Taxonomy building |+| **`PharmacologyGraph`** | `AutoGraph` | Drug-receptor-physiology interactions | Drug mechanism analysis |+| **`AnatomyHierarchy`** | `AutoGraph` | Hierarchical anatomy positions | Surgical planning |+| **`SymptomDifferential`** | `AutoSet` | Symptoms → Differential diseases | Diagnostic support |++* **Clinical Practice Guidelines**: Standardized treatment decision trees.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`TreatmentRegimenMap`** | `AutoHypergraph` | Multi-modal treatments | Oncology protocols |+| **`ClinicalPathway`** | `AutoGraph` | If-Then-Else clinical decisions | Pathway management |+| **`LevelOfEvidence`** | `AutoList` | Recommendations with evidence grades | Clinical QA |++* **Discharge Summaries**: Patient hospital stay narratives.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SurgicalEventGraph`** | `AutoHypergraph` | Surgery as {Surgeon, Site, Procedure, Tools} | Quality control |+| **`HospitalCourseTimeline`** | `AutoTemporalGraph` | Admission → Tests → Procedures → Outcomes | Case review |+| **`DischargeInstruction`** | `AutoModel` | Medications, follow-ups, rehabilitation | Patient management |++* **Pathology Reports**: Microscopic tissue descriptions.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`TumorStagingItem`** | `AutoModel` | TNM staging (T, N, M, Stage) | Tumor registry |+| **`MicroscopicFeatureSet`** | `AutoSet` | IHC results and mutations | Targeted therapy |++* **Drug Package Inserts**: Indications, contraindications, interactions.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ComplexInteractionNet`** | `AutoHypergraph` | Drug A + B + condition → Reaction | CDSS |+| **`ContraindicationList`** | `AutoList` | Absolute contraindications | Prescription blocking |+| **`AdverseReactionStats`** | `AutoList` | Reactions by system with frequency | Pharmacovigilance |++[↑ Back to Top](#table-of-contents)++---++### 4. 🌿 `tcm` (Traditional Chinese Medicine)++Specialized for syndrome differentiation (`Bian Zheng`) and herbal compatibility.++* **Medical Case Records (Yi An)**: Clinical records with symptoms, pattern differentiation, and formulas.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SyndromeReasoningGraph`** | `AutoHypergraph` | Symptoms → Syndrome → Principle → Formula | Experience mining |+| **`PrescriptionModification`** | `AutoGraph` | Base formula modifications by symptoms | Clinical rules analysis |+| **`PulseTongueRecord`** | `AutoList` | Tongue and pulse characteristics | Diagnosis objectification |++* **Herbal Compendiums (Ben Cao)**: Herb properties, flavors, meridian tropism.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`HerbPropertyModel`** | `AutoModel` | Four Natures, Five Flavors, Toxicity | TCM database |+| **`CompatibilityNet`** | `AutoGraph` | Seven Emotions relationships | Contraindication warning |+| **`ProcessingMethod`** | `AutoList` | Processing methods and effects | Processing standards |++* **Prescription Formularies (Fang Zhu)**: Formula composition with Monarch/Minister/Assistant/Envoy roles.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`FormulaComposition`** | `AutoHypergraph` | Formula hierarchy (Monarch, Minister, Assistant, Envoy) | Structure analysis |+| **`FunctionIndicationMap`** | `AutoGraph` | Formula → Functions → Indications | Recommendation systems |++* **Meridian & Acupoint Treatises**: Acupoint locations and therapeutic effects.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`AcupointLocationMap`** | `AutoGraph` | Acupoint spatial relationships | Acupuncture teaching |+| **`MeridianFlowGraph`** | `AutoGraph` | Twelve meridian pathways | Meridian theory |++[↑ Back to Top](#table-of-contents)++---++### 5. ⚙️ `industry` (Industry)++Focuses on operational data in manufacturing, energy, and power sectors.++* **Management Specifications**: Safety procedures, emergency plans.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SafetyControlGraph`** | `AutoGraph` | Hazard sources, risk points, controls | Safety procedures |+| **`EmergencyResponseGraph`** | `AutoGraph` | Incident scenarios, response actions | Emergency plans |+| **`IncidentCausalityMap`** | `AutoHypergraph` | Hazard → Trigger → Violation → Consequence | Risk prevention |+| **`SafetyTimeline`** | `AutoTemporalGraph` | Operations and response sequences | Accident review |++* **Technical Specifications / Datasheets**: Equipment parameters, design standards.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SystemTopologyGraph`** | `AutoGraph` | Factory areas, systems, equipment hierarchy | System manuals |+| **`EquipmentTopologyGraph`** | `AutoGraph` | Equipment entities and connections | Equipment diagrams |+| **`SpecParameterTable`** | `AutoModel` | Rated power, materials, tolerances | Equipment records |+| **`SystemCompatibilityGraph`** | `AutoHypergraph` | Device-environment relationships | Selection assistance |++* **Operations**: Operating procedures, mode switching.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`OperationFlowGraph`** | `AutoGraph` | Operation steps, states, results | Operating procedures |+| **`OperatingModeGraph`** | `AutoGraph` | Operating modes and switching conditions | Mode switching |+| **`MaintenaceOperationMap`** | `AutoHypergraph` | Operator, tool, object, duration | SOP standardization |++* **Maintenance**: Inspection records, failure cases, spare parts.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`InspectionRecordGraph`** | `AutoGraph` | Equipment and inspection items | Inspection logs |+| **`FailureCaseGraph`** | `AutoGraph` | Phenomena, causes, measures, lessons | Failure case libraries |+| **`FailureKnowledgeHypergraph`** | `AutoHypergraph` | Phenomena, causes, components, solutions | Fault diagnosis |+| **`PartReplacementList`** | `AutoList` | Part numbers, quantities, reasons | Spare parts management |++* **HSE Incident Reports**: Safety incident investigations.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`IncidentCausalityMap`** | `AutoHypergraph` | Hazard, trigger, violation, consequence | Accident simulation |+| **`SafetyTimeline`** | `AutoTemporalGraph` | Operations and response sequences | Accident review |++[↑ Back to Top](#table-of-contents)++---++### 6. 📜 `history` (History)++Focuses on long-span timelines and social network reconstruction.++* **Historical Monographs**: Academic analysis of periods, events, figures.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`HistoricalKnowledgeGraph`** | `AutoGraph` | Kinship, Minister-Ruler, causality | Social network analysis |+| **`MultiParticipantEventMap`** | `AutoHypergraph` | Events as hyperedges connecting participants | Event reconstruction |++* **Chronicles**: Strictly chronological records.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ChronologicalEventChain`** | `AutoTemporalGraph` | Atomic events with timestamps | Timeline generation |+| **`HistoricalContextGraph`** | `AutoGraph` | Static relationships (kinship, alliances) | Background mining |+| **`PoliticalStruggleHypergraph`** | `AutoHypergraph` | {Attacker, Defender, Planner, Traitor} in battles | Faction analysis |++* **Oral History**: First-person memoirs with non-linear narratives.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`PersonalTrajectoryHypergraph`** | `AutoHypergraph` | Life stages as {Period, Location, Peers, Experience} | Biography writing |+| **`NarrativeRelationGraph`** | `AutoGraph` | Interpersonal interactions from narrator's view | Social network analysis |+| **`MemoryFlashbackList`** | `AutoList` | Specific anecdotes, feelings, side descriptions | Historical detail |++* **Archival Correspondence**: Letters revealing hidden social networks.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`EpistolaryKnowledgeGraph`** | `AutoGraph` | Entities and relations within letter content | Historical material mining |++[↑ Back to Top](#table-of-contents)++---++### 7. 🧬 `biology` (Biology)++Beyond genomics: proteomics, metabolism, and ecology.++* **Biological Monographs**: Species taxonomy, evolutionary history.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SpeciesInteractionWeb`** | `AutoGraph` | Predation, parasitism, competition, symbiosis | Food web analysis |+| **`TaxonomicTree`** | `AutoGraph` | Kingdom → Phylum → ... → Species hierarchy | Taxonomy database |++* **Protein Structure Summaries**: Crystal structures, binding sites.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ProteinComplexMap`** | `AutoHypergraph` | Multi-subunit assemblies | Complex databases |+| **`BindingSiteModel`** | `AutoModel` | Active site residues, binding pocket chemistry | Drug design |++* **Metabolic Pathway Descriptions**: Biochemical cascades.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`BiochemicalReactionHypergraph`** | `AutoHypergraph` | Enzyme + Substrate → Product reactions | Pathway mapping |+| **`RegulatoryNetwork`** | `AutoGraph` | TF → Promoter → Gene expression | Gene regulation analysis |++* **Ecological Surveys**: Species distribution, habitat characteristics.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`PhylogeneticRelationGraph`** | `AutoGraph` | Evolutionary relationships, branching patterns | Phylogenetic trees |+| **`BiodiversityRegistry`** | `AutoSet` | Observed species and populations | Biodiversity assessment |++[↑ Back to Top](#table-of-contents)++---++### 8. ⚖️ `legal` (Legal)++Precise logical conditions, obligations, and citations.++* **Legal Treatises**: Analysis of legal principles and case law.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`LegalConceptOntology`** | `AutoGraph` | Definitions, Is-A relations, interpretations | Legal research |+| **`CaseLawCitationNet`** | `AutoGraph` | Case citations, distinguish, overrule | Precedent analysis |++* **Master Service Agreements (MSA)**: Long-term contracts, liability, IP rights.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ContractObligationHypergraph`** | `AutoHypergraph` | {Party, Duty, Trigger, Exception, Penalty} | Contract review |+| **`DefinedTermRegistry`** | `AutoSet` | Defined capitalized terms | Consistency check |+| **`LiabilityClauseList`** | `AutoList` | Indemnification, limitations, warranties | Risk assessment |++* **Court Judgments**: Rulings with fact-finding and reasoning.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`CaseFactTimeline`** | `AutoTemporalGraph` | Chronological sequence of events | Case analysis |+| **`AdjudicationLogic`** | `AutoHypergraph` | {Proven Fact + Law → Conclusion} | Judgment prediction |+| **`LitigationParticipantMap`** | `AutoGraph` | Plaintiff, defendant, counsel, witness relations | Conflict check |++* **Regulatory Compliance Filings**: Data privacy, AML, environmental reports.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ComplianceRequirementList`** | `AutoList` | Specific affirmative/negative duties | Gap analysis |+| **`BeneficialOwnershipGraph`** | `AutoGraph` | Corporate ownership layers to UBO | AML/KYC screening |++[↑ Back to Top](#table-of-contents)++---++### 9. 🎭 `literature` (Literature & Fiction)++Narrative structure, character interactions, world-building.++* **Screenplays / Scripts**: Highly structured (Scene, Action, Dialogue).++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SceneEventHypergraph`** | `AutoHypergraph` | Scene as {Characters, Location, Props, Actions} | Scene analysis |+| **`CharacterArcTimeline`** | `AutoTemporalGraph` | Character location, emotion, actions over time | Development analysis |++* **Novels**: Complex plots, numerous characters.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ComplexCharacterRelation`** | `AutoHypergraph` | Multi-party structures (triangles, alliances) | Ensemble analysis |+| **`StoryEntityGraph`** | `AutoGraph` | Items, locations, ownership | World-building DB |+| **`NarrativeEventChain`** | `AutoTemporalGraph` | Key plot points by internal timeline | Synopsis generation |++* **Literary Criticism**: Themes, motifs, intertextuality.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`MotifAssociationNet`** | `AutoGraph` | Recurring symbols and motifs | Semiotics |+| **`CritiqueArgumentHypergraph`** | `AutoHypergraph` | {Evidence1, Evidence2, Quote} → Thesis | Paper analysis |+| **`NarrativeStructureTree`** | `AutoGraph` | Hierarchical narrative structure | Narratology |++[↑ Back to Top](#table-of-contents)++---++### 10. 📰 `news` (News & Journalism)++Focuses on 5Ws (Who, What, Where, When, Why), event causality, viewpoint analysis.++* **Investigative Journalism**: Long-form reporting revealing complex truths.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`InvestigativeContextGraph`** | `AutoGraph` | Baseline relationships (employment, kinship) | Entity mapping |+| **`ComplexRelationNet`** | `AutoHypergraph` | Multi-party connections (family, political, business) | Political analysis |+| **`KeyEventSequence`** | `AutoGraph` | Chronological sequence of critical events | Backgrounders |++* **Breaking News Wires**: Short, factual updates.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`NewsEntityGraph`** | `AutoGraph` | Key entities (people, orgs, locations, events) | News feeds |+| **`NewsSummaryModel`** | `AutoModel` | 5W1H extraction | News aggregation |+| **`LiveUpdateTimeline`** | `AutoGraph` | Minute-by-minute updates | Live blog summary |++* **Policy Analysis & Editorials**: Opinions, arguments, future impacts.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`ViewpointStructure`** | `AutoHypergraph` | {Claim, Premises, Conclusion} | Opinion mining |+| **`ImpactChain`** | `AutoGraph` | Policy → Affected Groups → Consequences | Policy reviews |++[↑ Back to Top](#table-of-contents)++---++### 11. 🌾 `agriculture` (Agriculture)++Crop lifecycle, field monitoring, soil health.++* **Agricultural Manuals**: Planting standards, pest control.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`CropGrowthCycle`** | `AutoTemporalGraph` | Farming operations per growth stage | Planting calendar |+| **`PestControlHypergraph`** | `AutoHypergraph` | {Crop, Stage, Factor} → {Target, Agent, Dosage} | Smart crop protection |++* **Crop Scouting Reports**: Field observations.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`FieldObservationList`** | `AutoList` | {Field ID, Crop, Stage, Issue, Severity, Recommendation} | Pest early warning |++* **Soil Analysis Reports**: Soil chemistry and fertilization recommendations.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`SoilNutrientModel`** | `AutoModel` | pH, Organic Matter, N-P-K, micronutrients | Fertilizer prescription |+| **`AmendmentPlan`** | `AutoGraph` | Test Result → Limiting Factor → Method → Outcome | Precision agriculture |++[↑ Back to Top](#table-of-contents)++---++### 12. 🍜 `food` (Food)++Recipe standardization, ingredient pairing, food reviews.++* **Standardized Recipes**: Ingredient lists, cooking steps.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`RecipeCollection`** | `AutoSet` | Unique dish entities and classifications | Menu digitization |+| **`StandardRecipeCard`** | `AutoModel` | Complete ingredients, steps, tips | Kitchen SOP cards |+| **`IngredientCompositionHypergraph`** | `AutoHypergraph` | {Dish, Main, Accessory, Seasoning} relationships | Cost, allergen management |++* **Food Reviews**: Professional evaluations.++| Template | Primitive | Description | Use Case |+| :--- | :--- | :--- | :--- |+| **`DishReviewSummary`** | `AutoList` | Core points, recommendation level, price | Must-try lists |+| **`SensoryEvaluationGraph`** | `AutoGraph` | Dish → Taste/Texture → Ingredient/Technique | Flavor analysis |++[↑ Back to Top](#table-of-contents)++---diff --git a/hyperextract/templates/legacy/README_ZH_FULL.md b/hyperextract/templates/legacy/README_ZH_FULL.mdnew file mode 100644index 0000000..a816157--- /dev/null+++ b/hyperextract/templates/legacy/README_ZH_FULL.md@@ -0,0 +1,599 @@+# Hyper-Extract 领域知识抽取模板++**Hyper-Extract 领域模板库** 旨在为不同垂直行业提供专业的非结构化文本抽取能力。++本库按 **领域 (Domain)** 组织,每个领域针对其特定的文档类型、行业术语和业务逻辑进行了优化。++> 切换至 [English Version](./README.md)++---++## 📁 目录结构++```+templates/+├── presets/ # 预设模板(系统预置)+│ ├── agriculture/+│ ├── biology/+│ ├── finance/+│ └── ...+├── customs/ # 自定义模板(用户可自行创建)+│ └── (用户模板)+├── legacy/ # 废弃的 Python 模板+│ ├── zh/+│ └── en/+├── README.md+└── README_ZH.md+```++### presets vs customs++| 目录 | 用途 | 说明 |+|------|------|------|+| `presets/` | 预设模板 | 系统预置的知识模板,用户只能读取使用 |+| `customs/` | 自定义模板 | 用户自行创建的模板,可覆盖同名预设 |++---++## 🚀 使用方式++### 推荐方式:使用 YAML 配置++```python+from hyperextract.utils.template_engine import Gallery, TemplateFactory+from langchain_openai import ChatOpenAI, OpenAIEmbeddings++llm = ChatOpenAI(model="gpt-4o-mini")+embedder = OpenAIEmbeddings()++# 直接获取模板(自动加载 presets 和 customs)+config = Gallery.get("KnowledgeGraph")++# 创建模板+template = TemplateFactory.create(config, llm, embedder)+result = template.parse("您的文本内容...")++# 列出所有可用模板+print(Gallery.list_all())+```++### 创建自定义模板++用户可以在 `templates/customs/` 目录下创建自己的模板:++```python+# 添加自定义模板目录(自动加载)+Gallery.add_path("/path/to/my/templates")++# 获取自定义模板+config = Gallery.get("MyCustomTemplate")+```++### 废弃方式:使用 Python 类++```python+from hyperextract.templates.legacy.zh.general import KnowledgeGraph+from langchain_openai import ChatOpenAI, OpenAIEmbeddings++llm = ChatOpenAI(model="gpt-4o-mini")+embedder = OpenAIEmbeddings()++template = KnowledgeGraph(llm_client=llm, embedder=embedder)+result = template.parse("您的文本内容...")+```++> ⚠️ **警告**: `legacy/` 目录下的 Python 类模板已废弃,将在未来版本中删除。请迁移到基于 YAML 配置的模板。++---++## 📋 目录++- [📚 通用](#1-general-通用general-purpose)+- [💰 金融](#2-finance-金融)+- [🏥 医疗](#3-medicine-医学)+- [🌿 中医](#4-tcm-中医中药)+- [⚙️ 工业](#5-industry-工业)+- [📜 历史](#6-history-历史)+- [🧬 生物](#7-biology-生物科学)+- [⚖️ 法律](#8-legal-法律)+- [🎭 文学](#9-literature-文学与影视)+- [📰 新闻](#10-news-新闻传媒)+- [🌾 农业](#11-agriculture-农业)+- [🍜 美食](#12-food-美食餐饮)++---++## 底层原语说明++| 原语 | 说明 |+| :--- | :--- |+| **`AutoGraph`** | 知识图谱 - 提取实体及成对关系 |+| **`AutoSet`** | 实体集合 - 去重并汇总唯一实体 |+| **`AutoList`** | 列表 - 提取数值数组(关键词、条目等)|+| **`AutoModel`** | 数据模型 - 提取结构化字段(如信息框)|+| **`AutoTemporalGraph`** | 时序图谱 - 构建时间有序的事件序列 |+| **`AutoHypergraph`** | 超图 - 建模复杂的多实体关系 |++---++## 领域索引++| 领域代码 | 领域名称 | 核心关注点 |+| :--- | :--- | :--- |+| **`general`** | 通用/百科 | 任意文本、百科全书、人物传记、规章制度 |+| **`finance`** | 金融投资 | 财报、研报、会议纪要、金融资讯 |+| **`medicine`** | 医疗健康 | 临床指南、病历、药品文档 |+| **`tcm`** | 中医中药 | 医案、本草、方剂、经络 |+| **`industry`** | 工业 | 运维日志、安全报告、技术规格 |+| **`history`** | 历史文化 | 编年史、信札、口述历史 |+| **`biology`** | 生物科学 | 蛋白组、代谢通路、生态调查 |+| **`legal`** | 法律合规 | 合同协议、判决书、监管文件 |+| **`literature`** | 文学与影视 | 剧本、小说、设定集 |+| **`news`** | 新闻传媒 | 调查报道、突发快讯 |+| **`agriculture`** | 农业 | 巡田报告、土壤分析 |+| **`food`** | 美食餐饮 | 标准化食谱、菜单分析 |++---++## 领域详情++### 1. 📚 `general` (通用)++适用于无法归类或多领域交叉的文本,通过提取基础实体和SPO关系构建通用图谱。++* **任意文本 (通用提取)**:适用于任何类型的文本,直接提取其中的实体及关系。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`KnowledgeGraph`** | `AutoGraph` | 通用知识图谱提取 | 任意文本、网页内容 |+| **`EntityRegistry`** | `AutoSet` | 去重唯一实体(人名、机构) | 实体发现、NER任务 |+| **`KeywordList`** | `AutoList` | 核心概念、主题或标签 | 内容打标、索引生成 |++* **百科条目**:对实体的综合性描述,包含结构化属性信息。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`EncyclopediaItem`** | `AutoModel` | 结构化属性信息(信息框风格)| 百科词典词条 |+| **`ConceptHierarchy`** | `AutoGraph` | 上下位/组成关系 | 科学教材知识点 |+| **`CrossReferenceNet`** | `AutoGraph` | 超链接与相互引用 | 跨词条关联 |++* **人物传记与回忆录**:记录个人生平事迹、主要成就及社会关系。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`LifeEventTimeline`** | `AutoTemporalGraph` | 带时间戳的生平事件 | 传记、年表 |+| **`SocialNetwork`** | `AutoGraph` | 人际关系与互动 | 人物分析 |+| **`PersonalProfile`** | `AutoModel` | 静态属性(生卒年、学历)| 简历、简介 |++* **规章制度与合规文档**:公司制度、操作手册、合规指南。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`RegulationProfile`** | `AutoModel` | 制度名称、版本、生效日期 | 制度概览 |+| **`ComplianceLogic`** | `AutoHypergraph` | 条件性行为逻辑 | 合规审计 |+| **`PenaltyRegistry`** | `AutoSet` | 违规行为与后果 | 风险管控 |+| **`OperationalProcedure`** | `AutoGraph` | 申报审批具体步骤 | SOP流程 |+| **`PenaltyMapping`** | `AutoGraph` | 违规到结果的演变路径 | 风险溯源 |+| **`ClauseList`** | `AutoList` | 原子化条文 | 条文检索 |++[↑ 返回目录](#目录)++---++### 2. 💰 `finance` (金融)++专注于提取复杂的交易关系、市场观点及时间敏感事件。++* **SEC财报 (10-K / 10-Q / 8-K)**:标准化财务申报文件,涵盖财务报表、MD&A、风险因素。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`FilingFinancialSnapshot`** | `AutoModel` | 关键财务数据 | 基本面筛选 |+| **`MDANarrativeGraph`** | `AutoGraph` | MD&A因果关系 | 叙事分析 |+| **`FilingRiskFactorSet`** | `AutoSet` | 风险因素登记 | 风险监控 |+| **`MaterialEventTimeline`** | `AutoTemporalGraph` | 重大事件时间轴 | 事件驱动分析 |+| **`SegmentPerformanceList`** | `AutoList` | 分部/区域业绩 | 分部估值 |+| **`FinancialDataTemporalGraph`** | `AutoTemporalGraph` | 跨期财务指标 | 趋势分析 |+| **`RiskAssessmentGraph`** | `AutoGraph` | 风险传导路径 | 风险监控 |+| **`SupplyChainGraph`** | `AutoGraph` | 供应链主体与风险 | ESG分析 |++* **股票研究报告**:分析师深度报告,包含评级、目标价及投资逻辑。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ResearchNoteSummary`** | `AutoModel` | 评级、目标价、投资逻辑 | 研报数据库 |+| **`FinancialForecast`** | `AutoList` | 营收、EPS、PE预测 | 一致性预期 |+| **`ValuationLogicMap`** | `AutoGraph` | 股价驱动因果链 | 策略映射 |+| **`FactorInfluenceHypergraph`** | `AutoHypergraph` | 宏观→行业→公司关联 | 因子归因 |+| **`RiskFactorList`** | `AutoList` | 下行风险点 | 风险监控 |++* **招股说明书 (IPO)**:企业上市前披露文件,详述股权结构、募集资金用途。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ShareholderStructure`** | `AutoGraph` | 股东占比、层级关系 | 尽职调查 |+| **`ProceedsUsage`** | `AutoList` | 募投项目、金额、时间表 | 投后管理 |+| **`CompanyHistoryTimeline`** | `AutoTemporalGraph` | 成立、融资、并购大事 | 企业历史 |++* **财报电话会议**:管理层业绩说明会实录,包含前瞻性指引。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`EarningsCallSummary`** | `AutoModel` | 核心指标、指引、会议基调 | 季度回顾 |+| **`ManagementGuidanceList`** | `AutoList` | 前瞻性声明 | 业绩指引跟踪 |+| **`DiscussionGraph`** | `AutoGraph` | 讨论实体及多元关系 | 分析师关注分析 |+| **`CallSentimentHypergraph`** | `AutoHypergraph` | 多维情感信号 | 交易信号 |++* **金融新闻与市场评论**:传递市场情绪、事件影响的新闻报道。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`MarketSentimentModel`** | `AutoModel` | 情感极性、实体、价格影响 | 交易信号 |+| **`FinancialEventCausalGraph`** | `AutoGraph` | 事件→实体→市场反应 | 策略分析 |+| **`MultiSourceSentimentHypergraph`** | `AutoHypergraph` | 多源情绪融合 | 集成评分 |+| **`MarketNarrativeTimeline`** | `AutoTemporalGraph` | 市场叙事演变 | 主题投资 |++[↑ 返回目录](#目录)++---++### 3. 🏥 `medicine` (医学)++专注于疾病诊疗逻辑、标准化术语映射及因果关系提取。++* **医学教科书与专著**:系统性阐述解剖、病理、治疗原则。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`PathologyHypergraph`** | `AutoHypergraph` | 基因+环境+诱因→疾病 | 研究知识库 |+| **`MedicalConceptNet`** | `AutoGraph` | 医学术语及语义关系 | 术语标准化 |+| **`PharmacologyGraph`** | `AutoGraph` | 药物-受体-生理反应 | 药理分析 |+| **`AnatomyHierarchy`** | `AutoGraph` | 解剖位置层级 | 手术导航 |+| **`SymptomDifferential`** | `AutoSet` | 症状→鉴别疾病 | 辅助诊断 |++* **临床诊疗指南**:标准化治疗决策路径。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`TreatmentRegimenMap`** | `AutoHypergraph` | 多因素治疗方案 | 肿瘤化疗方案 |+| **`ClinicalPathway`** | `AutoGraph` | 临床决策树 | 诊疗规范化 |+| **`LevelOfEvidence`** | `AutoList` | 推荐意见及证据等级 | 临床质控 |++* **出院小结**:患者住院全过程的叙述性记录。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SurgicalEventGraph`** | `AutoHypergraph` | 手术复杂事件 | 手术质控 |+| **`HospitalCourseTimeline`** | `AutoTemporalGraph` | 入院→检查→治疗→转归 | 病历质控 |+| **`DischargeInstruction`** | `AutoModel` | 出院带药、复诊、康复 | 患者随访 |++* **病理报告**:对组织样本的微观描述。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`TumorStagingItem`** | `AutoModel` | TNM分期 | 肿瘤登记 |+| **`MicroscopicFeatureSet`** | `AutoSet` | 免疫组化、基因突变 | 靶向药匹配 |++* **药品说明书**:包含适应症、禁忌症等专业信息。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ComplexInteractionNet`** | `AutoHypergraph` | 药物相互作用 | CDSS |+| **`ContraindicationList`** | `AutoList` | 绝对禁忌 | 处方拦截 |+| **`AdverseReactionStats`** | `AutoList` | 不良反应及发生率 | 药物警戒 |++[↑ 返回目录](#目录)++---++### 4. 🌿 `tcm` (中医中药)++针对中医特有的辨证论治逻辑和药性理论进行优化。++* **名医医案**:记录症状、辨证分析、治法及处方的临床实录。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SyndromeReasoningGraph`** | `AutoHypergraph` | 症状→证型→治则→处方 | 医案挖掘 |+| **`PrescriptionModification`** | `AutoGraph` | 处方加减逻辑 | 用药规律分析 |+| **`PulseTongueRecord`** | `AutoList` | 舌象与脉象特征 | 诊断客观化 |++* **本草典籍**:描述单味药的四气五味、归经、功效。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`HerbPropertyModel`** | `AutoModel` | 四气五味、归经、毒性 | 中药数据库 |+| **`CompatibilityNet`** | `AutoGraph` | 七情配伍关系 | 配伍禁忌 |+| **`ProcessingMethod`** | `AutoList` | 炮制方法及影响 | 炮制规范 |++* **方剂规范**:记载方剂组成,包含君臣佐使配伍结构。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`FormulaComposition`** | `AutoHypergraph` | 君臣佐使层级结构 | 方剂解析 |+| **`FunctionIndicationMap`** | `AutoGraph` | 方剂→功能→主治 | 推荐系统 |++* **经络腧穴专著**:描述穴位定位、归经及主治功能。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`AcupointLocationMap`** | `AutoGraph` | 腧穴空间定位 | 针灸教学 |+| **`MeridianFlowGraph`** | `AutoGraph` | 十二经脉循行 | 经络理论 |++[↑ 返回目录](#目录)++---++### 5. ⚙️ `industry` (工业)++专注于电力、制造、能源等行业的运维数据与日志分析。++* **管理规范**:安全规程、应急预案等。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SafetyControlGraph`** | `AutoGraph` | 危险源、风险点、管控 | 安全规程 |+| **`EmergencyResponseGraph`** | `AutoGraph` | 事故场景、响应动作 | 应急预案 |+| **`IncidentCausalityMap`** | `AutoHypergraph` | 隐患→触发→违章→后果 | 风险预防 |+| **`SafetyTimeline`** | `AutoTemporalGraph` | 操作与响应序列 | 事故复盘 |++* **技术规格书**:设备额定参数、设计标准。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SystemTopologyGraph`** | `AutoGraph` | 厂区、系统、设备层级 | 系统说明书 |+| **`EquipmentTopologyGraph`** | `AutoGraph` | 设备实体及连接 | 设备图纸 |+| **`SpecParameterTable`** | `AutoModel` | 额定功率、材质、精度 | 设备台账 |+| **`SystemCompatibilityGraph`** | `AutoHypergraph` | 设备与环境关系 | 选型辅助 |++* **操作运维**:设备运行规程、工况切换。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`OperationFlowGraph`** | `AutoGraph` | 操作步骤、状态、结果 | 运行规程 |+| **`OperatingModeGraph`** | `AutoGraph` | 工况类型和切换条件 | 工况切换 |+| **`MaintenaceOperationMap`** | `AutoHypergraph` | 操作人、工具、对象、耗时 | 维修标准化 |++* **设备维护**:巡检记录、故障案例、备件更换。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`InspectionRecordGraph`** | `AutoGraph` | 设备和巡检项 | 巡检记录 |+| **`FailureCaseGraph`** | `AutoGraph` | 现象、原因、措施、教训 | 故障案例库 |+| **`FailureKnowledgeHypergraph`** | `AutoHypergraph` | 现象、根因、部件、方案 | 故障诊断 |+| **`PartReplacementList`** | `AutoList` | 零件型号、数量、原因 | 备件管理 |++* **HSE事故报告**:生产事故调查报告。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`IncidentCausalityMap`** | `AutoHypergraph` | 隐患→触发→违章→后果 | 事故推演 |+| **`SafetyTimeline`** | `AutoTemporalGraph` | 操作与响应序列 | 事故复盘 |++[↑ 返回目录](#目录)++---++### 6. 📜 `history` (历史)++专注于长跨度时间线梳理及人物社会网络构建。++* **历史专著**:对特定断代、事件或人物的深度分析。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`HistoricalKnowledgeGraph`** | `AutoGraph` | 人物关系、事件因果 | 社会网络分析 |+| **`MultiParticipantEventMap`** | `AutoHypergraph` | 多方参与事件 | 事件还原 |++* **编年史**:按时间顺序记录的历史事件。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ChronologicalEventChain`** | `AutoTemporalGraph` | 带时间戳的原子事件 | 年表生成 |+| **`HistoricalContextGraph`** | `AutoGraph` | 静态关联(亲属、联盟)| 背景挖掘 |+| **`PoliticalStruggleHypergraph`** | `AutoHypergraph` | 攻守方、策划者、变节者 | 派系分析 |++* **口述历史**:第一人称回忆录。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`PersonalTrajectoryHypergraph`** | `AutoHypergraph` | 人生阶段超边 | 传记编撰 |+| **`NarrativeRelationGraph`** | `AutoGraph` | 主观视角人物互动 | 社会网络分析 |+| **`MemoryFlashbackList`** | `AutoList` | 轶事、感悟、侧面描写 | 历史细节 |++* **档案信札**:历史人物往来书信。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`EpistolaryKnowledgeGraph`** | `AutoGraph` | 信件内容中的人物事件 | 史料挖掘 |++[↑ 返回目录](#目录)++---++### 7. 🧬 `biology` (生物科学)++从基因组扩展到蛋白质组学、代谢通路及生态学。++* **生物学专著**:物种分类、进化历史。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SpeciesInteractionWeb`** | `AutoGraph` | 捕食、寄生、竞争、共生 | 食物网分析 |+| **`TaxonomicTree`** | `AutoGraph` | 界门纲目科属种层级 | 分类学数据库 |++* **蛋白质结构摘要**:晶体结构、配体结合位点。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ProteinComplexMap`** | `AutoHypergraph` | 多亚基复合物 | 蛋白数据库 |+| **`BindingSiteModel`** | `AutoModel` | 活性位点、化学性质 | 药物设计 |++* **代谢通路描述**:生化反应级联。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`BiochemicalReactionHypergraph`** | `AutoHypergraph` | 酶+底物→产物反应 | 通路图谱 |+| **`RegulatoryNetwork`** | `AutoGraph` | 转录因子→启动子→基因表达 | 基因调控分析 |++* **生态调查**:物种形态、分布、生境特征。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`PhylogeneticRelationGraph`** | `AutoGraph` | 亲缘关系、演化距离 | 系统发育树 |+| **`BiodiversityRegistry`** | `AutoSet` | 观测物种及种群 | 生物多样性评估 |++[↑ 返回目录](#目录)++---++### 8. ⚖️ `legal` (法律)++专注于权利义务逻辑、条件约束及法律事实。++* **法学专著与评注**:法律原则、法条逻辑分析。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`LegalConceptOntology`** | `AutoGraph` | 术语定义、上下位关系 | 法律检索 |+| **`CaseLawCitationNet`** | `AutoGraph` | 案件引用关系 | 判例研究 |++* **主服务协议 (MSA)**:长期商业合同。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ContractObligationHypergraph`** | `AutoHypergraph` | 主体+义务+条件+例外+责任 | 合同审查 |+| **`DefinedTermRegistry`** | `AutoSet` | 定义的专有名词 | 一致性检查 |+| **`LiabilityClauseList`** | `AutoList` | 赔偿、责任限制条款 | 风险评估 |++* **法院判决书**:法官最终裁定。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`CaseFactTimeline`** | `AutoTemporalGraph` | 时间顺序的事实链条 | 案情分析 |+| **`AdjudicationLogic`** | `AutoHypergraph` | 事实+法律→结论 | 判决预测 |+| **`LitigationParticipantMap`** | `AutoGraph` | 原告被告律师证人关系 | 利益冲突 |++* **合规申报文件**:数据合规、反洗钱报告。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ComplianceRequirementList`** | `AutoList` | 具体义务或整改措施 | 合规分析 |+| **`BeneficialOwnershipGraph`** | `AutoGraph` | 股权穿透至UBO | AML/KYC |++[↑ 返回目录](#目录)++---++### 9. 🎭 `literature` (文学与影视)++专注于叙事结构分析、角色互动及世界观设定。++* **影视剧本**:格式严格的文本(场景、对白)。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SceneEventHypergraph`** | `AutoHypergraph` | 场景超边 | 剧本统筹 |+| **`CharacterArcTimeline`** | `AutoTemporalGraph` | 角色成长路径 | 人物分析 |++* **长篇小说**:复杂情节、众多人物。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ComplexCharacterRelation`** | `AutoHypergraph` | 多方社会结构 | 群像分析 |+| **`StoryEntityGraph`** | `AutoGraph` | 物品、地点归属 | 世界观设定 |+| **`NarrativeEventChain`** | `AutoTemporalGraph` | 关键情节转折 | 梗概生成 |++* **文学评论**:主题、意象、结构分析。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`MotifAssociationNet`** | `AutoGraph` | 反复出现的意象 | 符号学分析 |+| **`CritiqueArgumentHypergraph`** | `AutoHypergraph` | 论据→观点 | 论文分析 |+| **`NarrativeStructureTree`** | `AutoGraph` | 叙事结构层级 | 叙事学研究 |++[↑ 返回目录](#目录)++---++### 10. 📰 `news` (新闻传媒)++专注于新闻要素 (5W1H)、事件因果链及观点分析。++* **深度调查报道**:揭示复杂社会关系的长篇报道。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`InvestigativeContextGraph`** | `AutoGraph` | 静态关系(任职、亲属)| 实体映射 |+| **`ComplexRelationNet`** | `AutoHypergraph` | 多方社会关联 | 政商分析 |+| **`KeyEventSequence`** | `AutoGraph` | 关键事件时间线 | 深度回顾 |++* **突发新闻与电讯**:注重时效性的短消息。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`NewsEntityGraph`** | `AutoGraph` | 核心实体及关系 | 新闻流 |+| **`NewsSummaryModel`** | `AutoModel` | 5W1H提取 | 新闻聚合 |+| **`LiveUpdateTimeline`** | `AutoGraph` | 分钟级更新 | 直播整理 |++* **政策解读与社论**:观点、论证逻辑分析。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`ViewpointStructure`** | `AutoHypergraph` | 观点→论据→结论 | 舆情分析 |+| **`ImpactChain`** | `AutoGraph` | 政策→影响群体→后果 | 政策解读 |++[↑ 返回目录](#目录)++---++### 11. 🌾 `agriculture` (农业)++专注于作物全生命周期管理、田间监测及土壤健康数据。++* **农业技术手册**:种植规范、病虫害防治。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`CropGrowthCycle`** | `AutoTemporalGraph` | 各生长阶段农事操作 | 种植日历 |+| **`PestControlHypergraph`** | `AutoHypergraph` | 作物+阶段+诱因→防治方案 | 智能植保 |++* **巡田报告**:作物生长阶段及病虫害实地观察。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`FieldObservationList`** | `AutoList` | 地块、作物、问题、建议 | 病虫害预警 |++* **土壤分析报告**:化学成分及施肥建议。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`SoilNutrientModel`** | `AutoModel` | pH、有机质、N-P-K | 配方施肥 |+| **`AmendmentPlan`** | `AutoGraph` | 检测→限制因子→措施→目标 | 精准农业 |++[↑ 返回目录](#目录)++---++### 12. 🍜 `food` (美食餐饮)++专注于食谱标准化、食材配伍逻辑及美食评价数据。++* **标准化食谱**:配料表、烹饪步骤。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`RecipeCollection`** | `AutoSet` | 唯一菜品实体及分类 | 菜单数字化 |+| **`StandardRecipeCard`** | `AutoModel` | 完整配料、步骤、技巧 | 后厨SOP |+| **`IngredientCompositionHypergraph`** | `AutoHypergraph` | 菜品主料辅料调味关系 | 成本过敏原管理 |++* **美食评论与感官评价**:专业食评人或研发团队评价。++| 模板 | 原语 | 描述 | 应用场景 |+| :--- | :--- | :--- | :--- |+| **`DishReviewSummary`** | `AutoList` | 核心评价点、推荐等级 | 必吃榜单 |+| **`SensoryEvaluationGraph`** | `AutoGraph` | 菜品→口感→食材/技法 | 风味归因 |++[↑ 返回目录](#目录)++---diff --git a/hyperextract/templates/legacy/en/INSTRUCTION.md b/hyperextract/templates/legacy/en/INSTRUCTION.mddeleted file mode 100644index a287379..0000000--- a/hyperextract/templates/legacy/en/INSTRUCTION.md+++ /dev/null@@ -1,572 +0,0 @@-# Hyper-Extract Knowledge Template Definition Manual--This document defines the standard-specific knowledge extraction templates workflow for implementing domain in the `Hyper-Extract` framework.-------## 0. Core Protocol: Read the Source--Before writing any code, you **MUST**:-1. **Identify the Base Class**: Choose the appropriate base class from the mapping table below.-2. **Read the Source**: Use tools to read the Python source code of the chosen base class in `hyperextract/types/` directory.-------## 1. Design Phase--### 1.1 Document-First Protocol--Before designing any template, you **MUST** answer the following:-* **What is the target document?**: Which core document type(s) in this domain is the template designed for? (e.g., Annual Reports, SOP Manuals, Court Rulings).-* **Is the logic structure native to the text?**: Does this structure naturally exist in the original document, or is it artificially imposed?-* **Is extraction evidence clear?**: Are there explicit linguistic cues in the text that allow the LLM to extract accurately?--Never design templates for abstract knowledge graphs disconnected from real documents. Templates must map the **inherent logical structures** of actual text.--### 1.2 AutoType Selection Mapping Table--| Data Nature | Recommended Base Class | Source Code Location | Key Constraints |-| :--- | :--- | :--- | :--- |-| **Single Object** (Summary/Meta) | `AutoModel` | `hyperextract/types/model.py` | One object per document |-| **Pattern Collection** (Repeating) | `AutoList` | `hyperextract/types/list.py` | No deduplication. Extracts all instances found. |-| **Key-Based Accumulator** (Glossary) | `AutoSet` | `hyperextract/types/set.py` | Information accumulation by exact key; requires `key_extractor` |-| **Standard Graph** (Entity-Relation) | `AutoGraph` | `hyperextract/types/graph.py` | Standard binary relationships |-| **Temporal Graph** (With Time) | `AutoTemporalGraph` | `hyperextract/types/temporal_graph.py` | Edges support flexible time formats |-| **Spatial Graph** (With Location) | `AutoSpatialGraph` | `hyperextract/types/spatial_graph.py` | Edges support flexible location formats |-| **Spatio-Temporal Graph** | `AutoSpatioTemporalGraph` | `hyperextract/types/spatio_temporal_graph.py` | Supports both flexible time and location |-| **N-ary/Complex Events** | `AutoHypergraph` | `hyperextract/types/hypergraph.py` | Models complex relationships among multiple entities |--### 1.3 AutoHypergraph Application Scenarios--#### Core Definition-Hyperedges are used to model complex relationships among multiple entities, breaking through the limitations of traditional binary relationships by connecting multiple related entities through a single hyperedge.--#### Core Value-- Describes events or stories involving multiple entities participating together-- Maintains event integrity, avoiding information loss from splitting into multiple binary relationships-- Better aligns with human cognition of "events" (multiple participants, multiple elements)--#### Typical Application Scenarios-- **Meeting Scenario**: Connect attendees, topics, location, time, decision outcomes-- **Transaction Scenario**: Connect buyer, seller, product, amount, time, location-- **Case Scenario**: Connect suspects, victims, witnesses, time, location, evidence-- **Competition Scenario**: Connect teams, players, event items, time, location, results-------## 2. Schema Design Specifications--### 2.1 Core Principles-- **Field Count Control**: No more than 10 core fields-- **All Fields Must Have `description`**-- **Code Identifiers in English**: Class names, variable names, method names must be in English-- **All Descriptions in English**: For templates in the `en` directory, all field descriptions, comments, and Prompts MUST be in English--### 2.2 Naming Conventions-- Class names: `PascalCase` (e.g., `FinancialReportGraph`)-- Variable/Method names: `camelCase` (e.g., `node_label_extractor`)--### 2.3 Example-```python-class FinancialEntity(BaseModel):- """Financial entity node"""- name: str = Field(description="Entity name, such as company name, product name, department name")- category: str = Field(description="Entity type: company, product, department")- description: str = Field(description="Brief description", default="")--class FinancialRelation(BaseModel):- """Financial relation edge"""- source: str = Field(description="Source entity")- target: str = Field(description="Target entity")- relationType: str = Field(description="Relation type: investment, acquisition, cooperation, competition")- timeInfo: Optional[str] = Field(- description="Time info, unified format is YYYY-MM-DD (e.g., 2023-06-15)",- default=None- )-```--### 2.4 Spatio-Temporal Format Consistency Principle--#### Within a Single Template: Strict Consistency-Within the same knowledge template, time formats and spatial formats must be strictly consistent. All extracted spatio-temporal information must be standardized and unified during the information extraction phase to ensure data standardization and consistency, avoiding confusion during LLM processing.--**Important Note**: The standard format used by the template MUST be explicitly specified in the Prompt. The LLM must be required to convert all time/spatial information to the specified standard format for output, rather than preserving the various expressions from the original text.--#### Across Different Templates: Flexible Adaptation-Time and spatial formats across different knowledge templates can be flexibly defined based on specific domain requirements, but each template must unify one standard format. Here are format suggestions for common domains (for reference only):-- **History Domain**: Suggested format is year (e.g., "2023") or dynasty (e.g., "Qing Dynasty")-- **Finance Domain**: Suggested format is YYYY-MM-DD (e.g., "2023-06-15")-- **Cooking Domain**: Suggested format is MM:SS (e.g., "30:00")-- **Geography Domain**: Suggested format is Province-City-District (e.g., "Beijing-Chaoyang")--**Note**: Format selection should be based on the actual information density and domain conventions of the target document, not over-design.-------## 3. AutoType Specific Specifications--### 3.1 AutoTemporalGraph (Temporal Graph)--#### Required Extractors-- `node_key_extractor`: Unique entity identifier (e.g., `lambda x: x.name`)-- `edge_key_extractor`: Core relation identifier (excluding time)-- `time_in_edge_extractor`: Function to extract time from Edge-- `nodes_in_edge_extractor`: Function to extract source/target nodes from Edge--#### Observation Time Parameter-- User can specify, or defaults to current date-- Used for resolving relative time expressions--#### Prompt Must Include Time Resolution Rules-```-### Time Format Requirements-All time information must be unified to "YYYY-MM-DD" format (e.g., 2023-06-15).--### Time Resolution Rules-Current Observation Date: {observation_time}--1. Relative time resolution (based on observation date):- - "last year" → year before {observation_time}, formatted as YYYY-01-01- - "last month" → month before {observation_time}, formatted as YYYY-MM-01- - "June 2023" → 2023-06-15--2. Exact time → convert to YYYY-MM-DD format-3. Missing time → leave empty-```-------### 3.2 AutoSpatialGraph (Spatial Graph)--#### Required Extractors-- `node_key_extractor`, `edge_key_extractor`-- `location_in_edge_extractor`: Function to extract location from Edge-- `nodes_in_edge_extractor`--#### Prompt Must Include Location Resolution Rules-```-### Location Resolution Rules-Current Observation Location: {observation_location}--1. Relative location resolution (based on observation location):- - "here", "local" → {observation_location}- - "nearby", "adjacent" → vicinity of {observation_location}- - "north of here" → north of {observation_location}--2. Exact location → keep as-is-3. Missing location → leave empty-```-------### 3.3 AutoSet (Key-Based Accumulator)--- Must define `key_extractor` (exact key matching, not semantic similarity)-- Embedder is only used for semantic retrieval, not for merging logic-------## 4. Prompt Construction Specifications--### 4.1 Fully Predefined-- Users do not need to write any Prompt-- All Prompts are predefined and encapsulated--### 4.2 Graph Types Require 3 Prompts-| Prompt | Usage |-|-------|------|-| `_PROMPT` | one_stage mode: extract nodes and edges simultaneously |-| `_NODE_PROMPT` | two_stage step 1: extract nodes only |-| `_EDGE_PROMPT` | two_stage step 2: extract edges based on known nodes |--### 4.3 Prompt Pre-Structure Specifications (Mandatory for Graph Types)--**Graph types (AutoGraph/AutoHypergraph etc.) must follow the following pre-structure**:--```-## Role and Task-You are a professional xxx expert, please extract xxx from the text...--## Core Concept Definitions (varies by AutoType)-- **Concept 1**: xxx-- **Concept 2**: xxx--## Extraction Rules-### Core Constraints-#### _NODE_PROMPT / _PROMPT (Node Extraction)-1. Each node must correspond to a single independent entity; do not merge multiple entities into one node-2. Entity names should remain consistent with the source text--#### _EDGE_PROMPT (Edge Extraction)-1. Only extract edges from the known entity list; do not create unlisted entities-2. Relationship descriptions should remain consistent with the source text--### Domain-Specific Rules (Optional)-Different domains have specialized terminology or specific expressions. You may add targeted rules as needed. For example:-- Traditional Chinese Medicine: Ancient dosage units (两, 钱, 分, 匕, 枚, etc.) can be kept in original form-- Finance: Professional terminology should remain in original form-- Medical: Professional abbreviations should remain in original form--### Special Placeholders (Required)-**Each Prompt must include special placeholders** to receive the text to be extracted:--- **_PROMPT / _NODE_PROMPT**: Must include `{source_text}` placeholder- ```python- ## Source Text:- {source_text}- ```--- **_EDGE_PROMPT**: Taking AutoGraph/AutoHypergraph as examples, must include `{known_nodes}` and `{source_text}` placeholders. For spatio-temporal graph types, additional `{observation_time}` or `{observation_location}` placeholders will be included (see table below for details).- ```python- ## Known Entities- {known_nodes}-- ## Source Text:- {source_text}- ```--#### Placeholders by AutoType--| AutoType | Node Extraction | Edge Extraction |-|----------|-----------------|-----------------|-| `AutoModel` / `AutoList` / `AutoSet` | `{source_text}` | - |-| `AutoGraph` / `AutoHypergraph` | `{source_text}` | `{source_text}`, `{known_nodes}` |-| `AutoTemporalGraph` | `{source_text}` | `{source_text}`, `{known_nodes}`, `{observation_time}` |-| `AutoSpatialGraph` | `{source_text}` | `{source_text}`, `{known_nodes}`, `{observation_location}` |-| `AutoSpatioTemporalGraph` | `{source_text}` | `{source_text}`, `{known_nodes}`, `{observation_time}`, `{observation_location}` |--#### Placeholder Description--- **`{source_text}`**: The original text to be analyzed (required)-- **`{known_nodes}`**: Known nodes list in two-stage extraction mode (for edge extraction)-- **`{observation_time}`**: Observation time, used to resolve relative time expressions (e.g., "last year", "last month")-- **`{observation_location}`**: Observation location, used to resolve relative location expressions (e.g., "here", "nearby")--### Spatio-Temporal Resolution Rules (required for spatio-temporal graph types only)-- Time/location resolution rules...--**Why concept definitions are needed?**-- Let the LLM understand "what" to extract first, before telling it "how" to extract-- Different AutoTypes have different core concepts that must be clearly defined-- Concept definitions must be placed at the beginning of the Prompt--**Non-graph types do not require Core Concept Definitions**:-- **AutoModel**: Directly extract structured objects, object definitions are already clear in Pydantic Schema-- **AutoList**: Directly extract item lists, item definitions are already clear in Pydantic Schema-- **AutoSet**: Directly extract element collections, element definitions are already clear in Pydantic Schema--### 4.4 Core Concept Definition Templates for Each AutoType--#### AutoGraph-## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Relationships between nodes---#### AutoHypergraph--## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Connects multiple nodes, expressing complex relationships among multiple entities--#### AutoTemporalGraph / AutoSpatialGraph / AutoSpatioTemporalGraph-In addition to node and edge definitions, time/location definitions must also be added:--## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Relationships between nodes-- **Time**: xxx (define according to actual needs)-- **Location**: xxx (define according to actual needs)--------## 5. Parameter Management Specifications--### 5.1 Standard Exposed Parameters-| Parameter | Type | Required | Description |-|-----|------|------|------|-| `llm_client` | `BaseChatModel` | ✓ | LLM client |-| `embedder` | `Embeddings` | ✓ | Embedding model |-| `extraction_mode` | `str` | ✗ | Extraction mode (graph types only), default `"two_stage"` |-| `verbose` | `bool` | ✗ | Verbose logging, default `False` |--### 5.2 Optional Class-Specific Parameters-| Parameter | Applicable Types | Description |-|-----|---------|------|-| `observation_time` | `AutoTemporalGraph`, `AutoSpatioTemporalGraph` | Observation time, defaults to current date if not specified |-| `observation_location` | `AutoSpatialGraph`, `AutoSpatioTemporalGraph` | Observation location |-| `max_workers` | All types | Maximum worker threads |--### 5.3 Hidden Parameters (Passed via **kwargs)-- `chunk_size`, `chunk_overlap`-- `node_strategy_or_merger`, `edge_strategy_or_merger`-- Other technical parameters-------## 6. Show Function Design Specifications--### 7.1 Design Pattern--The `show()` method should follow the decorator pattern, wrapping the parent class implementation.--### 7.2 Implementation Example--```python-def show(- self,- *,- top_k_nodes_for_search: int = 3,- top_k_edges_for_search: int = 3,- top_k_nodes_for_chat: int = 3,- top_k_edges_for_chat: int = 3,-):- """- Display the knowledge graph.-- Args:- top_k_nodes_for_search: Number of nodes returned for semantic search, default is 3- top_k_edges_for_search: Number of edges returned for semantic search, default is 3- top_k_nodes_for_chat: Number of nodes used for Q&A, default is 3- top_k_edges_for_chat: Number of edges used for Q&A, default is 3- """- def node_label_extractor(node: MyNode) -> str:- return node.name # Simple label, not unique identifier, friendly for display-- def edge_label_extractor(edge: MyEdge) -> str:- return edge.relationType-- super().show(- node_label_extractor=node_label_extractor,- edge_label_extractor=edge_label_extractor,- top_k_nodes_for_search=top_k_nodes_for_search,- top_k_edges_for_search=top_k_edges_for_search,- top_k_nodes_for_chat=top_k_nodes_for_chat,- top_k_edges_for_chat=top_k_edges_for_chat,- )-```-------## 7. Standard Example Skeleton--```python-from typing import Any, Callable, Optional-from datetime import datetime-from langchain_core.language_models import BaseChatModel-from langchain_core.embeddings import Embeddings-from pydantic import BaseModel, Field-from hyperextract.types import AutoTemporalGraph--# ==============================================================================-# 1. Schema (English identifiers, ≤ 10 fields, English descriptions)-# ==============================================================================--class FinancialEntity(BaseModel):- """Financial entity node"""- name: str = Field(description="Entity name, such as company name, product name, department name")- category: str = Field(description="Entity type: company, product, department")- description: str = Field(description="Brief description", default="")--class FinancialRelation(BaseModel):- """Financial relation edge"""- source: str = Field(description="Source entity")- target: str = Field(description="Target entity")- relationType: str = Field(description="Relation type: investment, acquisition, cooperation, competition")- timeInfo: Optional[str] = Field(- description="Time info, unified format is YYYY-MM-DD (e.g., 2023-06-15)",- default=None- )- details: str = Field(description="Detailed description", default="")--# ==============================================================================-# 2. Predefined Prompts (Simplified Version)-# ==============================================================================--_NODE_PROMPT = """## Role and Task-You are a professional [domain] expert, extract all entities as nodes from the text.--## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Relationships between nodes--## Extraction Rules-### Core Constraints-1. Each node must correspond to a single independent entity; do not merge multiple entities into one node-2. Entity names should remain consistent with the source text--## Pending Text to Analyze:-{source_text}-"""--_EDGE_PROMPT = """## Role and Task-You are a professional [domain] expert, extract relationships between given entities.--## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Relationships between nodes--## Extraction Rules-### Core Constraints-1. Only extract edges from the known entity list; do not create unlisted entities-2. Relationship descriptions should remain consistent with the source text--### Time Resolution Rules-Current Observation Date: {observation_time}--1. Relative time resolution (based on observation date):- - "last year" → year before {observation_time}- - "last month" → month before {observation_time}--2. Exact time → keep as-is-3. Missing time → leave empty--## Known Entities-{known_nodes}--## Pending Text to Analyze-{source_text}-"""--_PROMPT = """## Role and Task-You are a professional [domain] expert, extract entities and their relationships from text.--## Core Concept Definitions-- **Node**: Entities extracted from the document-- **Edge**: Relationships between nodes--## Extraction Rules-### Core Constraints-1. Each node must correspond to a single independent entity; do not merge multiple entities into one node-2. Entity names should remain consistent with the source text-3. Only extract edges from the known entity list; do not create unlisted entities-4. Relationship descriptions should remain consistent with the source text--### Time Resolution Rules-Current Observation Date: {observation_time}--1. Relative time resolution (based on observation date):- - "last year" → year before {observation_time}- - "last month" → month before {observation_time}--2. Exact time → keep as-is-3. Missing time → leave empty--## Pending Text to Analyze:-{source_text}-"""--# ==============================================================================-# 3. Template Class-# ==============================================================================--class FinancialReportGraph(AutoTemporalGraph[FinancialEntity, FinancialRelation]):- """- Applicable Documents: SEC 10-K/10-Q annual reports, quarterly reports-- Functionality:- Extracts companies, products, departments and their relationships (investment, acquisition, cooperation, etc.)- from financial reports, supporting flexible time formats.-- Usage Example:- >>> template = FinancialReportGraph(llm_client=llm, embedder=embedder)- >>> template.feed_text("...")- >>> template.show()- """-- def __init__(- self,- llm_client: BaseChatModel,- embedder: Embeddings,- *,- extraction_mode: str = "two_stage",- observation_time: str | None = None,- max_workers: int = 10,- verbose: bool = False,- **kwargs: Any,- ):- """- Initialize financial report graph template.-- Args:- llm_client: LLM client for knowledge extraction- embedder: Embedding model for semantic search- extraction_mode: Extraction mode, can be "one_stage" (extract nodes and edges simultaneously)- or "two_stage" (extract nodes first, then edges), default is "two_stage"- observation_time: Observation time for resolving relative time expressions,- defaults to current date if not specified- max_workers: Maximum worker threads, default is 10- verbose: Enable verbose logging, default is False- **kwargs: Other technical parameters passed to base class- """- if observation_time is None:- observation_time = datetime.now().strftime("%Y-%m-%d")-- super().__init__(- node_schema=FinancialEntity,- edge_schema=FinancialRelation,- node_key_extractor=lambda x: x.name,- edge_key_extractor=lambda x: f"{x.source}|{x.relationType}|{x.target}",- time_in_edge_extractor=lambda x: x.timeInfo or "",- nodes_in_edge_extractor=lambda x: (x.source, x.target),- llm_client=llm_client,- embedder=embedder,- observation_time=observation_time,- extraction_mode=extraction_mode,- max_workers=max_workers,- verbose=verbose,- prompt=_PROMPT,- prompt_for_node_extraction=_NODE_PROMPT,- prompt_for_edge_extraction=_EDGE_PROMPT,- **kwargs,- )-- def show(- self,- *,- top_k_nodes_for_search: int = 3,- top_k_edges_for_search: int = 3,- top_k_nodes_for_chat: int = 3,- top_k_edges_for_chat: int = 3,- ):- """- Display the knowledge graph.-- Args:- top_k_nodes_for_search: Number of nodes returned for semantic search, default is 3- top_k_edges_for_search: Number of edges returned for semantic search, default is 3- top_k_nodes_for_chat: Number of nodes used for Q&A, default is 3- top_k_edges_for_chat: Number of edges used for Q&A, default is 3- """- def node_label_extractor(node: FinancialEntity) -> str:- return node.name-- def edge_label_extractor(edge: FinancialRelation) -> str:- return edge.relationType-- super().show(- node_label_extractor=node_label_extractor,- edge_label_extractor=edge_label_extractor,- top_k_nodes_for_search=top_k_nodes_for_search,- top_k_edges_for_search=top_k_edges_for_search,- top_k_nodes_for_chat=top_k_nodes_for_chat,- top_k_edges_for_chat=top_k_edges_for_chat,- )-```-------## 8. Runtime Behavior Description--After calling `feed_text()`, the framework automatically processes the text and executes knowledge extraction:-```python-template = MyTemplate(llm_client=..., embedder=...)-template.feed_text("...") # Auto-trigger extraction-template.show() # Visualization-```--Key Points:-- `feed_text()` automatically triggers the full pipeline, no need to call `extract()`-- Supports method chaining: `template.feed_text(...).show()`-- Supports accumulation: multiple calls to `feed_text()` accumulate knowledgediff --git a/hyperextract/templates/legacy/en/__init__.py b/hyperextract/templates/legacy/en/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/agriculture/__init__.py b/hyperextract/templates/legacy/en/agriculture/__init__.pydeleted file mode 100644index 5f28270..0000000--- a/hyperextract/templates/legacy/en/agriculture/__init__.py+++ /dev/null@@ -1 +0,0 @@-\ No newline at end of filediff --git a/hyperextract/templates/legacy/en/biology/__init__.py b/hyperextract/templates/legacy/en/biology/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/finance/__init__.py b/hyperextract/templates/legacy/en/finance/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/food/__init__.py b/hyperextract/templates/legacy/en/food/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/general/__init__.py b/hyperextract/templates/legacy/en/general/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/history/__init__.py b/hyperextract/templates/legacy/en/history/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/industry/__init__.py b/hyperextract/templates/legacy/en/industry/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/legal/__init__.py b/hyperextract/templates/legacy/en/legal/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/literature/__init__.py b/hyperextract/templates/legacy/en/literature/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/medicine/__init__.py b/hyperextract/templates/legacy/en/medicine/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/news/__init__.py b/hyperextract/templates/legacy/en/news/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/hyperextract/templates/legacy/en/tcm/__init__.py b/hyperextract/templates/legacy/en/tcm/__init__.pydeleted file mode 100644index e69de29..0000000diff --git a/examples/template_agriculture_demo.py b/hyperextract/templates/legacy/examples/template_agriculture_demo.pysimilarity index 100%rename from examples/template_agriculture_demo.pyrename to hyperextract/templates/legacy/examples/template_agriculture_demo.pydiff --git a/examples/template_biology_demo.py b/hyperextract/templates/legacy/examples/template_biology_demo.pysimilarity index 100%rename from examples/template_biology_demo.pyrename to hyperextract/templates/legacy/examples/template_biology_demo.pydiff --git a/examples/template_food_demo.py b/hyperextract/templates/legacy/examples/template_food_demo.pysimilarity index 100%rename from examples/template_food_demo.pyrename to hyperextract/templates/legacy/examples/template_food_demo.pydiff --git a/examples/template_history_demo.py b/hyperextract/templates/legacy/examples/template_history_demo.pysimilarity index 100%rename from examples/template_history_demo.pyrename to hyperextract/templates/legacy/examples/template_history_demo.pydiff --git a/examples/template_literature_demo.py b/hyperextract/templates/legacy/examples/template_literature_demo.pysimilarity index 100%rename from examples/template_literature_demo.pyrename to hyperextract/templates/legacy/examples/template_literature_demo.pydiff --git a/examples/template_news_demo.py b/hyperextract/templates/legacy/examples/template_news_demo.pysimilarity index 100%rename from examples/template_news_demo.pyrename to hyperextract/templates/legacy/examples/template_news_demo.pydiff --git a/hyperextract/templates/presets/agriculture/amendment_plan.yaml b/hyperextract/templates/legacy/presets/agriculture/amendment_plan.yamlsimilarity index 100%rename from hyperextract/templates/presets/agriculture/amendment_plan.yamlrename to hyperextract/templates/legacy/presets/agriculture/amendment_plan.yamldiff --git a/hyperextract/templates/presets/agriculture/crop_growth_cycle.yaml b/hyperextract/templates/legacy/presets/agriculture/crop_growth_cycle.yamlsimilarity index 100%rename from hyperextract/templates/presets/agriculture/crop_growth_cycle.yamlrename to hyperextract/templates/legacy/presets/agriculture/crop_growth_cycle.yamldiff --git a/hyperextract/templates/presets/agriculture/field_observation_list.yaml b/hyperextract/templates/legacy/presets/agriculture/field_observation_list.yamlsimilarity index 100%rename from hyperextract/templates/presets/agriculture/field_observation_list.yamlrename to hyperextract/templates/legacy/presets/agriculture/field_observation_list.yamldiff --git a/hyperextract/templates/presets/agriculture/pest_control_hypergraph.yaml b/hyperextract/templates/legacy/presets/agriculture/pest_control_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/agriculture/pest_control_hypergraph.yamlrename to hyperextract/templates/legacy/presets/agriculture/pest_control_hypergraph.yamldiff --git a/hyperextract/templates/presets/agriculture/soil_nutrient_model.yaml b/hyperextract/templates/legacy/presets/agriculture/soil_nutrient_model.yamlsimilarity index 100%rename from hyperextract/templates/presets/agriculture/soil_nutrient_model.yamlrename to hyperextract/templates/legacy/presets/agriculture/soil_nutrient_model.yamldiff --git a/hyperextract/templates/presets/biology/binding_site_model.yaml b/hyperextract/templates/legacy/presets/biology/binding_site_model.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/binding_site_model.yamlrename to hyperextract/templates/legacy/presets/biology/binding_site_model.yamldiff --git a/hyperextract/templates/presets/biology/biochemical_reaction_hypergraph.yaml b/hyperextract/templates/legacy/presets/biology/biochemical_reaction_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/biochemical_reaction_hypergraph.yamlrename to hyperextract/templates/legacy/presets/biology/biochemical_reaction_hypergraph.yamldiff --git a/hyperextract/templates/presets/biology/biodiversity_registry.yaml b/hyperextract/templates/legacy/presets/biology/biodiversity_registry.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/biodiversity_registry.yamlrename to hyperextract/templates/legacy/presets/biology/biodiversity_registry.yamldiff --git a/hyperextract/templates/presets/biology/phylogenetic_relation_graph.yaml b/hyperextract/templates/legacy/presets/biology/phylogenetic_relation_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/phylogenetic_relation_graph.yamlrename to hyperextract/templates/legacy/presets/biology/phylogenetic_relation_graph.yamldiff --git a/hyperextract/templates/presets/biology/protein_complex_map.yaml b/hyperextract/templates/legacy/presets/biology/protein_complex_map.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/protein_complex_map.yamlrename to hyperextract/templates/legacy/presets/biology/protein_complex_map.yamldiff --git a/hyperextract/templates/presets/biology/regulatory_network.yaml b/hyperextract/templates/legacy/presets/biology/regulatory_network.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/regulatory_network.yamlrename to hyperextract/templates/legacy/presets/biology/regulatory_network.yamldiff --git a/hyperextract/templates/presets/biology/species_interaction_web.yaml b/hyperextract/templates/legacy/presets/biology/species_interaction_web.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/species_interaction_web.yamlrename to hyperextract/templates/legacy/presets/biology/species_interaction_web.yamldiff --git a/hyperextract/templates/presets/biology/taxonomic_tree.yaml b/hyperextract/templates/legacy/presets/biology/taxonomic_tree.yamlsimilarity index 100%rename from hyperextract/templates/presets/biology/taxonomic_tree.yamlrename to hyperextract/templates/legacy/presets/biology/taxonomic_tree.yamldiff --git a/hyperextract/templates/presets/food/dish_review_summary.yaml b/hyperextract/templates/legacy/presets/food/dish_review_summary.yamlsimilarity index 100%rename from hyperextract/templates/presets/food/dish_review_summary.yamlrename to hyperextract/templates/legacy/presets/food/dish_review_summary.yamldiff --git a/hyperextract/templates/presets/food/ingredient_composition_hypergraph.yaml b/hyperextract/templates/legacy/presets/food/ingredient_composition_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/food/ingredient_composition_hypergraph.yamlrename to hyperextract/templates/legacy/presets/food/ingredient_composition_hypergraph.yamldiff --git a/hyperextract/templates/presets/food/recipe_collection.yaml b/hyperextract/templates/legacy/presets/food/recipe_collection.yamlsimilarity index 100%rename from hyperextract/templates/presets/food/recipe_collection.yamlrename to hyperextract/templates/legacy/presets/food/recipe_collection.yamldiff --git a/hyperextract/templates/presets/food/sensory_evaluation_graph.yaml b/hyperextract/templates/legacy/presets/food/sensory_evaluation_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/food/sensory_evaluation_graph.yamlrename to hyperextract/templates/legacy/presets/food/sensory_evaluation_graph.yamldiff --git a/hyperextract/templates/presets/food/standard_recipe_card.yaml b/hyperextract/templates/legacy/presets/food/standard_recipe_card.yamlsimilarity index 100%rename from hyperextract/templates/presets/food/standard_recipe_card.yamlrename to hyperextract/templates/legacy/presets/food/standard_recipe_card.yamldiff --git a/hyperextract/templates/presets/history/chronological_event_chain.yaml b/hyperextract/templates/legacy/presets/history/chronological_event_chain.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/chronological_event_chain.yamlrename to hyperextract/templates/legacy/presets/history/chronological_event_chain.yamldiff --git a/hyperextract/templates/presets/history/epistolary_knowledge_graph.yaml b/hyperextract/templates/legacy/presets/history/epistolary_knowledge_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/epistolary_knowledge_graph.yamlrename to hyperextract/templates/legacy/presets/history/epistolary_knowledge_graph.yamldiff --git a/hyperextract/templates/presets/history/historical_context_graph.yaml b/hyperextract/templates/legacy/presets/history/historical_context_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/historical_context_graph.yamlrename to hyperextract/templates/legacy/presets/history/historical_context_graph.yamldiff --git a/hyperextract/templates/presets/history/historical_knowledge_graph.yaml b/hyperextract/templates/legacy/presets/history/historical_knowledge_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/historical_knowledge_graph.yamlrename to hyperextract/templates/legacy/presets/history/historical_knowledge_graph.yamldiff --git a/hyperextract/templates/presets/history/memory_flashback_list.yaml b/hyperextract/templates/legacy/presets/history/memory_flashback_list.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/memory_flashback_list.yamlrename to hyperextract/templates/legacy/presets/history/memory_flashback_list.yamldiff --git a/hyperextract/templates/presets/history/multi_participant_event_map.yaml b/hyperextract/templates/legacy/presets/history/multi_participant_event_map.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/multi_participant_event_map.yamlrename to hyperextract/templates/legacy/presets/history/multi_participant_event_map.yamldiff --git a/hyperextract/templates/presets/history/narrative_relation_graph.yaml b/hyperextract/templates/legacy/presets/history/narrative_relation_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/narrative_relation_graph.yamlrename to hyperextract/templates/legacy/presets/history/narrative_relation_graph.yamldiff --git a/hyperextract/templates/presets/history/personal_trajectory_hypergraph.yaml b/hyperextract/templates/legacy/presets/history/personal_trajectory_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/personal_trajectory_hypergraph.yamlrename to hyperextract/templates/legacy/presets/history/personal_trajectory_hypergraph.yamldiff --git a/hyperextract/templates/presets/history/political_struggle_hypergraph.yaml b/hyperextract/templates/legacy/presets/history/political_struggle_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/history/political_struggle_hypergraph.yamlrename to hyperextract/templates/legacy/presets/history/political_struggle_hypergraph.yamldiff --git a/hyperextract/templates/presets/literature/character_arc_timeline.yaml b/hyperextract/templates/legacy/presets/literature/character_arc_timeline.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/character_arc_timeline.yamlrename to hyperextract/templates/legacy/presets/literature/character_arc_timeline.yamldiff --git a/hyperextract/templates/presets/literature/complex_character_relation.yaml b/hyperextract/templates/legacy/presets/literature/complex_character_relation.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/complex_character_relation.yamlrename to hyperextract/templates/legacy/presets/literature/complex_character_relation.yamldiff --git a/hyperextract/templates/presets/literature/critique_argument_hypergraph.yaml b/hyperextract/templates/legacy/presets/literature/critique_argument_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/critique_argument_hypergraph.yamlrename to hyperextract/templates/legacy/presets/literature/critique_argument_hypergraph.yamldiff --git a/hyperextract/templates/presets/literature/motif_association_net.yaml b/hyperextract/templates/legacy/presets/literature/motif_association_net.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/motif_association_net.yamlrename to hyperextract/templates/legacy/presets/literature/motif_association_net.yamldiff --git a/hyperextract/templates/presets/literature/narrative_event_chain.yaml b/hyperextract/templates/legacy/presets/literature/narrative_event_chain.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/narrative_event_chain.yamlrename to hyperextract/templates/legacy/presets/literature/narrative_event_chain.yamldiff --git a/hyperextract/templates/presets/literature/narrative_structure_tree.yaml b/hyperextract/templates/legacy/presets/literature/narrative_structure_tree.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/narrative_structure_tree.yamlrename to hyperextract/templates/legacy/presets/literature/narrative_structure_tree.yamldiff --git a/hyperextract/templates/presets/literature/scene_event_hypergraph.yaml b/hyperextract/templates/legacy/presets/literature/scene_event_hypergraph.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/scene_event_hypergraph.yamlrename to hyperextract/templates/legacy/presets/literature/scene_event_hypergraph.yamldiff --git a/hyperextract/templates/presets/literature/story_entity_graph.yaml b/hyperextract/templates/legacy/presets/literature/story_entity_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/literature/story_entity_graph.yamlrename to hyperextract/templates/legacy/presets/literature/story_entity_graph.yamldiff --git a/hyperextract/templates/presets/news/complex_relation_net.yaml b/hyperextract/templates/legacy/presets/news/complex_relation_net.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/complex_relation_net.yamlrename to hyperextract/templates/legacy/presets/news/complex_relation_net.yamldiff --git a/hyperextract/templates/presets/news/impact_chain.yaml b/hyperextract/templates/legacy/presets/news/impact_chain.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/impact_chain.yamlrename to hyperextract/templates/legacy/presets/news/impact_chain.yamldiff --git a/hyperextract/templates/presets/news/investigative_context_graph.yaml b/hyperextract/templates/legacy/presets/news/investigative_context_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/investigative_context_graph.yamlrename to hyperextract/templates/legacy/presets/news/investigative_context_graph.yamldiff --git a/hyperextract/templates/presets/news/key_event_sequence.yaml b/hyperextract/templates/legacy/presets/news/key_event_sequence.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/key_event_sequence.yamlrename to hyperextract/templates/legacy/presets/news/key_event_sequence.yamldiff --git a/hyperextract/templates/presets/news/live_update_timeline.yaml b/hyperextract/templates/legacy/presets/news/live_update_timeline.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/live_update_timeline.yamlrename to hyperextract/templates/legacy/presets/news/live_update_timeline.yamldiff --git a/hyperextract/templates/presets/news/news_entity_graph.yaml b/hyperextract/templates/legacy/presets/news/news_entity_graph.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/news_entity_graph.yamlrename to hyperextract/templates/legacy/presets/news/news_entity_graph.yamldiff --git a/hyperextract/templates/presets/news/news_summary_model.yaml b/hyperextract/templates/legacy/presets/news/news_summary_model.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/news_summary_model.yamlrename to hyperextract/templates/legacy/presets/news/news_summary_model.yamldiff --git a/hyperextract/templates/presets/news/viewpoint_structure.yaml b/hyperextract/templates/legacy/presets/news/viewpoint_structure.yamlsimilarity index 100%rename from hyperextract/templates/presets/news/viewpoint_structure.yamlrename to hyperextract/templates/legacy/presets/news/viewpoint_structure.yamldiff --git "a/hyperextract/templates/\347\237\245\350\257\206\346\250\241\346\235\277\350\256\276\350\256\241\346\214\207\345\215\227.md" "b/hyperextract/templates/\347\237\245\350\257\206\346\250\241\346\235\277\350\256\276\350\256\241\346\214\207\345\215\227.md"index 831e251..f6404ec 100644--- "a/hyperextract/templates/\347\237\245\350\257\206\346\250\241\346\235\277\350\256\276\350\256\241\346\214\207\345\215\227.md"+++ "b/hyperextract/templates/\347\237\245\350\257\206\346\250\241\346\235\277\350\256\276\350\256\241\346\214\207\345\215\227.md"@@ -74,13 +74,13 @@ YAML(YAML Ain't Markup Language)是一种人类可读的数据序列化格name: EarningsCallSummarylanguage: zh-description: 财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标+description: "财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标"schema:fields:- name: company_nametype: string- description: 公司名称+ description: "公司名称"```**多语言情况**:当需要支持多语言时,才需要使用语言键格式:@@ -89,8 +89,8 @@ schema:language: zhdescription:- zh: 中文描述- en: English description+ zh: "中文描述"+ en: "English description"```### 1.5 支持的 AutoType 类型@@ -120,27 +120,23 @@ tag: [general]language: zh-description: 模板简短描述+description: "模板简短描述"schema:fields:- name: field_nametype: string- description: 字段描述+ description: "字段描述"extraction_guide:- target: 你是一位专家,请从文本中提取信息。+ target: "你是一位专家,请从文本中提取信息。"rules: |1. 提取规则12. 提取规则2-identifiers: {}--parameters: {}-display:- label: field_name+ label: "field_name"```### 2.2 完整配置示例 (AutoGraph)@@ -152,35 +148,31 @@ tag: [domain_name]language: zh-description: 知识图谱描述+description: "知识图谱描述"node_schema:fields:- name: nametype: string- description: 实体名称+ description: "实体名称"- name: categorytype: string- description: 实体类别+ description: "实体类别"edge_schema:fields:- name: sourcetype: string- description: 源实体+ description: "源实体"- name: targettype: string- description: 目标实体+ description: "目标实体"- name: relationTypetype: string- description: 关系类型+ description: "关系类型"extraction_guide:- target: 你是一位领域专家...-- rules: |- 1. 规则1- 2. 规则2+ target: "你是一位领域专家,请从文本中提取知识图谱关系。"rules_for_nodes: |1. 节点提取规则@@ -189,11 +181,11 @@ extraction_guide:1. 边提取规则identifiers:- node_id: name+ node_id: "name"edge_id: "{source}|{relationType}|{target}"edge_members:- source: source- target: target+ source: "source"+ target: "target"parameters:extraction_mode: two_stage@@ -231,6 +223,33 @@ display:| `parameters` | 运行时参数 || `display` | 展示配置 |+### 3.3 Rules 字段格式说明++`extraction_guide` 中的 `rules`、`rules_for_nodes`、`rules_for_edges`、`rules_for_time`、`rules_for_location` 等字段使用 List 格式:++```yaml+rules:+ - "提取规则1"+ - "提取规则2"+```++解析时会自动转换为有序编号字符串:+```+1. 提取规则1+2. 提取规则2+```++**多语言情况**:+```yaml+rules:+ zh:+ - "中文规则1"+ - "中文规则2"+ en:+ - "English rule 1"+ - "English rule 2"+```+---## 4. 多语言配置指南@@ -243,13 +262,13 @@ display:name: EarningsCallSummarylanguage: zh-description: 财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标+description: "财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标"schema:fields:- name: company_nametype: string- description: 公司名称+ description: "公司名称"```### 4.2 多语言格式@@ -260,16 +279,16 @@ schema:language: zhdescription:- zh: 中文描述- en: English description+ zh: "中文描述"+ en: "English description"schema:fields:- name: company_nametype: stringdescription:- zh: 公司名称- en: Company name+ zh: "公司名称"+ en: "Company name"```---@@ -283,11 +302,11 @@ schema:| AutoModel | `model` | `schema` | - | target, rules | label || AutoList | `list` | `item_schema` | - | target, rules | label || AutoSet | `set` | `item_schema` | item_id | target, rules | label |-| AutoGraph | `graph` | node_schema + edge_schema | node_id, edge_id, edge_members | target, rules, rules_for_nodes, rules_for_edges | node_label + edge_label |-| AutoHypergraph | `hypergraph` | node_schema + edge_schema | node_id, edge_id, edge_members | target, rules, rules_for_nodes, rules_for_edges | node_label + edge_label |-| AutoTemporalGraph | `temporal_graph` | node_schema + edge_schema | + time_field | + rules_for_time | node_label + edge_label |-| AutoSpatialGraph | `spatial_graph` | node_schema + edge_schema | + location_field | + rules_for_location | node_label + edge_label |-| AutoSpatioTemporalGraph | `spatio_temporal_graph` | node_schema + edge_schema | + time_field + location_field | + rules_for_time + rules_for_location | node_label + edge_label |+| AutoGraph | `graph` | node_schema + edge_schema | node_id, edge_id, edge_members | target, rules_for_nodes, rules_for_edges | node_label + edge_label |+| AutoHypergraph | `hypergraph` | node_schema + edge_schema | node_id, edge_id, edge_members | target, rules_for_nodes, rules_for_edges | node_label + edge_label |+| AutoTemporalGraph | `temporal_graph` | node_schema + edge_schema | + time_field | target, rules_for_nodes, rules_for_edges, rules_for_time | node_label + edge_label |+| AutoSpatialGraph | `spatial_graph` | node_schema + edge_schema | + location_field | target, rules_for_nodes, rules_for_edges, rules_for_location | node_label + edge_label |+| AutoSpatioTemporalGraph | `spatio_temporal_graph` | node_schema + edge_schema | + time_field + location_field | target, rules_for_nodes, rules_for_edges, rules_for_time, rules_for_location | node_label + edge_label |### 5.2 AutoModel - 结构化模型@@ -299,12 +318,12 @@ schema:fields:- name: company_nametype: string- description: 公司名称+ description: "公司名称"required: truedefault: ""- name: revenuetype: string- description: 营收金额+ description: "营收金额"required: falsedefault: "N/A"```@@ -312,11 +331,11 @@ schema:**extraction_guide 编写**:```yamlextraction_guide:- target: 你是一位财务分析师,请从财报中提取关键信息。+ target: "你是一位财务分析师,请从财报中提取关键信息。"- rules: |- 1. 每个字段对应一个独立的信息项- 2. 数据与原文保持一致+ rules:+ - "每个字段对应一个独立的信息项"+ - "数据与原文保持一致"```**display 配置**:@@ -333,24 +352,23 @@ tag: [finance]language: zh-description: 财报电话会议摘要+description: "财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标"schema:fields:- name: company_nametype: string- description: 公司名称+ description: "公司名称"- name: revenuetype: string- description: 营收金额+ description: "营收金额"extraction_guide:- target: 你是一位财务分析师,请从财报中提取关键信息。-- rules: |- 1. 每个字段对应一个独立的信息项+ target: "你是一位财务分析师,请从财报中提取关键信息。"-identifiers: {}+ rules:+ - "每个字段对应一个独立的信息项"+ - "数据与原文保持一致"display:label: "{company_name}"@@ -366,10 +384,10 @@ item_schema:fields:- name: termtype: string- description: 关键词+ description: "关键词"- name: frequencytype: int- description: 出现频次+ description: "出现频次"```**display 配置**:@@ -385,21 +403,19 @@ autotype: listlanguage: zh-description: 关键词列表+description: "关键词列表 - 从文本中提取所有关键词"item_schema:fields:- name: termtype: string- description: 关键词+ description: "关键词"extraction_guide:- target: 你是一位关键词提取专家+ target: "你是一位关键词提取专家"- rules: |- 1. 提取文本中的所有关键词--identifiers: {}+ rules:+ - "提取文本中的所有关键词"display:label: term@@ -424,22 +440,22 @@ autotype: setlanguage: zh-description: 实体注册表+description: "实体注册表 - 从文本中提取所有实体并去重"item_schema:fields:- name: nametype: string- description: 实体名称+ description: "实体名称"- name: categorytype: string- description: 实体类型+ description: "实体类型"extraction_guide:- target: 你是一位实体识别专家+ target: "你是一位实体识别专家"- rules: |- 1. 提取所有实体并去重+ rules:+ - "提取所有实体并去重"identifiers:item_id: name@@ -458,10 +474,10 @@ node_schema:fields:- name: nametype: string- description: 实体名称+ description: "实体名称"- name: categorytype: string- description: 实体类别+ description: "实体类别"```**edge_schema 定义**:@@ -470,13 +486,13 @@ edge_schema:fields:- name: sourcetype: string- description: 源实体+ description: "源实体"- name: targettype: string- description: 目标实体+ description: "目标实体"- name: relationTypetype: string- description: 关系类型+ description: "关系类型"```**identifiers 配置**:@@ -492,16 +508,15 @@ identifiers:**extraction_guide 编写**:```yamlextraction_guide:- target: 你是一位知识图谱专家...-- rules: |- 1. 每个节点对应一个独立实体+ target: "你是一位知识图谱专家,请从文本中提取实体关系。"- rules_for_nodes: |- 1. 实体名称与原文保持一致+ rules_for_nodes:+ - "实体名称与原文保持一致"+ - "每个实体必须有明确的类别"- rules_for_edges: |- 1. source 和 target 都必须是已知节点+ rules_for_edges:+ - "source 和 target 都必须是已知节点"+ - "relationType 必须是预定义的关系类型"```**display 配置**:@@ -525,26 +540,26 @@ edge_schema:fields:- name: mechanism_nametype: string- description: 机制名称+ description: "机制名称"- name: participating_entitiestype: array- description: 参与的实体列表+ description: "参与的实体列表"- name: relationTypetype: string- description: 关系类型+ description: "关系类型"- name: outcometype: string- description: 结果+ description: "结果"```**identifiers 配置**:```yamlidentifiers:- node_id: name- edge_id: mechanism_name+ node_id: "name"+ edge_id: "mechanism_name"edge_members:- source: participating_entities- target: outcome+ source: "participating_entities"+ target: "outcome"```### 5.7 AutoTemporalGraph - 时序图谱@@ -554,26 +569,26 @@ identifiers:**特有 identifiers 配置**:```yamlidentifiers:- node_id: name+ node_id: "name"edge_id: "{source}|{relationType}|{target}"edge_members:- source: source- target: target- time_field: fiscal_period+ source: "source"+ target: "target"+ time_field: "fiscal_period"```**特有 extraction_guide 编写**:```yamlextraction_guide:- rules_for_time: |- 当前观察日期:{observation_time}- 1. "去年" → {observation_time} 的前一年+ rules_for_time:+ - "当前观察日期:{observation_time}"+ - "'去年' → {observation_time} 的前一年"```**特有 parameters 配置**:```yamlparameters:- extraction_mode: two_stage+ extraction_mode: "two_stage"observation_time: "2024-01-01"```@@ -584,15 +599,15 @@ parameters:**特有 identifiers 配置**:```yamlidentifiers:- location_field: location+ location_field: "location"```**特有 extraction_guide 编写**:```yamlextraction_guide:- rules_for_location: |- 当前观察位置:{observation_location}- 1. "这里" → {observation_location}+ rules_for_location:+ - "当前观察位置:{observation_location}"+ - "'这里' → {observation_location}"```**特有 parameters 配置**:@@ -628,7 +643,7 @@ parameters:**示例**:```yaml-description: 财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标+description: "财报电话会议摘要 - 从财报电话会议记录中提取关键财务指标"```### 6.3 测试验证diff --git a/hyperextract/utils/template_engine/config_loader.py b/hyperextract/utils/template_engine/config_loader.pyindex e0db3b1..2619870 100644--- a/hyperextract/utils/template_engine/config_loader.py+++ b/hyperextract/utils/template_engine/config_loader.py@@ -90,22 +90,26 @@ class ExtractionGuideTarget(BaseModel):class ExtractionGuide(BaseModel):"""Extraction guide configuration."""- target: Optional[Union[str, Dict[str, str]]] = None- rules: Optional[Union[str, Dict[str, str]]] = None- rules_for_nodes: Optional[Union[str, Dict[str, str]]] = None- rules_for_edges: Optional[Union[str, Dict[str, str]]] = None- rules_for_time: Optional[Union[str, Dict[str, str]]] = None- rules_for_location: Optional[Union[str, Dict[str, str]]] = None+ target: Optional[Union[str, List[str], Dict[str, Union[str, List[str]]]]] = None+ rules: Optional[Union[List[str], Dict[str, List[str]]]] = None+ rules_for_nodes: Optional[Union[List[str], Dict[str, List[str]]]] = None+ rules_for_edges: Optional[Union[List[str], Dict[str, List[str]]]] = None+ rules_for_time: Optional[Union[List[str], Dict[str, List[str]]]] = None+ rules_for_location: Optional[Union[List[str], Dict[str, List[str]]]] = Nonedef get_field(self, field_name: str, language: str = "zh") -> Optional[str]:"""Get specified field content for specified language."""value = getattr(self, field_name, None)if value is None:return None- if isinstance(value, str):- return value+ if isinstance(value, list):+ return "\n".join(f"{i+1}. {item}" for i, item in enumerate(value))if isinstance(value, dict):- return value.get(language) or value.get("zh") or ""+ dict_value = value.get(language) or value.get("zh")+ if dict_value is None:+ return None+ if isinstance(dict_value, list):+ return "\n".join(f"{i+1}. {item}" for i, item in enumerate(dict_value))return Nonediff --git a/hyperextract/utils/template_engine/prompt_builder.py b/hyperextract/utils/template_engine/prompt_builder.pyindex 7b9961c..fbcfb86 100644--- a/hyperextract/utils/template_engine/prompt_builder.py+++ b/hyperextract/utils/template_engine/prompt_builder.py@@ -40,14 +40,18 @@ class PromptBuilder:self.labels = LABEL_MAPPING.get(language, LABEL_MAPPING["zh"])@staticmethod- def _get_text(value: Optional[Union[str, Dict[str, str]]], language: str = "zh") -> Optional[str]:- """Get multilingual text value."""+ def _get_text(value: Optional[Union[List[str], Dict[str, List[str]]]], language: str = "zh") -> Optional[str]:+ """Get multilingual text value, supports list format."""if value is None:return None- if isinstance(value, str):- return value+ if isinstance(value, list):+ return "\n".join(f"{i+1}. {item}" for i, item in enumerate(value))if isinstance(value, dict):- return value.get(language) or value.get("zh") or ""+ dict_value = value.get(language) or value.get("zh")+ if dict_value is None:+ return None+ if isinstance(dict_value, list):+ return "\n".join(f"{i+1}. {item}" for i, item in enumerate(dict_value))return Nonedef _add_title(self, text: str, title_key: str) -> str:diff --git a/pyproject.toml b/pyproject.tomlindex b70225e..8d3582a 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -20,9 +20,8 @@ classifiers = ["Development Status :: 3 - Alpha","Intended Audience :: Developers","Intended Audience :: Science/Research",- "License :: OSI Approved :: Apache-2.0",+ "License :: OSI Approved :: Apache Software License","Programming Language :: Python :: 3",- "Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Topic :: Scientific/Engineering :: Artificial Intelligence",@@ -38,6 +37,11 @@ dependencies = ["ontosight>=0.1.4","python-dotenv>=1.2.1","semhash>=0.3.2",+ # cli dependencies+ "typer>=0.13.0",+ "rich>=13.7.0",+ "tomli>=2.0.1",+ "tomli-w>=1.0.0",][dependency-groups]@@ -48,8 +52,11 @@ dev = ["pytest>=9.0.2",]-[project.optional-dependencies]-cli = ["typer[all]>=0.13.0", "rich>=13.7.0", "tomli>=2.0.1", "tomli-w>=1.0.0"]++[project.urls]+Homepage = "https://github.com/yifanfeng97/hyper-extract"+Repository = "https://github.com/yifanfeng97/hyper-extract"+Issues = "https://github.com/yifanfeng97/hyper-extract/issues"[project.scripts]he = "hyperextract.cli:app"diff --git a/tests/fixtures/test_samples/en/finance/.gitkeep b/tests/fixtures/test_samples/en/finance/.gitkeepdeleted file mode 100644index e69de29..0000000diff --git a/tests/fixtures/test_samples/en/finance/earnings_call_transcript_sample.md b/tests/fixtures/test_samples/en/finance/earnings_call_transcript_sample.mddeleted file mode 100644index 7781fca..0000000--- a/tests/fixtures/test_samples/en/finance/earnings_call_transcript_sample.md+++ /dev/null@@ -1,202 +0,0 @@-# Palantir Technologies Inc. (PLTR)-## Q4 2025 Earnings Call Transcript--| | |-|---|---|-| **Date** | February 10, 2026 |-| **Time** | 5:00 PM ET |-| **Participants** | Alexander Karp, CEO; Ryan Taylor, CFO; Shyam Sankar, CTO; Ann Choe, Head of Investor Relations |-------## Operator--Good afternoon, and welcome to Palantir Technologies' Fourth Quarter and Full Year 2025 Earnings Conference Call. All participants are in listen-only mode. A question-and-answer session will follow the formal presentation. This call is being recorded.--I would now like to turn the call over to Ann Choe, Head of Investor Relations.-------## Ann Choe — Head of Investor Relations--Thank you, operator. Good afternoon, everyone, and thank you for joining us. Today's call will include forward-looking statements that involve risks and uncertainties. Actual results may differ materially from those expressed or implied. Please refer to our SEC filings for a more detailed discussion of risk factors. We will also reference certain non-GAAP financial measures during today's call. Reconciliations to the most comparable GAAP measures are available in our earnings press release.--With that, I'll turn the call over to Alex.-------## Alexander Karp — Chief Executive Officer--Thank you, Ann. Good afternoon, everyone.--2025 was a landmark year for Palantir. We delivered $3.12 billion in total revenue, growing 29% year-over-year, with U.S. commercial revenue accelerating to 54% growth. More importantly, we are at the center of the most significant technological transformation of our generation — the deployment of artificial intelligence in enterprise and government operations at scale.--Let me share a few numbers that illustrate our momentum. We closed 187 deals worth more than $1 million in Q4, up from 128 in the year-ago quarter. Our U.S. government business grew 23% year-over-year to $1.48 billion, driven by expanded deployments across the Department of Defense, Intelligence Community, and civilian agencies. Our commercial business reached $1.64 billion, growing 35% and now representing 53% of total revenue — a milestone that reflects the fundamental shift in our business composition.--The Artificial Intelligence Platform, or AIP, which we launched in 2023, has become the primary growth engine for our commercial business. AIP revenue reached approximately $840 million in 2025, up from $310 million in 2024. What makes AIP transformative is not just the revenue trajectory — it's the way it changes customer engagement. Customers are moving from proof-of-concept to production deployment faster than anything we have seen in our history. The median time from first AIP bootcamp to production deployment decreased from 14 weeks in Q1 2025 to 8 weeks in Q4 2025.--I want to be direct about something. The demand environment we are seeing today is unlike anything in our 22-year history. We are not capacity-constrained on the product side. We are capacity-constrained on the talent side. We need more forward-deployed engineers, more solutions architects, more people who can help our customers transform their operations. We added 340 net new employees in Q4, our largest hiring quarter ever, and we plan to add 500 or more in Q1 2026.--Let me turn it over to Ryan for the financial details.-------## Ryan Taylor — Chief Financial Officer--Thank you, Alex.--I'll walk through our fourth quarter and full year results, followed by our guidance for 2026.--### Q4 2025 Results--Fourth quarter revenue was $845 million, up 30% year-over-year and 8% sequentially, exceeding our guidance range of $795 million to $815 million.--Breaking this down by segment:-- **U.S. Government revenue**: $395 million, up 22% year-over-year. Growth was driven by expanded deployment of Maven Smart System across combatant commands and a significant new contract with the Department of Veterans Affairs worth $145 million over five years.-- **U.S. Commercial revenue**: $278 million, up 54% year-over-year and 12% sequentially. This represents our sixth consecutive quarter of accelerating U.S. commercial growth. We added 72 net new U.S. commercial customers in Q4, bringing the total to 498.-- **International Government revenue**: $98 million, up 12% year-over-year. Growth was driven by expanded NATO partnerships and new contracts in the Indo-Pacific region.-- **International Commercial revenue**: $74 million, up 18% year-over-year. We saw particular strength in the UK, Australia, and Japan markets.--**Total contract value (TCV)** signed in Q4 was $1.28 billion, up 40% year-over-year. Remaining deal value (RDV) at year-end was $5.4 billion, up 35% from $4.0 billion at the end of 2024.--Moving to profitability — adjusted operating income in Q4 was $338 million, representing a 40% adjusted operating margin. This compares to $267 million, or 41% margin, in Q4 2024. The slight margin compression reflects our deliberate acceleration of hiring and go-to-market investment. On a GAAP basis, operating income was $142 million, or 16.8% margin.--**GAAP net income** for Q4 was $126 million, or $0.05 per diluted share. Adjusted net income was $298 million, or $0.12 per diluted share, compared to $0.09 in Q4 2024.--Free cash flow in Q4 was $287 million, representing a 34% margin. For the full year, free cash flow was $1.04 billion, up 48% year-over-year.--### Full Year 2025 Results--| Metric | FY2025 | FY2024 | Growth |-|---|---|---|---|-| Total Revenue | $3,120M | $2,418M | +29% |-| U.S. Government | $1,480M | $1,205M | +23% |-| U.S. Commercial | $952M | $618M | +54% |-| International Government | $378M | $338M | +12% |-| International Commercial | $310M | $257M | +21% |-| Adjusted Operating Income | $1,216M | $948M | +28% |-| Adjusted Operating Margin | 39.0% | 39.2% | -20 bps |-| GAAP Net Income | $462M | $312M | +48% |-| Adjusted EPS | $0.43 | $0.33 | +30% |-| Free Cash Flow | $1,040M | $702M | +48% |-| Rule of 40 Score | 68% | 65% | +3 pts |--We ended the year with $4.6 billion in cash, cash equivalents, and short-term investments, and zero debt. Our balance sheet is a fortress, and we intend to maintain it as such.--### 2026 Guidance--For Q1 2026, we expect:-- Revenue of $870 million to $890 million (28-31% year-over-year growth)-- Adjusted operating income of $354 million to $366 million (approximately 41% margin)--For the full year 2026, we expect:-- Revenue of $3.89 billion to $3.95 billion (25-27% year-over-year growth)-- U.S. commercial revenue growth of 45% or higher-- Adjusted operating income of $1.55 billion to $1.58 billion (approximately 40% margin)-- Adjusted free cash flow of $1.25 billion to $1.35 billion--I want to highlight that our guidance reflects a cautious approach to international government spending, where we see some near-term uncertainty related to European defense procurement timelines. Our U.S. business assumptions are underpinned by a robust pipeline and strong conversion rates.--Let me turn it to Shyam to discuss our technology platform.-------## Shyam Sankar — Chief Technology Officer--Thanks, Ryan.--I want to focus on three technology themes that are defining our trajectory.--First, **AIP adoption**. In Q4, we conducted 186 AIP bootcamps, up from 92 in Q4 2024. But the quality of engagement is changing. We are now seeing C-suite executives personally attending bootcamps — 34% of Q4 bootcamps had a CEO, COO, or division president in the room, compared to 12% a year ago. This is not a technology evaluation anymore. This is a strategic transformation conversation.--Second, **ontology-driven AI**. Our fundamental differentiator remains the Ontology — the semantic layer that connects AI models to real-world operations. In 2025, we expanded the Ontology to support large language model integration natively, allowing customers to deploy LLM-powered workflows that are grounded in operational data and subject to governance controls. We now support integration with over 30 LLM providers, including GPT-4, Claude, Gemini, Llama, and Mistral, giving customers flexibility while maintaining operational control through the Ontology.--Third, **edge AI deployment**. Our Gotham platform's edge capabilities, initially developed for military applications, are now being deployed in commercial settings — factory floors, oil rigs, hospital networks — where low-latency, air-gapped AI inference is required. Edge deployments grew 85% year-over-year and now represent approximately 15% of total deployments.--With that, let's open it up for questions.-------## Question and Answer Session--### Dan Ives — Wedbush Securities--**Dan Ives**: Great quarter. Alex, can you talk about the competitive landscape for AIP? We're seeing Microsoft, Salesforce, and others launching enterprise AI platforms. How sustainable is your competitive moat?--**Alexander Karp**: Dan, I appreciate the question. I've heard this concern many times — in 2008 when people said Google would replace us, in 2015 when big data platforms were going to make us irrelevant, and now with enterprise AI platforms. Here's what I'll say: the companies you mention are building horizontal AI tools. We build systems that operate in the world's most complex, consequential environments. When an F-35 pilot needs real-time intelligence fusion at 40,000 feet, or when a hospital network needs to optimize 50,000 patient workflows simultaneously, you need more than a chatbot wrapper. You need an operational AI system grounded in an ontology that reflects the physical world. That is what we build, and I believe no one else is close to replicating it.--**Ryan Taylor**: I'd add the data point that our win rates in competitive evaluations have actually increased in 2025 — we won 78% of competitive deals in Q4, up from 72% in Q4 2024. When customers do rigorous evaluations, we tend to win.-------### Brent Thill — Jefferies--**Brent Thill**: Ryan, the U.S. commercial growth is remarkable at 54%. How should we think about the sustainability of that growth rate? And can you break down how much is expansion versus new logos?--**Ryan Taylor**: Sure, Brent. Of the $952 million in U.S. commercial revenue, approximately 60% came from existing customers through expansion and upsell, and 40% from new customer cohorts acquired in the past 12 months. Our net dollar retention rate in U.S. commercial was 137% in Q4, which means existing customers are increasing spending significantly.--On sustainability — we see a long runway. We have 498 U.S. commercial customers, which represents less than 5% penetration of our identified addressable market of roughly 10,000 enterprises in the U.S. that could benefit from our platform. The average U.S. commercial customer is spending approximately $1.9 million annually, but our top cohort of customers — those who've been with us for three-plus years — averages $8.5 million. That gap represents enormous upsell opportunity.-------### Keith Weiss — Morgan Stanley--**Keith Weiss**: Shyam, you mentioned edge AI deployments growing 85%. Can you give us a sense of the revenue contribution and margin profile of edge versus cloud deployments?--**Shyam Sankar**: Keith, edge deployments are currently about 15% of total deployments by count, contributing approximately 10% of revenue. The margin profile is actually favorable — edge deployments typically carry higher software margins because customers are deploying in environments where they value the software's operational impact enormously and there's less cloud infrastructure cost on our side. We do have higher upfront implementation costs for edge, but lifetime margins are attractive.--Looking ahead, we expect edge to become 20-25% of deployments by the end of 2026, driven by adoption in manufacturing, energy, and healthcare verticals.-------### Mariana Perez — Bank of America--**Mariana Perez**: Alex, can you comment on the recent executive order on AI and how it might impact Palantir's government business? Also, any update on the TITAN program?--**Alexander Karp**: On the executive order — we welcome greater clarity on AI governance in government. Palantir has always operated under the most stringent security and compliance frameworks. If anything, increased AI regulation benefits us because it raises the bar that competitors must clear. We have FedRAMP High, IL-5 and IL-6 certifications, and we're working toward IL-7. Most AI companies cannot operate at these classification levels.--On TITAN — the Army's Tactical Intelligence Targeting Access Node program — we continue to be the prime contractor. The system achieved initial operating capability in Q3 2025, and we received positive feedback from the field. We expect TITAN to enter full-rate production in 2026, which we anticipate will contribute $80 million to $100 million in annual revenue at maturity.-------### Raimo Lenschow — Barclays--**Raimo Lenschow**: Ryan, you mentioned plans to hire 500+ in Q1. That's a significant acceleration. How should we think about the impact on margins? And are you giving any signal about moving from your 40% adjusted operating margin target?--**Ryan Taylor**: Great question, Raimo. We are very deliberately leaning into growth right now. We believe this is a generational opportunity to capture market share while demand is accelerating. We will not sacrifice the long-term opportunity to optimize short-term margins.--That said, we expect adjusted operating margins to remain in the 39-41% range for 2026. We can maintain margins while accelerating hiring because revenue growth is giving us significant operating leverage on our existing infrastructure. Our revenue per employee increased 12% in 2025 to approximately $1.05 million, and we expect further improvement in 2026.--We are not changing our long-term target of 40%+ adjusted operating margins. We believe we can invest aggressively in growth while maintaining industry-leading profitability.-------### Tyler Radke — Citi--**Tyler Radke**: Ryan, one more on the guidance — the 25-27% growth guidance for 2026 seems conservative given you just did 29% and the pipeline commentary sounds very positive. Is there something specific driving the deceleration assumption?--**Ryan Taylor**: Tyler, our guidance methodology hasn't changed — we provide ranges we have high confidence in achieving. I'd note that we've exceeded the high end of our revenue guidance for 12 consecutive quarters. The 25-27% range primarily reflects conservatism on international government timing. If international government growth reaccelerates to the mid-teens, that would represent upside to our guidance.--**Alexander Karp**: I'll just add — we don't guide to impress. We guide to deliver. Our track record speaks for itself.-------## Operator--This concludes the question-and-answer session. I'd like to turn the call back to Alex for closing remarks.-------## Alexander Karp — Closing Remarks--Thank you all for joining. I'll close with this thought. Twenty-two years ago, we started this company with a conviction that software could be built to solve the world's hardest problems. For most of that time, we were misunderstood — too niche, too dependent on government, too unconventional. Today, we are a $3.1 billion revenue company growing nearly 30%, profitable on both a GAAP and adjusted basis, with the strongest demand environment in our history.--The world is waking up to the reality that AI is not a chatbot. AI is a decision-making system that must be grounded in operational reality, governed by institutional values, and deployed in the most complex environments imaginable. That is exactly what we build. We will continue to invest aggressively, hire the best people, and deliver for our customers and shareholders.--Thank you, and good evening.-------## Operator--This concludes today's conference call. You may now disconnect.diff --git a/tests/fixtures/test_samples/en/finance/equity_research_report_sample.md b/tests/fixtures/test_samples/en/finance/equity_research_report_sample.mddeleted file mode 100644index 08d36cd..0000000--- a/tests/fixtures/test_samples/en/finance/equity_research_report_sample.md+++ /dev/null@@ -1,177 +0,0 @@-# Equity Research Report--## SolarEdge Technologies, Inc. (SEDG)--| | |-|---|---|-| **Analyst** | Rebecca Liu, CFA |-| **Research Firm** | Pinnacle Capital Markets |-| **Report Date** | January 15, 2026 |-| **Rating** | Upgrade to OVERWEIGHT (from Neutral) |-| **Prior Rating** | Neutral |-| **Target Price** | $42.00 |-| **Prior Target Price** | $28.00 |-| **Current Price** | $31.45 (as of January 14, 2026) |-| **Upside Potential** | 33.5% |-| **Market Cap** | $1.82 billion |-| **Sector** | Clean Energy / Semiconductors |-------## Investment Thesis--We are upgrading SolarEdge Technologies to Overweight with a $42 price target, representing 33.5% upside from current levels. After a prolonged destocking cycle that pressured revenues throughout 2024 and early 2025, we see compelling evidence that the channel inventory correction is complete and a fundamental recovery is underway. Three catalysts underpin our bullish thesis:--1. **Channel normalization complete**: European distributor inventory levels have returned to 4-6 weeks from peak levels of 14-16 weeks in Q1 2024. Our proprietary channel checks across 15 European distributors confirm sell-through rates have inflected positively since Q3 2025, with October and November showing 22% sequential improvement.--2. **Residential solar demand recovery**: U.S. residential solar installations grew 8% year-over-year in Q3 2025, the first positive quarter since Q4 2023, driven by favorable net metering policy extensions in California (NEM 3.0 transition effects fading), Florida, and Texas. European residential demand is benefiting from revised energy efficiency mandates under the EU Energy Performance of Buildings Directive.--3. **Battery storage attach rate inflection**: SolarEdge's residential battery attach rate reached 38% in Q3 2025, up from 24% a year ago, driven by the Home Hub 2.0 launch and growing time-of-use rate arbitrage value. Each battery attachment adds approximately $4,000 to system ASP and carries gross margins 5-8 percentage points above inverter-only margins.-------## Key Catalysts--### Near-Term (0-6 months)-- **Q4 2025 earnings report** (expected February 2026): We expect revenue of $285 million, above consensus of $271 million, driven by European restocking and improving U.S. residential demand. Non-GAAP EPS of $0.15 vs. consensus of $0.08.-- **IRA domestic content bonus**: SolarEdge's new U.S. manufacturing facility in Austin, Texas (operational since September 2025) qualifies the company's inverters for the 10% domestic content bonus, providing a competitive advantage over Chinese competitors.--### Medium-Term (6-18 months)-- **Commercial & Industrial (C&I) expansion**: Launch of the new 330kW three-phase inverter platform in H1 2026 positions SolarEdge to accelerate penetration of the commercial rooftop market, a $5.2 billion addressable opportunity.-- **Grid services revenue**: SolarEdge's virtual power plant (VPP) software, currently in pilot with three major U.S. utilities, could generate $15-20 million in incremental annual revenue by 2027 with minimal marginal costs.--### Long-Term (18+ months)-- **EV charging integration**: The convergence of home solar, battery, and EV charging through SolarEdge's integrated energy management platform represents a $12 billion TAM opportunity by 2030.-- **Market share recovery**: We project SolarEdge can regain 2-3 points of global residential inverter market share from current trough levels as inventory normalization completes.-------## Key Risks--### Downside Risks--1. **Renewed inventory destocking** (Probability: Low, Time Horizon: 6-12 months) — If European macroeconomic conditions deteriorate or solar module prices decline significantly, distributors could reduce inventory levels further, delaying the revenue recovery. A 10% reduction in channel sell-through from our estimates would reduce our FY2026 revenue forecast by approximately $180 million.--2. **Chinese inverter competition** (Probability: Medium, Time Horizon: 12-24 months) — Chinese manufacturers Huawei and Sungrow continue to gain share in European markets with pricing 20-30% below SolarEdge. While trade barriers and domestic content requirements provide some protection in the U.S. market, European market share erosion remains a structural concern. Each 1% of European market share loss equates to approximately $35 million in annual revenue.--3. **Interest rate sensitivity** (Probability: Medium, Time Horizon: 6-12 months) — Residential solar demand is correlated with consumer financing costs. If the Federal Reserve reverses course on rate cuts or long-term rates increase, residential solar loan/lease economics could deteriorate, dampening installation volumes.--4. **Product quality and warranty risk** (Probability: Low, Time Horizon: 12-36 months) — SolarEdge's field failure rates on HD-Wave inverters have been a periodic concern. While the company has improved quality metrics (failure rate declining from 2.1% to 0.8% over the past two years), a widespread quality issue could generate significant warranty costs and reputational damage. The company carries $187 million in warranty reserves as of Q3 2025.--5. **Customer concentration** (Probability: Low, Time Horizon: Ongoing) — SolarEdge's top 10 distributors account for approximately 55% of total revenue. The loss of a major distribution relationship, particularly with Baywa r.e. (estimated 9% of revenue) or CED Greentech (estimated 7%), could materially impact results.-------## Financial Forecasts--### Revenue Estimates ($ millions)--| Metric | FY2024A | FY2025E | FY2026E | FY2027E |-|---|---|---|---|---|-| Solar Segment Revenue | $724 | $965 | $1,340 | $1,620 |-| Battery Storage Revenue | $98 | $178 | $312 | $445 |-| Other Revenue | $42 | $57 | $78 | $95 |-| **Total Revenue** | **$864** | **$1,200** | **$1,730** | **$2,160** |-| YoY Growth | -38.2% | 38.9% | 44.2% | 24.9% |--### Profitability Estimates--| Metric | FY2024A | FY2025E | FY2026E | FY2027E |-|---|---|---|---|---|-| Gross Margin | 18.2% | 28.5% | 32.0% | 34.5% |-| Operating Margin | -22.4% | 2.8% | 10.5% | 14.2% |-| **Non-GAAP EPS** | **($3.82)** | **$0.45** | **$2.85** | **$5.10** |-| Consensus EPS | ($3.90) | $0.38 | $2.52 | $4.65 |-| Our vs. Consensus | +2.1% | +18.4% | +13.1% | +9.7% |--### Key Assumptions--- U.S. residential solar installations grow 12% in 2026, 10% in 2027-- European residential solar installations recover to 2023 levels by H2 2026-- Battery attach rate reaches 45% by end of 2026, 55% by end of 2027-- Gross margin recovery driven by mix shift toward higher-margin battery/software, operational leverage on Austin manufacturing, and component cost deflation-- Operating expenses grow 8-10% annually, well below revenue growth, reflecting operating leverage-------## Valuation Logic--### Primary Methodology: Forward EV/Revenue--We value SolarEdge on a forward EV/Revenue basis, our preferred methodology for companies transitioning from loss to profitability. Our $42 target is based on 2.0x CY2027E revenue of $2.16 billion, discounted back at a 10% cost of equity.--**Valuation drivers and justification for 2.0x multiple:**-- Historical trading range of 1.5x-6.0x forward revenue; current level of 1.3x represents trough valuation-- Peer group (Enphase Energy, Generac, SMA Solar) trades at a median of 2.8x forward revenue-- We apply a 30% discount to peer median reflecting SolarEdge's lower margins and higher competitive risk exposure-- Multiple expansion from 1.3x to 2.0x is justified by margin recovery trajectory and earnings inflection--### Cross-Check: DCF Analysis--| Assumption | Value |-|---|---|-| Revenue CAGR (2025-2030) | 18% |-| Terminal EBITDA Margin | 18% |-| WACC | 11.5% |-| Terminal Growth Rate | 3.0% |-| **Implied Share Price** | **$45.20** |--Our DCF cross-check yields $45.20, providing 7.6% upside to our $42 target and confirming our valuation is conservative.--### Scenario Analysis--| Scenario | Probability | Target Price | Key Assumptions |-|---|---|---|---|-| Bull Case | 25% | $58 | Faster inventory recovery, battery attach rate exceeds 50% by 2026, C&I market traction |-| Base Case | 55% | $42 | Gradual recovery per our estimates, steady market share |-| Bear Case | 20% | $18 | Renewed destocking, Chinese competition intensifies, macro downturn |-------## Factor Analysis--### Multi-Factor Influence Assessment--Our investment thesis is influenced by the interaction of several macro and micro factors:--**Macro-Level Factors:**-- **Interest rates** (Current: Moderately favorable) — Fed funds rate at 4.00% with expected cuts to 3.25% by year-end 2026. Lower rates directly improve residential solar loan economics and drive installation demand. Each 25 bps rate cut historically correlates with 3-5% improvement in residential solar demand within 2-3 quarters.--- **Energy prices** (Current: Supportive) — European natural gas prices remain elevated at €35/MWh, maintaining the economic case for residential solar. U.S. retail electricity prices averaging $0.17/kWh provide 6-8 year payback periods for residential solar in most markets.--- **Trade policy** (Current: Mixed) — U.S. tariffs on Chinese solar equipment provide protection for domestic manufacturers. However, potential EU tariff actions on Chinese inverters remain uncertain and could reshape competitive dynamics.--**Industry-Level Factors:**-- **Technology transition** (Current: Positive) — The shift to higher-power residential inverters (7.6kW+ vs. legacy 3.8kW models) plays to SolarEdge's strengths in power optimizer architecture and supports ASP growth.--- **Battery storage adoption** (Current: Strongly positive) — Rapidly declining lithium-ion battery costs ($120/kWh in 2025 vs. $145/kWh in 2024) are accelerating residential storage attach rates, expanding SolarEdge's addressable market.--**Company-Specific Factors:**-- **Product pipeline** (Current: Positive) — NexGen inverter platform expected in 2026 with 50% fewer components, improving reliability and reducing manufacturing costs.-- **Balance sheet** (Current: Adequate) — $580 million in cash with $350 million convertible notes due 2029. No near-term liquidity concerns.-------## Comparable Company Analysis--| Company | Ticker | Market Cap | EV/Rev (CY26E) | Gross Margin | Revenue Growth |-|---|---|---|---|---|---|-| Enphase Energy | ENPH | $11.2B | 4.2x | 45.0% | 28% |-| Generac Holdings | GNRC | $8.5B | 2.1x | 37.5% | 12% |-| SMA Solar | S92.DE | $2.8B | 1.8x | 29.0% | 15% |-| Shoals Technologies | SHLS | $2.1B | 3.5x | 38.0% | 22% |-| **SolarEdge** | **SEDG** | **$1.8B** | **1.3x** | **28.5%** | **44%** |--SolarEdge trades at a significant discount to peers on EV/Revenue despite having the highest expected revenue growth rate in the peer group. We view this discount as excessive given the improving fundamental trajectory.-------## Analyst Certification--I, Rebecca Liu, CFA, hereby certify that the views expressed in this research report accurately reflect my personal views about the subject company and its securities. I further certify that no part of my compensation was, is, or will be directly or indirectly related to the specific recommendations or views expressed in this report.--**Pinnacle Capital Markets — Equity Research Division**--*This report is intended for institutional investors only. Please see important disclosures at the end of this document.*--**Disclosures**: Pinnacle Capital Markets makes a market in SEDG securities. The analyst and her household do not hold positions in SEDG. Pinnacle Capital Markets has received investment banking fees from SolarEdge Technologies in the past 12 months.diff --git a/tests/fixtures/test_samples/en/finance/financial_news_sample.md b/tests/fixtures/test_samples/en/finance/financial_news_sample.mddeleted file mode 100644index b11d774..0000000--- a/tests/fixtures/test_samples/en/finance/financial_news_sample.md+++ /dev/null@@ -1,136 +0,0 @@-# Markets Rocked as Federal Reserve Signals Slower Rate Cut Path; Tech Selloff Deepens--**By Jonathan Chen and Sarah Whitfield, Financial Markets Correspondents**-**Reuters — December 18, 2025**-------## Breaking: Fed Holds Rates, Revises 2026 Outlook--The Federal Reserve on Wednesday held the federal funds rate steady at 4.00%-4.25%, as widely expected, but delivered a hawkish surprise by signaling only two rate cuts in 2026 — down from the four cuts projected in its September dot plot. The revised Summary of Economic Projections showed median expectations for the fed funds rate at 3.50%-3.75% by year-end 2026, compared to 3.00%-3.25% previously.--Fed Chair Jerome Powell stated during the post-meeting press conference: "The economy has shown remarkable resilience, and inflation progress, while meaningful, has been slower than anticipated in recent months. We need to see further evidence that inflation is sustainably moving toward our 2% target before adjusting policy more aggressively."--Core PCE inflation for November came in at 2.8% year-over-year, down from the 3.7% peak in 2023 but still above the Fed's 2% target. The labor market remains tight, with unemployment at 3.9% and average hourly earnings growing 3.8% year-over-year.-------## Market Reaction: Broad-Based Selloff--The hawkish shift triggered a sharp selloff across equity and bond markets:--### Equities-- **S&P 500**: Fell 2.3% to 5,872.40, its worst single-day decline since August 2025-- **NASDAQ Composite**: Dropped 3.1% to 19,234.18, led by declines in high-growth technology stocks-- **Dow Jones Industrial Average**: Declined 1.8% to 43,127.55-- **Russell 2000**: Fell 3.5% to 2,198.73, with small-cap stocks particularly sensitive to higher-for-longer rates--### Fixed Income-- **10-Year Treasury Yield**: Rose 14 basis points to 4.52%, its highest level since October 2025-- **2-Year Treasury Yield**: Climbed 18 basis points to 4.38%, reflecting repriced rate expectations-- **Investment-grade corporate spreads**: Widened 8 basis points to 98 basis points over Treasuries--### Currencies and Commodities-- **US Dollar Index (DXY)**: Strengthened 0.9% to 104.82-- **EUR/USD**: Fell to 1.0412, its weakest level in three weeks-- **Gold**: Rose 1.2% to $2,068/oz as a safe-haven bid, despite dollar strength-- **WTI Crude**: Declined 2.1% to $69.45/bbl on global growth concerns-------## Sector Analysis: Winners and Losers--### Technology Under Pressure--The technology sector bore the brunt of the selloff, with the S&P 500 Information Technology index falling 3.4%. Rate-sensitive growth stocks with high valuations were hit hardest:--- **NVIDIA (NVDA)**: -4.2% to $132.50. Despite continued strong AI demand, the stock's 45x forward P/E leaves it vulnerable to rising discount rates. Analysts at Goldman Sachs noted that each 50 bps increase in the risk-free rate theoretically reduces NVIDIA's fair value by approximately 8-10%.-- **Tesla (TSLA)**: -5.1% to $378.20. The stock's 80x forward P/E and dependence on future robotaxi revenue make it particularly sensitive to discount rate changes.-- **Palantir (PLTR)**: -6.3% to $72.40. Despite strong fundamental momentum, the stock's 55x forward revenue multiple has left it exposed to the rate-driven multiple compression.-- **Snowflake (SNOW)**: -4.8% to $168.30. Cloud consumption growth stocks saw broad selling pressure.--### Financials: Mixed Picture--Bank stocks showed a bifurcated response:-- **JPMorgan Chase (JPM)**: +1.2% to $218.40. Higher-for-longer rates support net interest income, and JPM's diversified business model benefits from elevated market volatility.-- **Bank of America (BAC)**: +0.8% to $42.15. Similar dynamics as JPM, though with greater sensitivity to consumer credit quality.-- **Regional banks (KRE ETF)**: -2.4%. Smaller banks face continued deposit cost pressures and commercial real estate exposure concerns in the higher rate environment.--### Real Estate and Utilities Hit Hard--Rate-sensitive sectors declined sharply:-- **Real Estate (XLRE)**: -3.8%. REITs face higher refinancing costs and cap rate expansion pressure.-- **Utilities (XLU)**: -2.9%. The sector's dividend yield attractiveness diminishes relative to rising Treasury yields.-- **Homebuilders (XHB)**: -4.2%. Mortgage rates, which had declined from 7.8% to 6.4% in anticipation of Fed cuts, are now expected to remain above 6.5% through H1 2026.-------## Analyst Reactions and Outlook--### Bull Case--**Tom Lee, Fundstrat Global Advisors**: "The market is overreacting. Two cuts is still easing. The economy is growing, earnings are expanding, and AI capex is accelerating. This is a buying opportunity for quality growth names. The S&P 500 earnings yield of 5.8% still offers adequate risk premium over the 10-year Treasury."--**David Kostin, Goldman Sachs Chief U.S. Equity Strategist**: "We maintain our 2026 S&P 500 year-end target of 6,500. While the rate path adjustment is a near-term headwind, our bottom-up earnings model projects S&P 500 EPS of $275 in 2026, representing 11% growth. Multiple compression from reduced rate cut expectations is worth approximately 0.5x on the forward P/E, which we estimate at 22.5x."--### Bear Case--**Mike Wilson, Morgan Stanley Chief U.S. Equity Strategist**: "The Fed's message is clear — they are concerned about the last mile of inflation. Markets had gotten ahead of themselves pricing in aggressive easing. We see risk of a 5-10% correction in Q1 2026 as earnings expectations reset. Our year-end 2026 target for the S&P 500 is 5,900, implying limited upside from current levels."--**Peter Schiff, Euro Pacific Capital**: "The Fed is trapped. They cannot cut rates aggressively without reigniting inflation, but they cannot keep rates elevated without eventually triggering a recession. The real economy is weaker than the data suggest — leading indicators including the Conference Board LEI have declined for 4 of the past 6 months."--### Neutral / Cautious--**Liz Ann Sonders, Charles Schwab Chief Investment Strategist**: "We're entering a period of heightened uncertainty. The market needs to recalibrate expectations not just for the rate path but for the interaction between monetary policy, fiscal policy, and corporate earnings. Selectivity will matter more than ever in 2026."-------## Global Implications--### European Markets--European markets are expected to open lower Thursday, with Euro Stoxx 50 futures down 1.8%. The European Central Bank, which cut rates by 25 basis points last week to 3.00%, faces a diverging policy path from the Fed. A stronger dollar and weaker euro could exacerbate imported inflation pressures in Europe.--**Holger Schmieding, Chief Economist at Berenberg**: "The Fed's hawkish pivot complicates the ECB's easing cycle. A weaker euro helps European exporters but raises inflation risks. We now expect the ECB to pause at its January meeting before resuming cuts in March."--### Emerging Markets--Emerging market currencies and equities face headwinds from the stronger dollar:-- **MSCI Emerging Markets Index**: Down 2.7% in after-hours trading-- **Brazilian Real**: Weakened 1.4% against the dollar-- **Indian Rupee**: Hit a record low of 84.35 per dollar-- Analysts at JPMorgan note that higher U.S. rates could trigger $15-20 billion in capital outflows from EM bond funds in Q1 2026--### China Response--The People's Bank of China is widely expected to accelerate its own monetary easing in response. The PBOC has already cut the one-year MLF rate by 40 basis points in 2025, and Goldman Sachs expects an additional 30-40 basis points of cuts in H1 2026 to support the property sector recovery and offset the drag from a stronger dollar on Chinese exporters.-------## What to Watch Next--1. **January 29, 2026 — Next FOMC meeting**: Markets are pricing only a 12% probability of a rate cut, down from 45% before today's meeting-2. **January 10, 2026 — December jobs report**: A strong print above 200,000 could further cement the higher-for-longer narrative-3. **January 15, 2026 — December CPI**: Core CPI needs to decelerate to 0.2% month-over-month or below to support the case for rate cuts-4. **Q4 2025 earnings season**: Beginning the week of January 13 with major bank earnings; consensus expects 9.5% S&P 500 EPS growth year-over-year-------## Historical Context--Today's market reaction is consistent with prior instances of hawkish Fed pivots:--| Date | Event | S&P 500 Reaction | Recovery Time |-|---|---|---|---|-| Dec 2018 | Powell "long way from neutral" | -19.8% peak-to-trough | 4 months |-| Sep 2022 | "Higher for longer" pivot | -8.2% in following month | 3 months |-| Aug 2025 | Yen carry trade unwind | -6.5% over 3 days | 3 weeks |-| Dec 2025 | Dot plot revision (today) | -2.3% (day 1) | TBD |--In each prior episode, markets eventually recovered as economic fundamentals reasserted themselves. However, the recovery timeline depended heavily on subsequent inflation and employment data.-------*Additional reporting by Michael Torres in New York, Yuki Nakamura in Tokyo, and Hans Mueller in Frankfurt.*--*Disclaimer: This article is for informational purposes only and does not constitute investment advice. Past performance does not guarantee future results.*diff --git a/tests/fixtures/test_samples/en/finance/ipo_prospectus_sample.md b/tests/fixtures/test_samples/en/finance/ipo_prospectus_sample.mddeleted file mode 100644index 5840549..0000000--- a/tests/fixtures/test_samples/en/finance/ipo_prospectus_sample.md+++ /dev/null@@ -1,224 +0,0 @@-# PROSPECTUS--# AURORA QUANTUM COMPUTING, INC.--## 28,000,000 Shares of Common Stock--### Initial Public Offering Price: $32.00 Per Share-------This is the initial public offering of shares of common stock of Aurora Quantum Computing, Inc. ("Aurora," the "Company," "we," "us," or "our"). We are offering 22,000,000 shares and the selling stockholders identified in this prospectus are offering an additional 6,000,000 shares. We will not receive any proceeds from the sale of shares by the selling stockholders.--Prior to this offering, there has been no public market for our common stock. Our common stock has been approved for listing on the New York Stock Exchange under the symbol "AURQ."--| | Per Share | Total |-|---|---|---|-| Initial public offering price | $32.00 | $896,000,000 |-| Underwriting discounts | $2.24 | $62,720,000 |-| Proceeds to Aurora (before expenses) | $29.76 | $654,720,000 |-| Proceeds to selling stockholders | $29.76 | $178,560,000 |--The underwriters have an option for 30 days to purchase up to 4,200,000 additional shares from us at the initial public offering price less underwriting discounts.--**Investing in our common stock involves a high degree of risk. See "Risk Factors" beginning on page 18.**--Neither the Securities and Exchange Commission nor any state securities commission has approved or disapproved of these securities or determined if this prospectus is truthful or complete.--**Joint Book-Running Managers**--Morgan Stanley Goldman Sachs J.P. Morgan--**Co-Managers**--Barclays Citigroup Deutsche Bank Securities--The date of this prospectus is March 15, 2026.-------## PROSPECTUS SUMMARY--### Overview--Aurora Quantum Computing, Inc. is a leading developer of quantum computing hardware and cloud-based quantum computing services. We design and manufacture superconducting quantum processors and provide access to our quantum computing systems through Aurora Quantum Cloud (AQC), a cloud platform that enables researchers, enterprises, and government agencies to run quantum algorithms without owning quantum hardware.--Founded in 2018 by Dr. James Liu and Dr. Priya Sharma at the Massachusetts Institute of Technology, Aurora has developed proprietary quantum processor technology that has achieved industry-leading qubit counts and coherence times. Our latest generation processor, Aurora-Q1000, features 1,024 physical qubits with an average coherence time of 320 microseconds, enabling the execution of practical quantum algorithms for optimization, simulation, and machine learning applications.--### Our Market Opportunity--The global quantum computing market was valued at approximately $1.3 billion in 2025 and is projected to reach $12.8 billion by 2030, representing a compound annual growth rate of 58%, according to McKinsey & Company. Key market drivers include:--- Growing demand for computational solutions beyond classical computing capabilities in drug discovery, materials science, financial modeling, and logistics optimization-- Increasing government investment in quantum computing research and infrastructure, with over $35 billion committed globally through national quantum initiatives-- Enterprise adoption accelerating as quantum-classical hybrid algorithms demonstrate practical advantages for specific use cases--### Financial Performance Summary--| | FY2025 | FY2024 | FY2023 |-|---|---|---|---|-| Revenue | $127.4M | $78.2M | $41.6M |-| Revenue Growth | 62.9% | 88.0% | 124.3% |-| Gross Margin | 58.3% | 52.1% | 44.8% |-| Operating Loss | $(198.5M) | $(167.3M) | $(142.8M) |-| Net Loss | $(204.2M) | $(172.8M) | $(148.5M) |-| Cash and Equivalents | $312.6M | $198.4M | $87.2M |-------## COMPANY HISTORY--### Timeline of Key Milestones--#### 2018 — Foundation-- **January 2018**: Aurora Quantum Computing incorporated in Delaware by co-founders Dr. James Liu (CEO) and Dr. Priya Sharma (CTO), based on quantum computing research conducted at MIT's Lincoln Laboratory-- **June 2018**: Secured $8 million seed round led by Andreessen Horowitz, with participation from Khosla Ventures and MIT's The Engine fund-- **September 2018**: Established first laboratory facility in Cambridge, Massachusetts; hired initial team of 12 quantum physicists and engineers--#### 2019 — First Processor-- **March 2019**: Demonstrated first superconducting quantum processor prototype with 32 qubits, achieving coherence times of 85 microseconds — 2.5x the then-industry average-- **August 2019**: Raised $45 million Series A round led by Sequoia Capital, with participation from Google Ventures, In-Q-Tel (the CIA's venture arm), and existing investors-- **November 2019**: Published peer-reviewed research in Nature Physics demonstrating quantum error correction advances that reduced logical error rates by 60%--#### 2020 — Cloud Platform Launch-- **February 2020**: Launched Aurora Quantum Cloud beta program with 15 academic and research institution partners, including Stanford, Caltech, and Oxford University-- **July 2020**: Raised $120 million Series B round co-led by Tiger Global and Fidelity Investments at a $780 million valuation-- **October 2020**: Achieved 64-qubit processor milestone (Aurora-Q64) with 150-microsecond coherence times; signed first commercial contracts with two pharmaceutical companies for drug discovery applications--#### 2021 — Commercial Traction-- **March 2021**: Opened 25,000 sq. ft. quantum processor fabrication facility in Somerville, Massachusetts, with capacity to produce 50 processors per year-- **June 2021**: Launched Aurora Quantum Cloud commercially; acquired first 28 paying enterprise customers across pharmaceutical, financial services, and materials science sectors-- **September 2021**: Raised $250 million Series C round led by SoftBank Vision Fund 2 at a $2.1 billion valuation; total funding reached $423 million-- **December 2021**: Headcount grew to 340 employees across Cambridge, MA and a new office in Boulder, Colorado--#### 2022 — Scaling Operations-- **February 2022**: Unveiled Aurora-Q256 processor with 256 qubits and 210-microsecond coherence times; demonstrated quantum advantage for specific molecular simulation tasks-- **May 2022**: Signed $35 million multi-year contract with the U.S. Department of Energy for quantum simulation of nuclear fusion plasma dynamics-- **August 2022**: Expanded into Europe with opening of London research center and partnership with Fraunhofer Institute in Germany-- **November 2022**: Revenue surpassed $10 million quarterly run rate for the first time; customer base grew to 85 enterprises--#### 2023 — Rapid Growth-- **January 2023**: Raised $180 million Series D round led by BlackRock at a $3.4 billion valuation-- **April 2023**: Launched financial services vertical with specialized quantum algorithms for portfolio optimization; signed Goldman Sachs, JPMorgan, and Citadel as anchor clients-- **July 2023**: Achieved 512-qubit milestone (Aurora-Q512) with 270-microsecond coherence; partnered with BMW for supply chain optimization applications-- **October 2023**: Revenue reached $41.6 million for FY2023; customer base exceeded 150 enterprises--#### 2024 — Pre-IPO Acceleration-- **January 2024**: Raised $300 million Series E round led by T. Rowe Price and Wellington Management at a $5.2 billion pre-money valuation-- **March 2024**: Opened quantum processor fabrication center in Austin, Texas, tripling manufacturing capacity to 150 processors per year-- **June 2024**: Signed strategic partnership with Amazon Web Services for integration of Aurora quantum processors into AWS Braket platform-- **September 2024**: Unveiled Aurora-Q1000 processor with 1,024 qubits; demonstrated practical quantum advantage for portfolio risk modeling with JP Morgan-- **December 2024**: Revenue reached $78.2 million for FY2024; 230 enterprise customers across 12 countries; headcount of 780 employees--#### 2025 — IPO Year-- **March 2025**: Selected Morgan Stanley, Goldman Sachs, and J.P. Morgan as joint book-running managers for planned IPO-- **June 2025**: Signed $52 million multi-year contract with Pfizer for quantum-accelerated drug discovery-- **September 2025**: Revenue run rate exceeded $150 million annualized; customer base surpassed 310 enterprises-- **December 2025**: FY2025 revenue of $127.4 million, up 62.9% year-over-year; 312 enterprise customers; 920 employees-------## USE OF PROCEEDS--We estimate that we will receive net proceeds of approximately $640 million from this offering (or approximately $765 million if the underwriters exercise their over-allotment option in full), after deducting underwriting discounts and estimated offering expenses.--We intend to use the net proceeds from this offering as follows:--| Use Category | Allocated Amount | % of Proceeds | Timeline | Description |-|---|---|---|---|---|-| **R&D — Next-gen Processor** | $250,000,000 | 39.1% | 2026-2028 | Development of the Aurora-Q4000 processor targeting 4,096+ qubits with error-corrected logical qubits; expansion of quantum algorithm research team; investment in topological qubit research program |-| **Manufacturing Expansion** | $150,000,000 | 23.4% | 2026-2027 | Construction of a new 60,000 sq. ft. advanced quantum processor fabrication facility in Austin, TX; procurement of dilution refrigerator systems and cryogenic equipment; target capacity of 300+ processors per year |-| **Cloud Infrastructure** | $100,000,000 | 15.6% | 2026-2028 | Expansion of Aurora Quantum Cloud data centers in Virginia, Frankfurt, and Tokyo; deployment of 200+ quantum processing units; development of hybrid classical-quantum orchestration platform |-| **Sales & Market Expansion** | $80,000,000 | 12.5% | 2026-2027 | Establishment of sales offices in Frankfurt, Tokyo, Singapore, and Seoul; hiring of 120+ enterprise sales and solutions engineering staff; channel partner development program |-| **Working Capital & General** | $60,000,000 | 9.4% | Ongoing | General corporate purposes including working capital, potential strategic acquisitions, and other corporate activities as determined by management |-------## SHAREHOLDER STRUCTURE--### Pre-IPO Capitalization--The following table sets forth information regarding the beneficial ownership of our common stock immediately prior to and after this offering:--#### Founders and Executive Officers--| Shareholder | Shares Held | Pre-IPO % | Post-IPO % | Share Class | Voting Power | Lock-up Period |-|---|---|---|---|---|---|---|-| Dr. James Liu (CEO & Co-founder) | 28,500,000 | 19.0% | 15.2% | Class B (10 votes/share) | 38.6% | 180 days |-| Dr. Priya Sharma (CTO & Co-founder) | 21,400,000 | 14.3% | 11.4% | Class B (10 votes/share) | 29.0% | 180 days |-| Dr. Kevin Park (Chief Quantum Architect) | 4,200,000 | 2.8% | 2.2% | Class A (1 vote/share) | 0.6% | 180 days |-| Jennifer Walsh (CFO) | 2,800,000 | 1.9% | 1.5% | Class A (1 vote/share) | 0.4% | 180 days |-| Michael Torres (CRO) | 1,900,000 | 1.3% | 1.0% | Class A (1 vote/share) | 0.3% | 180 days |--#### Institutional Investors--| Shareholder | Shares Held | Pre-IPO % | Post-IPO % | Share Class | Voting Power | Selling Shares |-|---|---|---|---|---|---|---|-| SoftBank Vision Fund 2 | 22,500,000 | 15.0% | 12.0% | Class A | 3.0% | 3,000,000 |-| Sequoia Capital | 13,500,000 | 9.0% | 6.9% | Class A | 1.8% | 1,500,000 |-| BlackRock Private Equity | 10,500,000 | 7.0% | 5.6% | Class A | 1.4% | 0 |-| T. Rowe Price | 9,000,000 | 6.0% | 4.8% | Class A | 1.2% | 750,000 |-| Tiger Global Management | 7,500,000 | 5.0% | 4.0% | Class A | 1.0% | 500,000 |-| Wellington Management | 6,000,000 | 4.0% | 3.2% | Class A | 0.8% | 250,000 |-| Fidelity Investments | 5,250,000 | 3.5% | 2.8% | Class A | 0.7% | 0 |-| Andreessen Horowitz | 4,500,000 | 3.0% | 2.4% | Class A | 0.6% | 0 |-| In-Q-Tel | 3,000,000 | 2.0% | 1.6% | Class A | 0.4% | 0 |-| Google Ventures | 2,700,000 | 1.8% | 1.4% | Class A | 0.4% | 0 |--#### Other Shareholders--| Shareholder | Shares Held | Pre-IPO % | Post-IPO % |-|---|---|---|---|-| Employee stock option pool (vested) | 4,500,000 | 3.0% | 2.4% |-| Employee stock option pool (unvested) | 6,750,000 | 4.5% | 3.6% |-| Other angel investors | 3,200,000 | 2.1% | 1.7% |--### Summary of Ownership Structure--| Category | Pre-IPO Shares | Pre-IPO % | Post-IPO Shares | Post-IPO % |-|---|---|---|---|---|-| Founders | 49,900,000 | 33.3% | 49,900,000 | 26.6% |-| Institutional Investors | 84,450,000 | 56.3% | 78,450,000 | 41.8% |-| Management & Employees | 13,400,000 | 8.9% | 13,400,000 | 7.1% |-| Other Pre-IPO | 3,200,000 | 2.1% | 3,200,000 | 1.7% |-| New Public Investors | — | — | 28,000,000 | 14.9% |-| Underwriter Over-allotment | — | — | 4,200,000 | 2.2% |-| **Total** | **150,000,000** | **100%** | **187,750,000** | **100%** |--### Dual-Class Share Structure--We have adopted a dual-class common stock structure:-- **Class A Common Stock**: One vote per share. All shares sold in this offering will be Class A shares.-- **Class B Common Stock**: Ten votes per share. Held exclusively by the co-founders. Class B shares automatically convert to Class A shares upon transfer (with limited exceptions) or upon the earlier of (i) seven years after the IPO or (ii) the date on which the co-founders collectively hold fewer than 10% of outstanding shares.--As of the completion of this offering, Dr. James Liu and Dr. Priya Sharma will collectively control approximately 67.6% of the total voting power, enabling them to control the outcome of matters submitted to stockholder vote, including the election of directors, amendments to our certificate of incorporation, and approval of significant corporate transactions.-------## RISK FACTORS--### Technology and Product Risks--**Quantum computing technology is at an early stage and may not achieve widespread commercial viability.** While we have demonstrated quantum advantage for specific applications, fault-tolerant universal quantum computing has not yet been achieved by any company. Our business model depends on continued advancement of quantum hardware and algorithms. If quantum computing technology fails to deliver meaningful practical advantages over classical computing within the timeframes expected by the market, demand for our products and services could be significantly lower than projected.--**Our quantum processors have limited operational lifetimes.** Superconducting qubits are extremely sensitive to environmental interference and require operating temperatures near absolute zero (approximately 15 millikelvin). Component degradation, including Josephson junction aging and dielectric loss, typically requires processor replacement every 18-24 months. The cost of replacement processors and ongoing cryogenic infrastructure maintenance represents a significant recurring expense.--### Market and Competition Risks--**We face intense competition from well-funded competitors.** The quantum computing industry includes competitors with substantially greater resources, including IBM (127+ qubit processors), Google (72+ qubit processors), Microsoft (topological approach), Amazon (ion trap approach through IonQ partnership), and several well-funded startups including Rigetti Computing, IonQ, and PsiQuantum. Several of these competitors have announced roadmaps to achieve fault-tolerant quantum computing within similar or earlier timeframes than our own.-------## MANAGEMENT--| Name | Position | Age | Background |-|---|---|---|---|-| Dr. James Liu | CEO & Co-founder | 38 | Ph.D. Quantum Physics, MIT; former researcher at IBM Quantum; 47 published papers; 23 patents |-| Dr. Priya Sharma | CTO & Co-founder | 36 | Ph.D. Applied Physics, MIT; former quantum hardware lead at Google Quantum AI; 38 published papers |-| Jennifer Walsh | CFO | 44 | MBA, Wharton; former VP Finance at Palantir Technologies; 15 years in technology finance |-| Dr. Kevin Park | Chief Quantum Architect | 42 | Ph.D. Physics, Caltech; former principal scientist at D-Wave Systems; pioneer in quantum error correction |-| Michael Torres | Chief Revenue Officer | 40 | BA, Stanford; former VP Enterprise Sales at Snowflake; 12 years in enterprise SaaS sales |-------*The date of this prospectus is March 15, 2026. You should rely only on the information contained in this prospectus. We have not authorized anyone to provide you with information different from that contained in this prospectus.*diff --git a/tests/fixtures/test_samples/en/finance/sec_10k_filing_sample.md b/tests/fixtures/test_samples/en/finance/sec_10k_filing_sample.mddeleted file mode 100644index ac28523..0000000--- a/tests/fixtures/test_samples/en/finance/sec_10k_filing_sample.md+++ /dev/null@@ -1,340 +0,0 @@-# UNITED STATES SECURITIES AND EXCHANGE COMMISSION-## Washington, D.C. 20549--# FORM 10-K--**ANNUAL REPORT PURSUANT TO SECTION 13 OR 15(d) OF THE SECURITIES EXCHANGE ACT OF 1934**--For the fiscal year ended December 31, 2025--Commission File Number: 001-39284-------# NEXTERA DYNAMICS, INC.-**(Exact Name of Registrant as Specified in Its Charter)**--| | |-|---|---|-| **State of Incorporation** | Delaware |-| **IRS Employer ID** | 84-3291057 |-| **Principal Office** | 2400 Innovation Drive, Austin, TX 78701 |-| **Telephone** | (512) 555-0192 |-| **Ticker Symbol** | NXTD |-| **Exchange** | NASDAQ Global Select Market |--Securities registered pursuant to Section 12(b) of the Act:--| Title of Each Class | Trading Symbol | Name of Exchange |-|---|---|---|-| Common Stock, $0.001 par value | NXTD | NASDAQ |-| 4.250% Senior Notes due 2030 | NXTD30 | NASDAQ |-------## PART I--### Item 1. Business--NexTera Dynamics, Inc. ("NexTera," "the Company," "we," or "our") is a global enterprise software company that develops and markets artificial intelligence-driven automation solutions for industrial and manufacturing operations. Founded in 2016, the Company has grown to serve over 3,200 enterprise customers across 45 countries. Our platform, NexCore AI, enables predictive maintenance, production optimization, and supply chain intelligence through proprietary machine learning algorithms and edge computing architecture.--#### Business Segments--The Company operates through three reportable business segments:--**1. Industrial Automation Solutions (IAS)**-Our largest segment, IAS provides end-to-end automation software for discrete and process manufacturing. Key products include NexCore Predict (predictive maintenance), NexCore Optimize (production scheduling), and NexCore Quality (automated inspection). This segment serves automotive, aerospace, semiconductor, and consumer electronics manufacturers. In FY2025, IAS generated revenues of $1.87 billion, representing 52% of total revenues, with 847 active enterprise contracts.--**2. Supply Chain Intelligence (SCI)**-The SCI segment offers real-time supply chain visibility, demand forecasting, and logistics optimization tools. Our platform integrates with over 200 ERP and warehouse management systems. The segment's flagship product, NexChain, is used by 1,400 customers across retail, pharmaceutical, and food & beverage industries. SCI revenues totaled $1.12 billion in FY2025, accounting for 31% of total revenues.--**3. Energy & Sustainability (E&S)**-Our newest segment, launched in 2022, provides energy management and carbon footprint optimization solutions for industrial facilities. NexGreen, the primary product, leverages IoT sensor networks and AI to reduce energy consumption by an average of 23% across deployed sites. E&S generated $612 million in revenues in FY2025, representing 17% of total revenues, with a year-over-year growth rate of 41%.--#### Competitive Strengths--- Proprietary AI models trained on over 15 billion industrial data points-- Integration partnerships with Siemens, Rockwell Automation, and Honeywell-- 97.2% customer retention rate in FY2025-- 1,847 issued patents and 423 pending patent applications-- Deep domain expertise with 2,100 engineers, 40% holding advanced degrees--#### Recent Developments--In October 2025, the Company completed the acquisition of CloudWorks Analytics, a Berlin-based predictive analytics firm, for approximately $340 million in cash and stock. This acquisition is expected to strengthen our European presence and add approximately 180 enterprise customers.-------### Item 1A. Risk Factors--Investing in our securities involves significant risks. You should carefully consider the following risk factors before making an investment decision.--#### Market and Industry Risks--**1. Rapid Technological Change**-The enterprise software and AI industries are subject to rapid technological evolution. Our competitive position depends on our ability to continuously innovate and adapt our products. The emergence of new AI paradigms, including large language models and generative AI, may disrupt existing automation workflows and require substantial investment to integrate. Failure to keep pace with technological change could result in loss of market share and declining revenues. This risk has intensified compared to prior periods due to accelerating AI development cycles.--**2. Intense Competition**-We face competition from large, diversified technology companies such as Microsoft, Google, Siemens, and SAP, as well as specialized competitors including C3.ai, Uptake Technologies, and Samsara. Several competitors have substantially greater financial, technical, and marketing resources than we do. Competitive pricing pressure could reduce our gross margins, which declined from 72.1% in FY2024 to 71.3% in FY2025.--**3. Macroeconomic Uncertainty**-Our business is sensitive to global economic conditions, particularly in the manufacturing sector. A prolonged economic downturn, trade policy changes, or geopolitical instability could lead to reduced capital expenditure by our customers, delayed purchasing decisions, and contract cancellations. Approximately 34% of our revenue is derived from international markets, exposing us to currency fluctuation risks.--#### Operational Risks--**4. Cybersecurity Threats**-As a provider of industrial automation software, our products operate in critical infrastructure environments. A security breach affecting our platform could result in significant operational disruption for our customers, leading to reputational damage, legal liability, and loss of customer confidence. We experienced a minor security incident in Q2 2025 that was contained within 48 hours, but increasingly sophisticated cyber threats represent an ongoing material risk.--**5. Dependence on Key Personnel**-Our success depends substantially on the continued service of key executives, including CEO Dr. Sarah Chen, CTO Marcus Rivera, and Chief AI Scientist Dr. Yuki Tanaka. The loss of any of these individuals could adversely affect our operations and strategic direction. Competition for qualified AI and machine learning talent remains intense, particularly in our Austin and San Francisco offices.--**6. Integration of Acquisitions**-The integration of CloudWorks Analytics and future acquisitions involves significant risks, including potential disruption to our business, failure to realize anticipated synergies, and difficulties in retaining acquired employees. We cannot guarantee that the expected $45 million in annual synergies from the CloudWorks acquisition will be achieved within the projected 18-month timeline.--#### Regulatory and Legal Risks--**7. Evolving AI Regulations**-Government regulation of artificial intelligence is evolving rapidly across multiple jurisdictions. The European Union's AI Act, which became fully applicable in 2025, imposes new compliance obligations on certain AI systems used in industrial settings. Similar regulatory frameworks are under consideration in the United States, China, and other markets. Compliance costs could be substantial, and new regulations may restrict certain uses of our technology.--**8. Intellectual Property Litigation**-We are currently a defendant in two patent infringement lawsuits filed by IndustriTech Holdings LLC and AutoMation IP Corp., alleging that certain features of our NexCore platform infringe their patents. While we believe these claims are without merit, unfavorable outcomes could result in significant monetary damages or injunctive relief that restricts our product functionality.-------## PART II--### Item 6. Selected Financial Data--#### Consolidated Statements of Operations (in millions, except per share data)--| | FY2025 | FY2024 | FY2023 |-|---|---|---|---|-| **Revenue** | $3,602 | $2,941 | $2,378 |-| Cost of Revenue | $1,034 | $821 | $673 |-| **Gross Profit** | $2,568 | $2,120 | $1,705 |-| Research & Development | $648 | $529 | $428 |-| Sales & Marketing | $576 | $482 | $404 |-| General & Administrative | $288 | $247 | $214 |-| Restructuring Charges | $12 | $— | $— |-| **Total Operating Expenses** | $1,524 | $1,258 | $1,046 |-| **Operating Income** | $1,044 | $862 | $659 |-| Interest Expense | $(47) | $(39) | $(28) |-| Other Income (Expense) | $18 | $12 | $8 |-| **Income Before Taxes** | $1,015 | $835 | $639 |-| Provision for Income Taxes | $213 | $175 | $134 |-| **Net Income** | $802 | $660 | $505 |-| **Earnings Per Share — Basic** | $3.34 | $2.78 | $2.15 |-| **Earnings Per Share — Diluted** | $3.28 | $2.73 | $2.11 |-| Weighted Average Shares — Basic | 240.1M | 237.5M | 234.8M |-| Weighted Average Shares — Diluted | 244.5M | 241.8M | 239.2M |-| Dividends Per Share | $0.48 | $0.40 | $0.32 |--#### Consolidated Balance Sheet (in millions)--| | December 31, 2025 | December 31, 2024 |-|---|---|---|-| **Assets** | | |-| Cash and Cash Equivalents | $1,247 | $1,089 |-| Short-term Investments | $385 | $312 |-| Accounts Receivable, net | $742 | $608 |-| Prepaid Expenses | $89 | $73 |-| **Total Current Assets** | $2,463 | $2,082 |-| Property and Equipment, net | $487 | $401 |-| Goodwill | $1,892 | $1,573 |-| Intangible Assets, net | $634 | $498 |-| Operating Lease Right-of-Use Assets | $213 | $189 |-| Other Assets | $156 | $128 |-| **Total Assets** | $5,845 | $4,871 |-| | | |-| **Liabilities** | | |-| Accounts Payable | $198 | $162 |-| Accrued Expenses | $312 | $256 |-| Deferred Revenue | $487 | $398 |-| Current Portion of Long-term Debt | $75 | $50 |-| **Total Current Liabilities** | $1,072 | $866 |-| Long-term Debt | $892 | $745 |-| Deferred Tax Liabilities | $178 | $146 |-| Operating Lease Liabilities | $189 | $168 |-| Other Long-term Liabilities | $67 | $54 |-| **Total Liabilities** | $2,398 | $1,979 |-| | | |-| **Stockholders' Equity** | | |-| Common Stock | $0.24 | $0.24 |-| Additional Paid-in Capital | $1,523 | $1,287 |-| Retained Earnings | $2,014 | $1,697 |-| Accumulated Other Comprehensive Loss | $(90) | $(92) |-| **Total Stockholders' Equity** | $3,447 | $2,892 |-| **Total Liabilities and Stockholders' Equity** | $5,845 | $4,871 |--#### Consolidated Statement of Cash Flows (in millions)--| | FY2025 | FY2024 |-|---|---|---|-| **Operating Activities** | | |-| Net Income | $802 | $660 |-| Depreciation and Amortization | $234 | $187 |-| Stock-based Compensation | $189 | $156 |-| Changes in Working Capital | $(67) | $(48) |-| **Net Cash from Operations** | $1,158 | $955 |-| | | |-| **Investing Activities** | | |-| Capital Expenditures | $(198) | $(165) |-| Acquisitions, net of cash | $(324) | $(187) |-| Purchases of Investments | $(189) | $(156) |-| Maturities of Investments | $116 | $98 |-| **Net Cash Used in Investing** | $(595) | $(410) |-| | | |-| **Financing Activities** | | |-| Proceeds from Debt Issuance | $200 | $150 |-| Repayment of Debt | $(78) | $(45) |-| Share Repurchases | $(412) | $(298) |-| Dividends Paid | $(115) | $(95) |-| **Net Cash Used in Financing** | $(405) | $(288) |-| | | |-| **Net Increase in Cash** | $158 | $257 |--#### Key Financial Ratios--| Metric | FY2025 | FY2024 |-|---|---|---|-| Gross Margin | 71.3% | 72.1% |-| Operating Margin | 29.0% | 29.3% |-| Net Margin | 22.3% | 22.4% |-| Return on Equity | 25.3% | 25.0% |-| Current Ratio | 2.30 | 2.40 |-| Debt-to-Equity | 0.28 | 0.27 |-| Revenue Growth (YoY) | 22.5% | 23.7% |-| Free Cash Flow | $960 | $790 |-------### Item 7. Management's Discussion and Analysis of Financial Condition and Results of Operations--#### Overview--Fiscal year 2025 was a year of strong execution and strategic expansion for NexTera Dynamics. We achieved total revenues of $3.602 billion, representing year-over-year growth of 22.5%, driven by robust demand across all three business segments. Our subscription-based revenue model continued to provide revenue visibility, with annual recurring revenue (ARR) reaching $3.24 billion at year-end, up 24% from $2.61 billion at the end of FY2024.--#### Revenue Analysis--Total revenue growth of 22.5% was primarily driven by:--- **New customer acquisition**: We added 487 net new enterprise customers in FY2025, compared to 412 in FY2024, driven by strong demand for our AI-powered automation solutions. Our land-and-expand strategy continued to yield results, with average initial contract values increasing 18% year-over-year.--- **Expansion of existing accounts**: Net revenue retention rate was 118% in FY2025 (compared to 121% in FY2024), reflecting successful upselling of additional modules and increased usage-based consumption. The slight decrease in retention rate was attributable to a small number of customers in the automotive sector that reduced their contracts due to production slowdowns in European markets.--- **CloudWorks contribution**: The CloudWorks Analytics acquisition, completed in October 2025, contributed $42 million in revenue during the fourth quarter. On an organic basis, excluding the CloudWorks contribution, revenue growth was 21.1%.--Revenue by segment showed differentiated performance. The IAS segment grew 19% year-over-year, reflecting steady demand in core manufacturing verticals but facing some headwinds from the automotive sector slowdown in Europe. The SCI segment grew 22% as retailers and pharmaceutical companies accelerated digital supply chain investments. The E&S segment was the fastest-growing at 41%, benefiting from regulatory tailwinds including the EU Carbon Border Adjustment Mechanism and expanding corporate sustainability mandates.--#### Cost Structure and Margins--Gross margin decreased 80 basis points to 71.3% from 72.1% in FY2024. This compression was driven by three factors: (1) increased cloud infrastructure costs associated with expanded GPU capacity for AI model training, representing approximately 40 basis points of the decline; (2) a higher mix of professional services revenue, which carries lower margins than subscription revenue; and (3) the initial margin dilution from the CloudWorks acquisition, which is expected to normalize by Q3 2026 as integration synergies are realized.--Operating expenses as a percentage of revenue improved to 42.3% from 42.8% in FY2024, reflecting ongoing operating leverage in our business model. R&D spending increased 22.5% year-over-year to $648 million (18.0% of revenue), as we invested in next-generation AI capabilities including the NexCore 5.0 platform and expanded our generative AI features. Sales and marketing expense grew 19.5% to $576 million (16.0% of revenue), reflecting efficiency gains from our increasingly digital go-to-market approach. G&A expense increased 16.6% to $288 million (8.0% of revenue).--Operating income reached $1.044 billion, up 21.1% year-over-year, representing an operating margin of 29.0%. Excluding the $12 million restructuring charge related to the CloudWorks integration, adjusted operating margin was 29.3%.--#### Liquidity and Capital Resources--We ended FY2025 with $1.247 billion in cash and cash equivalents and $385 million in short-term investments, providing total liquidity of $1.632 billion. Operating cash flow of $1.158 billion represented a 21.3% year-over-year increase and a free cash flow conversion ratio of 119.6% relative to net income. Capital expenditures of $198 million were primarily directed toward data center expansion ($98 million), office facilities ($52 million), and laboratory equipment ($48 million).--Our debt position remains conservative. Total debt outstanding at December 31, 2025 was $967 million, consisting of $400 million in 4.250% Senior Notes due 2030, a $375 million Term Loan B (SOFR + 200 bps, maturing 2028), and a $192 million draw on our $500 million revolving credit facility. The debt-to-equity ratio of 0.28 remains well within our target range of 0.20-0.40.--We returned $527 million to shareholders in FY2025 through share repurchases of $412 million (approximately 3.2 million shares at an average price of $128.75) and dividends of $115 million ($0.48 per share, an increase of 20% from FY2024). We have $688 million remaining under our current $1.5 billion share repurchase authorization approved in March 2024.-------### Item 8. Financial Statements and Supplementary Data--#### Segment Performance Detail--**Industrial Automation Solutions (IAS)**--| | FY2025 | FY2024 | Change |-|---|---|---|---|-| Revenue | $1,870M | $1,571M | +19.0% |-| Operating Income | $598M | $502M | +19.1% |-| Operating Margin | 32.0% | 32.0% | — |-| Customers | 847 | 762 | +11.2% |-| Net Retention Rate | 115% | 119% | -4 pts |--The IAS segment maintained solid performance despite challenging conditions in European automotive markets. Revenue growth of 19% was driven by strong demand in semiconductor and aerospace verticals, partially offset by a 6% decline in European automotive revenues. The segment's operating margin remained stable at 32.0%.--Key developments included the launch of NexCore Predict 4.0 with enhanced anomaly detection capabilities, a strategic partnership with TSMC for semiconductor fab automation, and expansion into the Japanese market through a distribution agreement with Mitsubishi Electric.--**Supply Chain Intelligence (SCI)**--| | FY2025 | FY2024 | Change |-|---|---|---|---|-| Revenue | $1,120M | $918M | +22.0% |-| Operating Income | $314M | $257M | +22.2% |-| Operating Margin | 28.0% | 28.0% | — |-| Customers | 1,400 | 1,182 | +18.4% |-| Net Retention Rate | 120% | 122% | -2 pts |--The SCI segment delivered strong growth driven by accelerating adoption of AI-powered supply chain solutions. Revenue growth of 22% reflected particularly strong demand from pharmaceutical and food & beverage customers implementing end-to-end supply chain visibility solutions. The segment added 218 net new customers in FY2025.--**Energy & Sustainability (E&S)**--| | FY2025 | FY2024 | Change |-|---|---|---|---|-| Revenue | $612M | $434M | +41.0% |-| Operating Income | $132M | $86M | +53.5% |-| Operating Margin | 21.6% | 19.8% | +1.8 pts |-| Customers | 953 | 714 | +33.5% |-| Net Retention Rate | 125% | 128% | -3 pts |--E&S remained our fastest-growing segment, with revenue increasing 41% year-over-year. Growth was fueled by regulatory requirements for carbon reporting in the EU and growing corporate sustainability commitments. The segment's operating margin expanded 180 basis points to 21.6% as the business achieved greater scale. Key wins included a $28 million multi-year contract with TotalEnergies and a strategic deployment with ArcelorMittal covering 12 steel manufacturing facilities.-------### Item 9. Changes in and Disagreements with Accountants on Accounting and Financial Disclosure--None.-------## PART III--### Item 10. Directors, Executive Officers and Corporate Governance--#### Executive Officers--| Name | Position | Age | Since |-|---|---|---|---|-| Dr. Sarah Chen | Chief Executive Officer | 48 | 2016 |-| James McAllister | Chief Financial Officer | 52 | 2019 |-| Marcus Rivera | Chief Technology Officer | 45 | 2016 |-| Dr. Yuki Tanaka | Chief AI Scientist | 41 | 2018 |-| Lisa Patel | Chief Revenue Officer | 46 | 2020 |-| Robert Kim | General Counsel & Secretary | 50 | 2017 |-------## PART IV--### Item 15. Exhibits and Financial Statement Schedules--The following documents are filed as part of this Annual Report on Form 10-K:--1. Financial Statements — See Item 8-2. Financial Statement Schedules — All schedules are omitted as not applicable-3. Exhibits — See Exhibit Index-------**SIGNATURES**--Pursuant to the requirements of Section 13 or 15(d) of the Securities Exchange Act of 1934, the registrant has duly caused this report to be signed on its behalf by the undersigned, thereunto duly authorized.--**NEXTERA DYNAMICS, INC.**--By: /s/ Dr. Sarah Chen-Dr. Sarah Chen-Chief Executive Officer-Date: February 28, 2026--By: /s/ James McAllister-James McAllister-Chief Financial Officer-Date: February 28, 2026diff --git a/tests/fixtures/test_samples/en/finance/sec_8k_filing_sample.md b/tests/fixtures/test_samples/en/finance/sec_8k_filing_sample.mddeleted file mode 100644index 6e63df6..0000000--- a/tests/fixtures/test_samples/en/finance/sec_8k_filing_sample.md+++ /dev/null@@ -1,172 +0,0 @@-# UNITED STATES SECURITIES AND EXCHANGE COMMISSION-## Washington, D.C. 20549--# FORM 8-K--## CURRENT REPORT--**Pursuant to Section 13 or 15(d) of the Securities Exchange Act of 1934**--Date of Report (Date of earliest event reported): **November 15, 2025**-------# MERIDIAN BIOTECH HOLDINGS, INC.-**(Exact Name of Registrant as Specified in Its Charter)**--| | |-|---|---|-| **State of Incorporation** | Delaware |-| **Commission File Number** | 001-41573 |-| **IRS Employer ID** | 82-4917263 |-| **Principal Office** | 8500 Research Boulevard, Suite 400, Cambridge, MA 02142 |-| **Telephone** | (617) 555-0347 |-| **Ticker Symbol** | MRDB |-| **Exchange** | NYSE |--Check the appropriate box below if the Form 8-K filing is intended to simultaneously satisfy the filing obligation of the registrant under any of the following provisions:--- [ ] Written communications pursuant to Rule 425 under the Securities Act-- [ ] Soliciting material pursuant to Rule 14a-12 under the Exchange Act-- [ ] Pre-commencement communications pursuant to Rule 14d-2(b)-- [ ] Pre-commencement communications pursuant to Rule 13e-4(c)-------## Item 1.01 — Entry into a Material Definitive Agreement--On November 15, 2025, Meridian BioTech Holdings, Inc. ("Meridian" or the "Company") entered into a definitive merger agreement (the "Merger Agreement") with Catalys Therapeutics, Inc. ("Catalys"), a privately held clinical-stage biopharmaceutical company based in San Diego, California. Under the terms of the Merger Agreement, Meridian will acquire all outstanding shares of Catalys for a total consideration of approximately $2.8 billion, consisting of $1.9 billion in cash and approximately 12.4 million shares of Meridian common stock (valued at approximately $900 million based on Meridian's closing price on November 14, 2025).--The acquisition is expected to close in Q1 2026, subject to customary closing conditions, including the receipt of regulatory approvals from the U.S. Federal Trade Commission and the European Commission, as well as the expiration or termination of the applicable waiting period under the Hart-Scott-Rodino Antitrust Improvements Act of 1976.--Catalys's pipeline includes three clinical-stage oncology assets:-- **CTX-401**: A Phase III bispecific antibody targeting PD-L1/CTLA-4 for non-small cell lung cancer (NSCLC), with top-line data expected in Q2 2026-- **CTX-502**: A Phase II CAR-T therapy for relapsed/refractory diffuse large B-cell lymphoma (DLBCL), demonstrating a 67% complete response rate in interim analysis-- **CTX-603**: A Phase I/II antibody-drug conjugate (ADC) targeting HER3 for solid tumors--The Merger Agreement contains customary representations, warranties, and covenants. Catalys has agreed to a no-shop provision, subject to a fiduciary out that permits Catalys to engage with unsolicited superior proposals. The Company has agreed to pay a reverse termination fee of $140 million if the transaction fails to close due to the failure to obtain required regulatory approvals.--The cash portion of the consideration will be funded through a combination of cash on hand ($800 million) and committed debt financing from JPMorgan Chase and Goldman Sachs ($1.1 billion in a new term loan facility).-------## Item 2.01 — Completion of Acquisition or Disposition of Assets--Not applicable to this filing.-------## Item 2.02 — Results of Operations and Financial Condition--On November 15, 2025, the Company issued a press release providing a preliminary financial update for the fourth quarter of 2025. Key preliminary results include:--- Q4 2025 revenue is expected to be in the range of $1.42 billion to $1.45 billion, compared to $1.28 billion in Q4 2024 (an increase of approximately 11-13%)-- Adjusted EBITDA is expected to be in the range of $485 million to $500 million, compared to $432 million in Q4 2024-- The Company is reaffirming its full-year 2025 revenue guidance of $5.45 billion to $5.50 billion-- Free cash flow for Q4 2025 is expected to be approximately $380 million--The preliminary financial results are based on management's current estimates and are subject to the completion of the Company's financial closing procedures and review by independent auditors.-------## Item 2.05 — Costs Associated with Exit or Disposal Activities--In connection with the planned acquisition of Catalys Therapeutics, the Company announced on November 15, 2025 a restructuring initiative to streamline its research operations and eliminate redundancies. The restructuring plan includes:--1. **Workforce reduction**: Elimination of approximately 340 positions (approximately 4% of the Company's global workforce of 8,500 employees), primarily in research and administrative functions in the Cambridge, MA and Basel, Switzerland locations-2. **Facility consolidation**: Closure of the Company's secondary research facility in Research Triangle Park, North Carolina, with operations being transferred to the expanded Cambridge campus-3. **Program discontinuation**: Termination of two early-stage preclinical programs (MRD-107 and MRD-215) that no longer align with the Company's strategic focus on oncology and immunology--The Company estimates total restructuring charges of approximately $85 million, consisting of:-- Employee severance and benefits: $52 million-- Facility exit and lease termination costs: $23 million-- Asset write-downs: $10 million--The restructuring charges are expected to be substantially incurred by Q2 2026. The Company expects the restructuring initiative to generate annual cost savings of approximately $65 million beginning in the second half of 2026.-------## Item 5.02 — Departure of Directors or Certain Officers; Election of Directors; Appointment of Certain Officers; Compensatory Arrangements of Certain Officers--### (b) Resignation of Officer--On November 18, 2025, Dr. Michael Foster, Executive Vice President and Chief Scientific Officer, notified the Board of Directors of his intention to resign from his position effective December 31, 2025, to pursue an opportunity in academic research. Dr. Foster has served as Chief Scientific Officer since 2019 and has been instrumental in advancing the Company's oncology pipeline.--### (c) Appointment of Officer--On November 20, 2025, the Board of Directors appointed Dr. Elena Vasquez as Executive Vice President and Chief Scientific Officer, effective January 1, 2026. Dr. Vasquez, age 47, has served as Senior Vice President of Oncology Research since 2022 and previously held senior research positions at Genentech and Novartis. Dr. Vasquez holds an M.D. from Johns Hopkins University School of Medicine and a Ph.D. in Molecular Biology from MIT.--In connection with her appointment, Dr. Vasquez will receive:-- Annual base salary of $725,000-- Target annual cash bonus of 80% of base salary-- One-time equity grant of 50,000 restricted stock units vesting over four years-- Participation in the Company's Executive Change in Control Severance Plan--### (d) Compensatory Arrangements--In connection with the Catalys acquisition, the Board of Directors approved retention agreements for 12 key executives, providing for additional cash retention bonuses totaling $18 million, payable upon the one-year anniversary of the acquisition closing, contingent upon continued employment.-------## Item 7.01 — Regulation FD Disclosure--On November 15, 2025, the Company held an investor conference call to discuss the Catalys acquisition and restructuring initiative. During the call, CEO Thomas Wright provided the following commentary:--"This acquisition represents a transformational step in our evolution as a leading oncology-focused biopharmaceutical company. Catalys's pipeline, particularly CTX-401 and CTX-502, fills critical gaps in our late-stage oncology portfolio and positions us for significant revenue growth in the 2027-2030 timeframe. We expect the combined entity to achieve peak annual revenues from these assets of $3.5 billion to $4.0 billion."--CFO Patricia Nakamura added: "The financial structure of this transaction preserves our balance sheet strength. Pro forma net leverage will be approximately 2.8x EBITDA at closing, declining to below 2.0x within 18 months through strong free cash flow generation. We remain committed to our investment-grade credit rating and our dividend program."--The Company also disclosed updated guidance for FY2026, reflecting the expected impact of the Catalys acquisition:-- Revenue: $6.2 billion to $6.5 billion (including approximately $200 million from Catalys)-- Adjusted EPS: $8.50 to $9.00 (reflecting $0.30-$0.40 dilution from acquisition-related costs in the first year)-- Capital expenditures: $450 million to $500 million (including integration-related investments)-------## Item 8.01 — Other Events--### Credit Rating Actions--Following the announcement of the Catalys acquisition, the Company received the following credit rating actions:-- **S&P Global Ratings**: Affirmed BBB+ rating with Stable outlook; noted the transaction's strategic rationale and manageable leverage increase-- **Moody's Investors Service**: Placed Baa1 rating on review for downgrade, citing the increase in debt leverage and execution risk associated with integrating Catalys's clinical operations-- **Fitch Ratings**: Affirmed BBB+ rating with Negative outlook, reflecting concerns about the acquisition financing and clinical-stage pipeline risk--### Share Repurchase Program Suspension--The Company announced the temporary suspension of its $2.0 billion share repurchase program, effective immediately, to preserve financial flexibility in connection with the Catalys acquisition financing. The Company had repurchased approximately $650 million in shares under the program prior to the suspension. The Board of Directors intends to evaluate reinstatement of the program following the completion of the acquisition and initial deleveraging.--### Litigation Update--On November 12, 2025, the U.S. District Court for the District of Massachusetts issued a favorable ruling in the Company's patent litigation against PharmaCure Inc. (Case No. 1:23-cv-04892), upholding the validity of Meridian's U.S. Patent No. 11,234,567 covering its proprietary antibody engineering platform. PharmaCure has indicated it intends to appeal the ruling to the Federal Circuit.-------## Item 9.01 — Financial Statements and Exhibits--### (d) Exhibits--| Exhibit No. | Description |-|---|---|-| 2.1 | Agreement and Plan of Merger, dated November 15, 2025, by and among Meridian BioTech Holdings, Inc., Marathon Merger Sub, Inc., and Catalys Therapeutics, Inc.* |-| 10.1 | Commitment Letter, dated November 14, 2025, from JPMorgan Chase Bank, N.A. and Goldman Sachs Bank USA |-| 10.2 | Employment Agreement with Dr. Elena Vasquez, dated November 20, 2025 |-| 99.1 | Press Release issued November 15, 2025 |-| 99.2 | Investor Presentation dated November 15, 2025 |-| 104 | Cover Page Interactive Data File (embedded in Inline XBRL) |--*Schedules and exhibits have been omitted pursuant to Item 601(a)(5) of Regulation S-K.-------## SIGNATURES--Pursuant to the requirements of the Securities Exchange Act of 1934, the registrant has duly caused this report to be signed on its behalf by the undersigned hereunto duly authorized.--**MERIDIAN BIOTECH HOLDINGS, INC.**--By: /s/ Patricia Nakamura-Patricia Nakamura-Chief Financial Officer--Date: November 22, 2025diff --git a/tests/fixtures/test_samples/en/finance/supply_chain_analysis_sample.md b/tests/fixtures/test_samples/en/finance/supply_chain_analysis_sample.mddeleted file mode 100644index 2ef8c57..0000000--- a/tests/fixtures/test_samples/en/finance/supply_chain_analysis_sample.md+++ /dev/null@@ -1,215 +0,0 @@-# Global Semiconductor Supply Chain Risk Assessment Report--**Prepared by**: Strategic Risk Advisory Group, Deloitte Consulting-**Client**: NexTera Dynamics, Inc.-**Date**: November 2025-**Classification**: Confidential — Client Use Only-------## Executive Summary--This report assesses the supply chain risk landscape for NexTera Dynamics' hardware components, with a focus on semiconductor and electronic component sourcing. The analysis covers 47 Tier-1 suppliers, 128 Tier-2 suppliers, and critical raw material sources across 14 countries. Our assessment identifies 8 high-risk supply chain nodes and provides mitigation recommendations for each.-------## 1. Supply Chain Structure Overview--### 1.1 Tier-1 Supplier Landscape--NexTera Dynamics sources critical components from the following primary suppliers:--#### Semiconductor Components--| Supplier | Location | Component | Annual Spend | Supply Share | Risk Rating |-|---|---|---|---|---|---|-| **Taiwan Semiconductor (TSMC)** | Hsinchu, Taiwan | Custom AI accelerator chips (5nm) | $128M | 62% | High |-| **Samsung Foundry** | Hwaseong, South Korea | Edge computing SoCs (7nm) | $47M | 23% | Medium |-| **GlobalFoundries** | Malta, NY, USA | Analog/mixed-signal ICs (22nm) | $31M | 15% | Low |-| **Intel Foundry Services** | Chandler, AZ, USA | FPGA components | $18M | (supplemental) | Low |--#### Memory and Storage--| Supplier | Location | Component | Annual Spend | Supply Share | Risk Rating |-|---|---|---|---|---|---|-| **SK Hynix** | Icheon, South Korea | HBM3E memory modules | $52M | 55% | Medium |-| **Micron Technology** | Boise, ID, USA | DDR5 DRAM | $28M | 30% | Low |-| **Samsung Electronics** | Pyeongtaek, South Korea | Enterprise NVMe SSDs | $14M | 15% | Medium |--#### Passive Components and PCBs--| Supplier | Location | Component | Annual Spend | Risk Rating |-|---|---|---|---|---|-| **Murata Manufacturing** | Nagaokakyo, Japan | MLCCs, inductors | $22M | Medium |-| **Unimicron Technology** | Taoyuan, Taiwan | High-density PCBs | $18M | High |-| **TTM Technologies** | Santa Ana, CA, USA | Specialty PCBs | $9M | Low |--#### Sensor and IoT Components--| Supplier | Location | Component | Annual Spend | Risk Rating |-|---|---|---|---|---|-| **STMicroelectronics** | Geneva, Switzerland | MEMS sensors, MCUs | $15M | Low |-| **Texas Instruments** | Dallas, TX, USA | Power management ICs | $12M | Low |-| **Bosch Sensortec** | Reutlingen, Germany | Environmental sensors | $8M | Low |-------### 1.2 Tier-2 Supplier Dependencies--Critical Tier-2 dependencies exist in the following areas:--**Semiconductor Substrate Materials**-- **Shin-Etsu Chemical** (Tokyo, Japan) → supplies silicon wafers to TSMC and Samsung. Shin-Etsu and Sumco collectively control 55% of global 300mm silicon wafer production. Any disruption at either company would propagate across the entire semiconductor supply chain within 4-6 weeks.--**Specialty Chemicals**-- **JSR Corporation** (Tokyo, Japan) → supplies photoresist chemicals to TSMC, Samsung, and Intel. JSR is one of only four companies globally capable of producing EUV photoresist, making it an irreplaceable node in the advanced semiconductor manufacturing chain.-- **Entegris** (Billerica, MA, USA) → supplies ultra-pure chemicals and filtration systems to foundries. Entegris's contamination control products are used in 80% of advanced node fabs.--**Advanced Packaging**-- **ASE Technology** (Kaohsiung, Taiwan) → provides CoWoS (Chip-on-Wafer-on-Substrate) advanced packaging for AI accelerator chips. ASE is TSMC's primary advanced packaging partner and a critical bottleneck in AI chip production. Current lead times: 16-20 weeks, up from 8-10 weeks in 2024.--**Rare Earth and Critical Minerals**-- **Northern Rare Earth Group** (Baotou, Inner Mongolia, China) → supplies neodymium and praseodymium used in sensor magnets. China controls approximately 60% of global rare earth mining and 90% of processing capacity, creating significant supply concentration risk.-- **Albemarle Corporation** (Charlotte, NC, USA) → supplies lithium compounds for battery components in edge computing devices. Secondary source: SQM (Santiago, Chile).-------## 2. Risk Assessment by Category--### 2.1 Geopolitical Risk — CRITICAL--**Taiwan Strait Scenario**-The highest-impact, moderate-probability risk in NexTera's supply chain is a disruption to Taiwan-based manufacturing. NexTera's dependency on Taiwan-sourced components is substantial:-- TSMC: 62% of custom AI chip supply ($128M annually)-- Unimicron: Primary high-density PCB supplier ($18M annually)-- ASE Technology (Tier-2): Critical advanced packaging provider--**Assessment**: A military conflict, blockade, or severe economic sanctions involving Taiwan could halt 65-70% of NexTera's hardware production within 6-8 weeks as existing buffer inventory is depleted. Current strategic inventory covers approximately 8 weeks of production for TSMC-sourced chips and 5 weeks for Unimicron PCBs.--**Mitigation**: We recommend NexTera pursue a phased diversification strategy:-1. Qualify Samsung Foundry as a secondary source for AI accelerator chips (estimated 18-month qualification timeline, $15M one-time cost)-2. Engage TTM Technologies to develop domestic PCB capability (estimated $8M investment)-3. Increase strategic inventory targets for Taiwan-sourced components from 8 weeks to 14 weeks ($45M working capital impact)--**China Export Controls**-China's expanding export restrictions on critical minerals and semiconductor materials (gallium, germanium, graphite, rare earths) create supply risks for Tier-2 and Tier-3 suppliers. In October 2025, China announced new licensing requirements for exports of antimony, a critical material in semiconductor manufacturing.--**Assessment**: Direct exposure to Chinese export controls is limited, but indirect exposure through Tier-2 suppliers (particularly JSR and Shin-Etsu, which source certain precursor materials from China) is moderate. Estimated revenue impact in a severe scenario: $45M-$80M annually.--### 2.2 Concentration Risk — HIGH--**Single-Source Dependencies**-NexTera has 7 components with single-source suppliers, including:-1. Custom AI accelerator ASIC (TSMC — no qualified alternative)-2. HBM3E memory modules (SK Hynix — Samsung qualification pending)-3. EUV photoresist (JSR — via TSMC, no practical alternative)-4. CoWoS advanced packaging (ASE — via TSMC)-5. High-density 20+ layer PCBs (Unimicron — TTM qualification incomplete)-6. Specialty MEMS pressure sensors (STMicroelectronics)-7. Custom power management IC (Texas Instruments)--**Assessment**: Single-source risk is the most likely trigger for a supply disruption event. Based on historical data, the probability of a significant disruption (>4 weeks) at any single supplier in a given year is approximately 15-20%.--### 2.3 Natural Disaster Risk — MEDIUM--**Earthquake Exposure (Japan and Taiwan)**-Key suppliers TSMC, Unimicron, ASE (Taiwan), and Murata, Shin-Etsu, JSR (Japan) are located in seismically active regions.--- Taiwan: The September 2024 Hualien earthquake caused a 3-day production halt at TSMC's Fab 18, resulting in approximately $120M in industry-wide losses. NexTera experienced a 2-week delay in chip deliveries.-- Japan: The Noto Peninsula earthquake (January 2024) disrupted Murata's capacitor production for 4 weeks, contributing to MLCC shortages throughout H1 2024.--**Assessment**: Natural disaster risk is a recurring, moderate-probability event. Seismic events affecting multiple suppliers simultaneously (a "correlated disaster") could impact 40-50% of NexTera's supply base. Recommended action: expand buffer inventory for Japan/Taiwan-sourced components and pre-negotiate emergency supply agreements with alternative sources.--### 2.4 Lead Time and Capacity Risk — MEDIUM-HIGH--Current lead times for critical components:--| Component | Current Lead Time | Historical Average | Trend |-|---|---|---|---|-| Custom AI chips (TSMC 5nm) | 18-22 weeks | 12-14 weeks | Deteriorating |-| HBM3E memory (SK Hynix) | 14-16 weeks | 8-10 weeks | Deteriorating |-| CoWoS packaging (ASE) | 16-20 weeks | 8-10 weeks | Deteriorating |-| High-density PCBs (Unimicron) | 10-12 weeks | 6-8 weeks | Stable |-| MLCCs (Murata) | 6-8 weeks | 4-6 weeks | Improving |-| MEMS sensors (STMicro) | 8-10 weeks | 6-8 weeks | Stable |--The primary driver of extended lead times is the surge in AI infrastructure spending across hyperscalers and enterprise customers. TSMC's advanced node capacity utilization is at 95%+ and is not expected to ease until the Arizona Fab 21 comes online in H2 2026.-------## 3. Supply Chain Network Topology--### 3.1 Critical Path Analysis--The following supply chain paths represent the highest-risk corridors:--**Path 1: AI Accelerator Supply Chain** (Risk: CRITICAL)-```-Shin-Etsu Chemical (Japan) → Silicon Wafers- → TSMC Fab 18 (Taiwan) → AI Chip Fabrication (5nm)- → ASE Technology (Taiwan) → CoWoS Advanced Packaging- → NexTera Assembly (Austin, TX)-```-This path traverses two countries, involves four entities, and has zero qualified alternative paths for the complete chain. Total lead time: 22-28 weeks end-to-end. This is NexTera's most vulnerable supply chain.--**Path 2: Edge Computing Module** (Risk: HIGH)-```-Samsung Foundry (South Korea) → Edge SoC Fabrication-SK Hynix (South Korea) → HBM3E Memory-Unimicron (Taiwan) → HDI PCB- → Foxconn (Vietnam) → Module Assembly- → NexTera Integration (Austin, TX)-```-High concentration in South Korea (SoC + memory) creates correlated risk from Korean Peninsula geopolitical developments.--**Path 3: IoT Sensor Node** (Risk: LOW-MEDIUM)-```-STMicroelectronics (Switzerland/Singapore) → MEMS + MCU-Bosch Sensortec (Germany) → Environmental Sensors-Texas Instruments (USA) → Power Management-Murata (Japan) → Passive Components-TTM Technologies (USA) → PCB- → Flex Ltd. (Malaysia) → Assembly- → NexTera (Austin, TX)-```-This path has geographic diversity and multiple qualified alternatives for most components, making it relatively resilient.-------## 4. Financial Impact Modeling--### 4.1 Scenario Analysis--| Scenario | Probability | Duration | Revenue Impact | Margin Impact |-|---|---|---|---|---|-| Single supplier disruption (4-8 weeks) | 18% per year | 4-8 weeks | $35M-$70M | -1.5 to -3.0 pts |-| Taiwan supply chain disruption (moderate) | 5% per year | 3-6 months | $180M-$350M | -5.0 to -8.0 pts |-| Broad semiconductor shortage | 8% per year | 6-12 months | $120M-$250M | -3.0 to -6.0 pts |-| China rare earth export ban | 3% per year | 6-18 months | $45M-$80M | -1.0 to -2.5 pts |-| Correlated natural disaster (Asia-Pacific) | 2% per year | 2-4 months | $90M-$200M | -3.0 to -5.0 pts |--### 4.2 Recommended Investment in Risk Mitigation--| Initiative | Investment | Payback Period | Risk Reduction |-|---|---|---|---|-| Strategic inventory buildup | $65M (working capital) | Ongoing | 30-40% reduction in disruption impact |-| Secondary source qualification | $28M (over 24 months) | 18-24 months | 25-35% reduction in single-source risk |-| Domestic/nearshore sourcing | $45M (over 36 months) | 24-36 months | 15-25% reduction in geopolitical risk |-| Supply chain visibility platform | $8M | 12 months | 20% improvement in early warning |-| **Total** | **$146M** | | |-------## 5. Recommendations--1. **Immediate (0-6 months)**: Increase strategic buffer inventory for TSMC and SK Hynix components to 14 weeks of supply. Estimated cost: $45M in additional working capital.--2. **Short-term (6-18 months)**: Complete qualification of Samsung Foundry as secondary AI chip source. Begin engagement with TTM Technologies for domestic PCB capability.--3. **Medium-term (18-36 months)**: Invest in supply chain visibility platform with real-time Tier-2/Tier-3 monitoring. Establish regional warehousing in Vietnam and Eastern Europe for geographic risk diversification.--4. **Strategic (ongoing)**: Participate in CHIPS Act incentive programs to support domestic semiconductor manufacturing. Engage with industry consortiums on supply chain resilience standards.-------*This report is prepared for the exclusive use of NexTera Dynamics, Inc. and should not be distributed without prior written consent from Deloitte Consulting.*diff --git a/tests/fixtures/test_samples/en/general/arbitrary_tech_news.md b/tests/fixtures/test_samples/en/general/arbitrary_tech_news.mddeleted file mode 100644index 392c1db..0000000--- a/tests/fixtures/test_samples/en/general/arbitrary_tech_news.md+++ /dev/null@@ -1,96 +0,0 @@-# Galactic Interstellar Announces Successful Maiden Flight of Shenzhou-50, Mars Travel Prices Drop to 2 Million Yuan--**Date**: June 18, 2090-**Author**: Space Journalist, Star Wanderer-------## Key Announcement--Today, **Galactic Interstellar Travel Corporation**, the world's leading commercial space travel company, held a grand press conference at the **Wenchang Space Launch Center**, officially announcing the successful maiden flight of its new-generation manned spacecraft—**Shenzhou-50**!--**Li Xinghe**, Founder and CEO of Galactic Interstellar, excitedly stated at the conference: "The successful maiden flight of Shenzhou-50 marks a new era in human space travel. Our goal is to let everyone experience the charm of space!"-------## Shenzhou-50 Highlights--### 1. Revolutionary Propulsion System--Shenzhou-50 is equipped with Galactic Interstellar's independently developed **"Galactic Engine" nuclear-powered propulsion system**, a major breakthrough in the history of human spaceflight:-- Travel time from Earth to Mars reduced from 6 months to **30 days**-- Propulsion efficiency increased by 500%-- Maximum speed reaches 2% of the speed of light--### 2. Comfortable Space Capsule Experience--Shenzhou-50 can accommodate 20 passengers, providing a luxurious and comfortable space travel experience:-- Each cabin is equipped with a panoramic sunroof, offering magnificent views of the universe-- Zero-gravity fitness center and leisure entertainment area-- Artificial gravity chamber to reduce space discomfort-- Michelin 3-star space restaurant--### 3. Safety and Security System--For the special risks of space travel, Shenzhou-50 provides multiple layers of safety and security:-- Triple redundant life support system-- Micro black hole shield-- Emergency return capsule, capable of returning to Earth within 24 hours-- Compliant with ISO Space Safety Certification-------## Space Team--The R&D of Shenzhou-50 was led by **Wang Yuzhou**, CTO of Galactic Interstellar, with core team members including:-- **Zhang Xingchen**: Chief Designer, previously involved in the construction of the International Space Station-- **Liu Xingyun**: Propulsion System Lead, nuclear power expert-- **Zhao Yinhe**: Mission Planning Director, with 20 years of space mission experience-- **Sun Xingji**: Security System Architect--The entire R&D team consists of more than 5,000 people and took 10 years to complete the development of Shenzhou-50.-------## Strategic Partnerships--At the conference, Galactic Interstellar also announced strategic partnerships with several organizations:-- **International Astronautical Agency (IAA)**: Co-develop deep space exploration technology-- **Mars Base Construction Company**: Build the first commercial base on Mars-- **Space Hotel Group**: Co-operate orbital space station hotels-- **Interstellar Travel Alliance**: Establish global space travel standards-------## Development History--Galactic Interstellar was founded in 2050, headquartered in Shanghai:-- October 2050: Received angel round financing of ¥1 billion-- May 2055: Completed Series A financing of ¥5 billion-- August 2060: Successful maiden flight of Shenzhou-30, achieving suborbital travel-- March 2070: Series B financing of ¥20 billion, valuation reached ¥100 billion-- December 2080: Successful maiden flight of Shenzhou-40, achieving lunar commercial travel-- June 2090: Successful maiden flight of Shenzhou-50, ushering in the era of Mars travel-------## Pricing and Booking--Shenzhou-50 Mars travel will officially accept bookings from October 1, 2090:-- **Economy Class**: ¥2 million per person-- **Business Class**: ¥5 million per person-- **Luxury Class**: ¥20 million per person--Early booking users can enjoy a 50% discount!-------## Market Outlook--Industry analysts believe that the release of Shenzhou-50 will completely transform human travel. It is expected that by 2100, the global space travel market will exceed ¥10 trillion.--Galactic Interstellar stated that it will continue to invest in R&D, planning to launch **Shenzhou-60** in 2095 to achieve Saturn travel, and achieve commercial travel to any planet in the solar system by 2100.-------"The universe is so big, we all want to see it!" —— Li Xinghe, Founder of Galactic Interstellardiff --git a/tests/fixtures/test_samples/en/general/biography_scientist.md b/tests/fixtures/test_samples/en/general/biography_scientist.mddeleted file mode 100644index dbbfb82..0000000--- a/tests/fixtures/test_samples/en/general/biography_scientist.md+++ /dev/null@@ -1,165 +0,0 @@-# Zu Chongzhi: A Giant of Ancient Chinese Science--**Author**: Historical Biography, Chen Jingyi-**Publication Year**: 2026-------## Preface--Zu Chongzhi was an outstanding mathematician, astronomer, and inventor during the Northern and Southern Dynasties period in China. He made remarkable achievements in multiple fields including mathematics, astronomical calendars, and mechanical engineering, and stands as a monument in the history of ancient Chinese science.--This book aims to record the extraordinary life of Zu Chongzhi, showcasing his persistent pursuit of science and his great contributions to Chinese civilization.-------## Chapter 1: Early Years (429-450)--### 1.1 Birth and Family--In 429 (the 6th year of Yuanjia during the reign of Emperor Wen of Song), Zu Chongzhi was born into an official family in **Qiuxian County, Fanyang Commandery** (now Laishui County, Hebei Province).--His great-grandfather **Zu Taizhi** served as a Palace Attendant and Grand Master of Glorious Happiness during the Eastern Jin Dynasty; his grandfather **Zu Chang** served as the Director of Imperial Workshops (a position in charge of civil engineering) during the Liu Song Dynasty; his father **Zu Shuozhi** served as a Court Gentleman for Audience. In such a family environment, Zu Chongzhi received a good education from an early age and developed a strong interest in science and technology.--### 1.2 Diligent in Studies--From an early age, Zu Chongzhi was diligent in his studies and widely read, with a particular fondness for books on mathematics, astronomy, and mechanical engineering.--Historical records state that Zu Chongzhi "studied ancient texts from a young age and had an ingenious mind," meaning he studied ancient classics from childhood and possessed extraordinary wit and thinking ability.--### 1.3 Entering Officialdom--Around 450, Zu Chongzhi entered officialdom, serving as a Staff Officer in Southern Xuzhou (now Zhenjiang, Jiangsu), and later as a Military Advisor to the Duke. Although in official service, he never gave up his pursuit of scientific research.-------## Chapter 2: Mathematical Achievements (450-470)--### 2.1 Calculation of Pi--Zu Chongzhi's most outstanding contribution in mathematics was his precise calculation of **pi (π)**.--After long and arduous research, Zu Chongzhi concluded:-- **Excess value (upper limit)**: 3.1415927-- **Deficit value (lower limit)**: 3.1415926--In other words, the value of pi is **between 3.1415926 and 3.1415927**, accurate to the 7th decimal place. This achievement was **over a thousand years ahead of Western mathematicians**!--For calculation convenience, Zu Chongzhi also provided two fractional approximations:-- **Approximate ratio**: 22/7 (≈3.1429)-- **Precise ratio**: 355/113 (≈3.1415929)--Among these, the precise ratio 355/113 is the best approximation with both numerator and denominator within 1000, another achievement that led the world by over a thousand years.--### 2.2 Zhui Shu--Zu Chongzhi compiled his mathematical research results into a work titled **Zhui Shu** (Method of Interpolation).--Zhui Shu had profound content and was called a "mathematical classic," later becoming one of the textbooks in the Imperial Academy's School of Mathematics during the Tang Dynasty. Unfortunately, this precious mathematical work was lost during the Northern Song Dynasty.-------## Chapter 3: Astronomy and Calendars (450-464)--### 3.1 Discovering Calendar Problems--While studying astronomical calendars, Zu Chongzhi discovered that the then-popular **Yuanjia Calendar** had numerous errors.--The Yuanjia Calendar was formulated by the astronomer He Chengtian. Although more precise than previous calendars, it still had shortcomings. After years of observation and research, Zu Chongzhi pointed out multiple defects in the Yuanjia Calendar.--### 3.2 Creating the Daming Calendar--In 462 (the 6th year of Daming during the reign of Emperor Xiaowu of Song), Zu Chongzhi compiled a new calendar—the **Daming Calendar**.--The main innovations of the Daming Calendar included:-1. **Introduction of precession**: A major breakthrough in the history of Chinese calendars, distinguishing between the tropical year and sidereal year-2. **Improved intercalation cycle**: Changed the old calendar's 7 intercalary months in 19 years to 144 intercalary months in 391 years, more precise-3. **Determination of nodical month**: Accurately calculated the number of days in a nodical month as 27.21223 days, extremely close to the modern measured value of 27.21222 days-4. **Precise determination of planetary cycles**: Accurately measured the orbital periods of the five major planets: Venus, Jupiter, Mercury, Mars, and Saturn--### 3.3 Calendar Debate--After the Daming Calendar was compiled, Zu Chongzhi submitted a memorial to Emperor Xiaowu of Song, requesting its promulgation and implementation. However, this proposal was opposed by the powerful official **Dai Faxing**.--Dai Faxing believed that Zu Chongzhi was "defying heaven and betraying the classics," and that changing ancient methods was a great treason. Undaunted, Zu Chongzhi wrote the famous **"Refutation"**, arguing forcefully and refuting Dai Faxing's erroneous viewpoints point by point.--This debate is a famous event in the history of ancient Chinese science, demonstrating Zu Chongzhi's scientific spirit of adhering to truth and defying powerful officials.--Unfortunately, due to Dai Faxing's obstruction, the Daming Calendar was not promulgated and implemented during Zu Chongzhi's lifetime. It was not until 510 (the 9th year of Tianjian during the reign of Emperor Wu of Liang) that, through the efforts of his son **Zu Geng**, the Daming Calendar was officially adopted, 10 years after Zu Chongzhi's death.-------## Chapter 4: Mechanical Inventions (470-500)--### 4.1 South-Pointing Chariot--Zu Chongzhi was not only an outstanding mathematician and astronomer, but also an excellent mechanical inventor.--He successfully created the **South-Pointing Chariot**. The South-Pointing Chariot was a vehicle that could indicate direction, said to have existed since the time of the Yellow Emperor, but its manufacturing method had long been lost. Based on ancient records, after repeated research and experimentation, Zu Chongzhi finally successfully restored the South-Pointing Chariot.--### 4.2 Thousand-Li Boat--Zu Chongzhi also invented a type of boat called the "**Thousand-Li Boat**."--According to the "Book of Southern Qi · Biography of Zu Chongzhi": "Testing it on the Xinting River, it traveled over a hundred li in a day." In other words, when the Thousand-Li Boat was tested on the Xinting River (now near Nanjing, Jiangsu), it could travel over a hundred li in one day, a remarkable achievement for that time.--### 4.3 Water-Powered Trip Hammer and Mill--Zu Chongzhi also created a **water-powered trip hammer and mill**, a grain-processing tool driven by water power.--The water-powered trip hammer and mill combined a water-powered trip hammer and a water mill, capable of hulling rice and grinding wheat simultaneously, greatly improving production efficiency. This invention played an important role in the development of agricultural production.--### 4.4 Timekeeping Devices--In addition, Zu Chongzhi also created a **qi vessel** (a type of timekeeping device) and other ingenious mechanical devices, demonstrating his exceptional talent in mechanical engineering.-------## Chapter 5: Historical Influence and Evaluation--### 5.1 International Recognition--Zu Chongzhi's scientific achievements have been widely recognized by the international scientific community.--To commemorate Zu Chongzhi's outstanding contributions:-- In 1964, an asteroid discovered by the Purple Mountain Observatory was named **"Zuchongzhi"**-- A crater on the Moon was named **"Zu Chongzhi Crater"**--### 5.2 Historical Evaluation--The "Book of Southern Qi · Biography of Zu Chongzhi" evaluates him: "Zu Chongzhi understood music, chess, and various games; he was unparalleled in his time, and no one could match him."--This means Zu Chongzhi was proficient in music, chess, and various arts; he was unparalleled in his time, and no one could match him.--**Joseph Needham** (a famous British historian of science) highly praised Zu Chongzhi in "Science and Civilization in China," calling him "one of the greatest mathematicians of ancient China."--### 5.3 Scientific Spirit--In Zu Chongzhi, we see the excellent qualities of ancient Chinese scientists:-- **Seeking truth from facts**: Insisting on starting from actual observations-- **Daring to innovate**: Daring to break through old theories and propose new ideas-- **Rigorous and meticulous**: Striving for perfection in scientific research-- **Defying powerful officials**: Daring to adhere to truth and argue forcefully-------## Conclusion--Zu Chongzhi was a versatile talent in the history of ancient Chinese science, making outstanding achievements in multiple fields including mathematics, astronomy, and mechanics.--His calculation of pi led the world by over a thousand years, his Daming Calendar was a milestone in the history of Chinese calendars, and his mechanical inventions demonstrated the wisdom of the ancient Chinese people.--Zu Chongzhi's scientific spirit and achievements are not only the pride of the Chinese nation, but also a precious heritage in the treasure house of world scientific culture. His name will forever be inscribed in the long river of human scientific development.-------## Appendix: Chronology of Zu Chongzhi--- **429**: Born in Qiuxian County, Fanyang Commandery (now Laishui, Hebei)-- **Around 450**: Served as Staff Officer in Southern Xuzhou, Military Advisor to the Duke-- **462**: Compiled the Daming Calendar, submitted memorial to the court-- **462-464**: Debated calendars with Dai Faxing-- **470s**: Created South-Pointing Chariot, Thousand-Li Boat, Water-Powered Trip Hammer and Mill-- **494-498**: Served as Colonel of Changshui-- **500**: Passed away, aged 72-- **510**: Daming Calendar officially adopteddiff --git a/tests/fixtures/test_samples/en/general/encyclopedia_machine_learning.md b/tests/fixtures/test_samples/en/general/encyclopedia_machine_learning.mddeleted file mode 100644index 4c8e201..0000000--- a/tests/fixtures/test_samples/en/general/encyclopedia_machine_learning.md+++ /dev/null@@ -1,268 +0,0 @@-# Machine Learning--**Category**: Artificial Intelligence-**Created**: February 22, 2026-**Last Updated**: February 22, 2026-------## Overview--**Machine Learning (ML)** is an important branch of **Artificial Intelligence (AI)**, dedicated to studying how computer systems can automatically improve through experience.--The core idea of machine learning is: instead of relying on explicit hard-coded rules, learn patterns and regularities from data through algorithms.-------## Definition--Machine learning is a multidisciplinary field involving **probability theory**, **statistics**, **approximation theory**, **convex analysis**, **computational complexity theory**, and many other disciplines.--It is the core of artificial intelligence and the fundamental way to make computers intelligent. Machine learning algorithms automatically discover patterns by analyzing large amounts of data, and use these patterns to make predictions or decisions on unknown data.-------## Classification System--### 1. Supervised Learning--Supervised learning uses **labeled training data** for learning. The algorithm learns mapping relationships from input features and corresponding output labels.--**Common Algorithms**:-- Linear Regression-- Logistic Regression-- Decision Tree-- Random Forest-- Support Vector Machine (SVM)-- Neural Networks--**Application Scenarios**:-- House price prediction-- Spam classification-- Image recognition-- Medical diagnosis--### 2. Unsupervised Learning--Unsupervised learning uses **unlabeled data**, and the algorithm needs to discover structures and patterns in the data on its own.--**Common Algorithms**:-- Clustering: K-Means, Hierarchical Clustering, DBSCAN-- Dimensionality Reduction: PCA, t-SNE, Autoencoders-- Association Rule Mining: Apriori, FP-Growth--**Application Scenarios**:-- Customer segmentation-- Anomaly detection-- Recommendation systems-- Topic modeling--### 3. Reinforcement Learning (RL)--Reinforcement learning learns through **interaction between an agent and the environment**. The agent obtains rewards (Reward) through trial and error, with the goal of maximizing long-term cumulative rewards.--**Core Concepts**:-- State-- Action-- Policy-- Reward-- Value Function--**Common Algorithms**:-- Q-Learning-- Policy Gradient-- Actor-Critic-- DQN (Deep Q-Network)-- PPO (Proximal Policy Optimization)--**Application Scenarios**:-- Game AI (e.g., AlphaGo)-- Robot control-- Autonomous driving-- Resource scheduling--### 4. Semi-Supervised Learning--Combines a small amount of labeled data with a large amount of unlabeled data for learning.--### 5. Self-Supervised Learning--Constructs supervision signals from the data itself, without manual annotation.-------## Key Concepts--### 1. Feature--Features are measurable attributes or variables that describe data. In machine learning, features are the representation of the raw data input to the model.--**Examples**:-- In house price prediction, features may include: area, number of rooms, location, construction year-- In image recognition, features may be pixel values or extracted visual features--### 2. Model--A model is a mathematical representation or function learned by a machine learning algorithm, used to predict outputs from input features.--**Common Model Types**:-- Linear models-- Tree models-- Neural network models-- Probabilistic graphical models--### 3. Training--Training is the process of adjusting model parameters using training data, so that the model can learn patterns in the data.--### 4. Inference/Prediction--Inference is the process of using a trained model to make predictions on new data.--### 5. Overfitting--Overfitting refers to the phenomenon where a model performs well on training data but has poor generalization ability on new data.--### 6. Underfitting--Underfitting refers to the phenomenon where a model fails to fully learn data patterns, performing poorly on both training and test sets.-------## Related Fields--### 1. Deep Learning--Deep learning is a subfield of machine learning that uses multi-layer **neural networks** to learn representations of data.--**Common Network Architectures**:-- Convolutional Neural Networks (CNN): Suitable for images-- Recurrent Neural Networks (RNN)/Transformer: Suitable for sequential data (text, speech)-- Generative Adversarial Networks (GAN): Used to generate new data--### 2. Data Mining--Data mining is the process of extracting useful information and knowledge from large amounts of data, with many overlapping techniques with machine learning.--### 3. Natural Language Processing (NLP)--NLP focuses on enabling computers to understand, interpret, and generate human language.--**Applications**:-- Machine translation-- Sentiment analysis-- Question answering systems-- Text summarization--### 4. Computer Vision--Computer vision aims to enable computers to obtain meaningful information from images or videos.--**Applications**:-- Image recognition-- Object detection-- Image segmentation-- Face recognition--### 5. Statistics--Statistics provides the theoretical foundation and methodological support for machine learning.-------## Application Scenarios--1. **Healthcare**: Disease diagnosis, drug discovery, genomic analysis-2. **Finance**: Credit scoring, fraud detection, algorithmic trading-3. **Retail**: Recommendation systems, demand forecasting, customer segmentation-4. **Transportation**: Autonomous driving, traffic prediction, route optimization-5. **Manufacturing**: Quality control, predictive maintenance, supply chain optimization-6. **Education**: Personalized learning, intelligent tutoring, learning analytics-7. **Entertainment**: Content recommendation, game AI, special effects generation-------## Historical Development--### 1940s-1950s: Origins--- 1943: Walter Pitts and Warren McCulloch proposed the mathematical model of neurons-- 1950: Alan Turing proposed the "Turing Test"-- 1952: Arthur Samuel developed the first checkers learning program-- 1959: Samuel first used the term "machine learning"--### 1960s-1970s: Early Development--- 1967: Nearest Neighbor algorithm proposed-- 1969: Minsky and Papert published "Perceptrons", pointing out the limitations of single-layer perceptrons--### 1980s-1990s: Renaissance--- 1986: Backpropagation algorithm became popular again-- 1989: Convolutional neural network concept proposed-- 1995: Support Vector Machine (SVM) proposed-- 1997: LSTM (Long Short-Term Memory) proposed--### 2000s-2010s: Big Data Era--- 2006: Geoffrey Hinton proposed "Deep Belief Networks", deep learning began to revive-- 2012: AlexNet led significantly in ImageNet competition, marking the arrival of the deep learning era-- 2014: GAN (Generative Adversarial Network) proposed-- 2017: Transformer architecture proposed--### 2020s-Present: Large Model Era--- 2020: GPT-3 released-- 2022: ChatGPT released, causing global attention-- 2023: Multimodal large models emerged-------## Important People and Institutions--### People--- **Geoffrey Hinton**: "Father of Deep Learning", important contributor to the backpropagation algorithm-- **Yann LeCun**: Pioneer of convolutional neural networks, first director of Facebook AI Research-- **Yoshua Bengio**: Important scholar in the field of deep learning-- **Andrew Ng**: Co-founder of Google Brain, co-founder of Coursera-- **Demis Hassabis**: Founder of DeepMind, leader of the AlphaGo project--### Institutions--- **Google DeepMind**: Research institution for AlphaGo, AlphaFold-- **OpenAI**: Research institution for GPT series models-- **Meta AI** (formerly Facebook AI): PyTorch, FAIR-- **Microsoft Research Asia (MSRA)**-- **Stanford Artificial Intelligence Laboratory (SAIL)**-- **MIT Computer Science and Artificial Intelligence Laboratory (CSAIL)**-------## Challenges and Future Directions--### Current Challenges--1. Data requirements: Deep learning requires large amounts of labeled data-2. Interpretability: Black-box models make it difficult to understand decision-making processes-3. Robustness: Adversarial examples can easily cause model failures-4. Fairness: Algorithms may have biases-5. Computational resources: Large models require enormous computing power-6. Security: Security safeguards for AI systems--### Future Directions--1. Few-shot Learning-2. Explainable AI-3. Federated Learning-4. Causal Inference-5. Multimodal Learning-6. Autonomous Learning-------## References--- Goodfellow, I., Bengio, Y., & Courville, A. (2016). *Deep Learning*. MIT Press.-- Murphy, K. P. (2012). *Machine Learning: A Probabilistic Perspective*. MIT Press.-- Hastie, T., Tibshirani, R., & Friedman, J. (2009). *The Elements of Statistical Learning*. Springer.diff --git a/tests/fixtures/test_samples/en/general/regulation_company_policy.md b/tests/fixtures/test_samples/en/general/regulation_company_policy.mddeleted file mode 100644index ff3064b..0000000--- a/tests/fixtures/test_samples/en/general/regulation_company_policy.md+++ /dev/null@@ -1,361 +0,0 @@-# No.1 Slacker Company in the Universe Employee Attendance and Performance Management System--**Document Number**: MY-HR-2090-001-**Version**: V3.0-**Effective Date**: January 1, 2090-**Department**: Human Resources-**Approved by**: Slacker Emperor · Wang Dachui-------## Chapter 1: General Provisions--### 1.1 Purpose--To standardize the company's employee attendance management, establish a scientific and reasonable performance evaluation system, protect the legitimate rights and interests of the company and employees, while carefully slacking off and efficiently completing work, in accordance with the "Galactic Labor Law," "Cosmic Labor Contract Law," and related interstellar laws and regulations, combined with the actual situation of the company, this system is formulated.--### 1.2 Scope of Application--This system applies to all regular employees, probationary employees, and alien interns of No.1 Slacker Company in the Universe (hereinafter referred to as the "Company").--### 1.3 Basic Principles--1. Principle of balance between slacking off and working-2. Principle of combining incentives and constraints-3. Principle of linking performance with slacking time-4. Principle of continuous slacking and continuous improvement-------## Chapter 2: Attendance Management Regulations--### 2.1 Working Hours--#### 2.1.1 Standard Working Hours--- **Workdays**: Monday to Friday (can choose any two days per week to work from home and slack off)-- **Working Hours**: 10:00 AM - 12:00 PM (slacking time), 2:00 PM - 5:00 PM (working time)-- **Lunch Break**: 12:00 PM - 2:00 PM (mandatory slacking time)-- **Weekly Working Hours**: No more than 25 hours (the rest of the time can be freely arranged for slacking off)--#### 2.1.2 Flexible Working Hours--The Company implements a **super flexible work system**, where employees can flexibly arrange work and slacking off within the following ranges:-- Earliest arrival time: 9:00 AM-- Latest arrival time: 11:00 AM-- Earliest departure time: 4:00 PM-- Latest departure time: 6:00 PM--As long as 5 hours of work are completed each day, slacking time is unlimited.--#### 2.1.3 Special Positions--For positions requiring 24-hour on-duty coverage such as space exploration and alien communication, a **shift system** is implemented, with specific schedules arranged by the department supervisor, but every 4 consecutive hours of work must be followed by 1 hour of slacking off.--### 2.2 Check-In Management--#### 2.2.1 Check-In Methods--Employees must check in through the Company's interstellar attendance system:-- **Brainwave Check-In**: Direct check-in using a brain-computer interface-- **Holographic Projection Check-In**: Check-in via holographic image-- **Quantum Entanglement Check-In**: Can check in no matter which corner of the universe you are in--#### 2.2.2 Check-In Requirements--- Must check in twice daily: arrival check-in and departure check-in-- Arrival check-in should be completed within 30 minutes after arriving at work-- Departure check-in should be completed within 30 minutes before or after leaving work-- When unable to check in due to official business (including going to other planets), an "Outing Application" should be submitted through the OA system in advance--#### 2.2.3 Forgetting to Check In--- Allowed to forget to check in 5 times per month-- Forgetting to check in must be submitted through the OA system within 48 hours with a "Make-Up Check-In Application," effective after approval by the department supervisor-- Forgetting to check in more than 5 times, starting from the 6th time, each time will be treated as 0.5 days of absence (but slacking time can be offset)--### 2.3 Tardiness, Early Departure, and Absence--#### 2.3.1 Tardiness--- **Tardiness within 30 minutes**: Verbal warning (doesn't count)-- **Tardiness 30-60 minutes**: Written warning, deduct 1 slacking voucher-- **Tardiness 60-120 minutes**: Treated as 0.5 days of absence-- **Tardiness more than 120 minutes**: Treated as 1 day of absence-- **More than 5 cumulative tardiness instances per month**: Cancel the full attendance slacking award for the month--#### 2.3.2 Early Departure--- **Early departure within 30 minutes**: Verbal warning-- **Early departure 30-60 minutes**: Written warning, deduct 1 slacking voucher-- **Early departure more than 60 minutes**: Treated as 0.5 days of absence--#### 2.3.3 Absence--- **0.5 days of absence**: Deduct 1.5 times daily salary, deduct 2 slacking vouchers-- **1 day of absence**: Deduct 2 times daily salary, cancel full attendance slacking award for the month-- **3 consecutive days of absence or 5 cumulative days of absence per year**: Deemed a serious violation of company rules and regulations, and the Company has the right to terminate the labor contract (but can negotiate to offset with slacking vouchers)--### 2.4 Leave Management--#### 2.4.1 Leave Types--| Leave Type | Description | Salary Treatment | Slacking Impact |-|-----------|-------------|------------------|-----------------|-| Personal Leave | Leave for personal matters | Unpaid | No impact on slacking vouchers |-| Sick Leave | Leave for medical treatment or recuperation | Paid at 80% of local minimum wage | Extra slacking vouchers given |-| Marriage Leave | Leave for getting married | Paid (10 days) | Paid slacking |-| Maternity Leave | Leave for female employees giving birth | Paid (in accordance with interstellar regulations) | Full paid slacking |-| Paternity Leave | Leave for male employees whose spouse is giving birth | Paid (30 days) | Full paid slacking |-| Bereavement Leave | Leave for death of immediate family member | Paid (3-7 days) | Paid slacking |-| Annual Leave | Paid annual leave | Paid | Paid slacking |-| Slacking Leave | Leave specifically for slacking off | Paid | Special slacking |--#### 2.4.2 Leave Process--1. **Apply in advance**: In principle, a "Leave Application" should be submitted through the OA system 3 days in advance-2. **Fill in information**: Clearly state leave type, leave time, and reason for leave (slacking leave requires a slacking plan)-3. **Upload proof**: Sick leave, marriage leave, etc., must upload relevant proof materials (slacking leave can upload slacking photos)-4. **Approval process**:- - Leave within 3 days: Approved by department supervisor- - Leave 3-7 days: Approved by department supervisor + HR- - Leave more than 7 days: Approved by department supervisor + HR + Slacker Emperor-5. **Work handover**: Work handover should be completed before taking leave-6. **Emergency leave**: In case of emergency where advance application is not possible, notify the department supervisor via quantum communication within 1 hour before work, and complete the leave application procedure within 48 hours after the event--#### 2.4.3 Annual Leave Regulations--| Company Seniority | Annual Leave Days | Slacking Days |-|------------------|------------------|--------------|-| 1-5 years | 10 days | 5 days |-| 5-10 years | 15 days | 10 days |-| More than 10 years | 20 days | 15 days |--- Annual leave can be used concentratedly or in segments during the year, cannot be carried over to the next year-- Slacking days can be used in conjunction with annual leave-- If the Company cannot arrange annual leave for employees due to work needs, with the consent of the employee, unpaid annual leave salary can be paid at 5 times the daily salary-------## Chapter 3: Performance Evaluation Process--### 3.1 Evaluation Cycle--- **Monthly Evaluation**: Conduct evaluation for the previous month at the beginning of each month-- **Quarterly Evaluation**: Conduct evaluation for the previous quarter in the first month of each quarter-- **Annual Evaluation**: Conduct evaluation for the previous year in January each year-- **Slacking Evaluation**: Conduct slacking quality assessment every weekend--### 3.2 Evaluation Content--#### 3.2.1 Performance Evaluation Indicators (KPI + MFI)--| Indicator Category | Weight | Specific Content |-|------------------|--------|-----------------|-| Work Performance | 40% | Target completion, work quality, work efficiency |-| Slacking Quality | 30% | Slacking duration, diversity of slacking methods, creativity in slacking |-| Work Ability | 15% | Professional ability, communication ability, teamwork, learning ability |-| Work Attitude | 10% | Sense of responsibility, execution, discipline, enthusiasm for slacking |-| Attendance | 5% | Attendance rate, tardiness and early departure |--#### 3.2.2 Evaluation Focus for Different Positions--- **Space Exploration Positions**: Focus on technological innovation, task completion quality, creativity in slacking-- **Alien Communication Positions**: Focus on communication ability, cultural understanding, slacking time control-- **Slacking Guidance Positions**: Focus on slacking skills, slacking training effectiveness, slacking innovation-- **Functional Positions**: Focus on service quality, process optimization, slacking efficiency--### 3.3 Evaluation Process--#### 3.3.1 Goal Setting (P1)--- **Time**: Beginning of evaluation period (first month of each month/quarter/year)-- **Process**:- 1. Employees set personal work goals and slacking goals based on department goals and job responsibilities- 2. Communicate with department supervisor to determine final goals- 3. Enter evaluation goals into the performance system--#### 3.3.2 Process Management (P2)--- **Time**: During evaluation period-- **Process**:- 1. Employees regularly record work progress and slacking situation- 2. Department supervisor has 1-2 mid-term communications with employees- 3. Adjust goals in a timely manner or provide necessary slacking guidance--#### 3.3.3 Performance Evaluation (P3)--- **Time**: End of evaluation period (last month of each month/quarter/year)-- **Process**:- 1. Employees conduct self-evaluation, fill out "Performance Self-Evaluation Form" and "Slacking Self-Evaluation Form"- 2. Department supervisor conducts evaluation based on employee performance, target completion, and slacking quality- 3. HR department reviews evaluation results--#### 3.3.4 Performance Feedback (P4)--- **Time**: Within 5 working days after evaluation results are determined-- **Process**:- 1. Department supervisor has a 1-on-1 performance interview with the employee- 2. Acknowledge achievements, point out shortcomings, jointly formulate improvement plans (including both work and slacking aspects)- 3. Employee signs and confirms on the "Performance Interview Record Form"--### 3.4 Evaluation Grades--| Grade | Definition | Score Range | Proportion Limit | Slacking Reward |-|-------|------------|-------------|-----------------|----------------|-| S | Outstanding, far exceeding expectations | 95-100 points | ≤5% | 10 slacking vouchers + 5 days paid slacking leave |-| A | Excellent, exceeding expectations | 85-94 points | ≤20% | 5 slacking vouchers + 2 days paid slacking leave |-| B | Good, meeting expectations | 70-84 points | Around 50% | 2 slacking vouchers |-| C | Qualified, basically meeting expectations | 60-69 points | ≥20% | 1 slacking voucher |-| D | Unqualified, not meeting expectations | Below 60 points | ≤5% | No slacking reward, need to participate in slacking training |-------## Chapter 4: Reward and Punishment Rules--### 4.1 Rewards--#### 4.1.1 Reward Types--| Reward Type | Description | Reward Method |-|------------|-------------|---------------|-| Monthly Slacker Star | Employee with highest slacking quality selected each month | ¥5,000 bonus + 10 slacking vouchers + certificate |-| Quarterly Slacker Star | Excellent slacking employee selected each quarter | ¥15,000 bonus + 20 slacking vouchers + certificate + 3 days paid slacking leave |-| Annual Slacker Master | Slacker master selected each year | ¥100,000 bonus + 50 slacking vouchers + certificate + 10 days paid slacking leave + priority for promotion |-| Innovation Award | Outstanding contribution to innovation in slacking methods or work methods | ¥10,000-100,000 bonus + certificate |-| Team Award | Reward for excellent slacking teams | ¥10,000-50,000 team slacking activity fund |--#### 4.1.2 Selection Criteria--- Monthly Slacker Star: Slacking evaluation Grade A or above for 2 consecutive months, work performance not below Grade B, no disciplinary records-- Quarterly Slacker Star: Quarterly slacking evaluation Grade S or A, work performance not below Grade B, no disciplinary records, excellent team evaluation-- Annual Slacker Master: Annual slacking evaluation Grade S, work performance not below Grade A, no disciplinary records throughout the year, significant contribution to slacking culture-- Innovation Award: Proposed innovation scheme adopted and achieved significant results-- Team Award: Team goals exceeded, good slacking atmosphere--#### 4.1.3 Selection Process--1. Department recommendation or employee self-nomination-2. Human Resources Department review-3. Slacking Committee evaluation-4. Public notice for 3 working days-5. Official recognition--### 4.2 Punishments--#### 4.2.1 Punishment Types--| Punishment Type | Applicable Scenarios | Punishment Method |-|----------------|---------------------|------------------|-| Verbal Warning | Minor violation of rules and regulations | Verbal criticism and education, deduct 1 slacking voucher |-| Written Warning | Multiple minor violations or more serious violations | Written warning, deduct 3-5 slacking vouchers |-| Record of Demerit | Serious violation of rules and regulations | Demerit on record, deduct 5-10 slacking vouchers, cancel slacking evaluation qualification for the year |-| Salary Reduction/Demotion | Incompetent for work or excessive slacking seriously affecting work | Salary reduction of 10%-30% or demotion, reduce slacking time |-| Termination of Labor Contract | Serious violation of rules and regulations, serious dereliction of duty, etc. | Termination of labor contract, no need to pay economic compensation |--#### 4.2.2 Comparison Table of Specific Violations and Punishments--| Violation | Punishment Grade |-|----------|-----------------|-| Tardiness or early departure within 5 times in 1 month | Verbal warning |-| Tardiness or early departure 5-10 times in 1 month | Written warning |-| 1 day of absence | Written warning |-| 2-3 consecutive days of absence | Record of demerit |-| More than 3 consecutive days of absence or 5 cumulative days of absence per year | Termination of labor contract |-| Excessive slacking during work hours, seriously affecting work | Written warning, record of demerit for recurrence |-| Leaking company interstellar secrets | Record of demerit, termination of labor contract if causing serious losses |-| Forging attendance or slacking records | Record of demerit, termination of labor contract for recurrence |-| Deceiving the company, fraud | Record of demerit, termination of labor contract in serious cases |-| Other serious violations of company rules and regulations | Corresponding punishment according to severity |--#### 4.2.3 Punishment Process--1. **Investigation and verification**: After discovering a violation, the HR department or relevant department conducts an investigation-2. **Hear statement**: Listen to the party's statement and defense-3. **Make decision**: Make a punishment decision based on investigation results and system regulations-4. **Deliver notice**: Deliver the "Punishment Notice" to the party-5. **Right to appeal**: If the party disagrees with the punishment decision, they may submit a written appeal to the HR department within 3 working days-------## Chapter 5: Appeal Procedure--### 5.1 Appeal Scope--Employees may file an appeal if they disagree with the following matters:-- Performance evaluation results-- Slacking evaluation results-- Attendance records-- Reward and punishment decisions-- Other matters where rights and interests are believed to have been infringed--### 5.2 Appeal Process--#### 5.2.1 First-Level Appeal--1. **Time**: Within 3 working days after receiving the relevant decision or record-2. **Method**: Submit a written appeal to the direct supervisor or department supervisor-3. **Processing**: The direct supervisor or department supervisor should give a response within 3 working days--#### 5.2.2 Second-Level Appeal--1. **Prerequisite**: Not satisfied with the first-level appeal result-2. **Time**: Within 3 working days after receiving the first-level response-3. **Method**: Submit a written appeal to the HR department, along with relevant supporting materials-4. **Processing**: The HR department should conduct an investigation and give a response within 5 working days--#### 5.2.3 Third-Level Appeal--1. **Prerequisite**: Still not satisfied with the second-level appeal result-2. **Time**: Within 5 working days after receiving the second-level response-3. **Method**: Submit a written appeal to the Company Slacking Dispute Mediation Committee-4. **Processing**: The Mediation Committee should hold a meeting within 10 working days to conduct mediation and make a final decision--### 5.3 Appeal Materials--Appeal materials should include:-- Appeal letter (stating the appeal matter, reasons, and requirements)-- Relevant supporting materials-- Slacking records or work records-------## Chapter 6: Supplementary Provisions--### 6.1 System Revision--Revisions to this system are proposed by the Human Resources Department and published for implementation after approval by the Slacker Emperor.--### 6.2 System Interpretation--The right to interpret this system belongs to the Company's Human Resources Department and Slacking Committee.--### 6.3 Effective Date--This system shall take effect on January 1, 2090, and the original "No.1 Slacker Company in the Universe Employee Attendance and Performance Management System (V2.0)" shall be repealed simultaneously.--### 6.4 Publicity and Training--The Human Resources Department and Slacking Committee are responsible for the publicity and training of this system, ensuring that every employee understands and complies with this system, while also being able to fully enjoy the fun of slacking off.-------**Attachments**:-1. "Leave Application Form"-2. "Performance Evaluation Form"-3. "Slacking Evaluation Form"-4. "Performance Interview Record Form"-5. "Reward/Punishment Approval Form"-6. "Slacking Voucher Usage Guide"-7. "Appeal Letter Template"-------**System Change Record**:-- V1.0 (January 1, 2080): First release, establishing slacking culture-- V2.0 (June 1, 2085): Revised performance evaluation section, added slacking evaluation indicators-- V3.0 (January 1, 2090): Improved reward and punishment rules, optimized slacking system-------"Carefully slack off, work happily!" —— Slacker Emperor · Wang Dachuidiff --git a/tests/fixtures/test_samples/en/industry/.gitkeep b/tests/fixtures/test_samples/en/industry/.gitkeepdeleted file mode 100644index e69de29..0000000diff --git a/tests/fixtures/test_samples/en/industry/emergency_response.md b/tests/fixtures/test_samples/en/industry/emergency_response.mddeleted file mode 100644index 98f3117..0000000--- a/tests/fixtures/test_samples/en/industry/emergency_response.md+++ /dev/null@@ -1,157 +0,0 @@-# Automated Assembly Line A1 Emergency Response Plan--**Document Number**: EP-2024-001-**Version**: v2.0-**Preparation Date**: January 2024-**Scope of Application**: Automated Assembly Line A1 and surrounding areas-------## 1. General Provisions--### 1.1 Purpose--This plan is formulated to effectively prevent, timely control and eliminate hazards from emergencies of Automated Assembly Line A1, minimize casualties and property losses caused by emergencies, and ensure equipment safety and smooth production.--### 1.2 Scope of Application--This plan applies to emergency response for various emergencies occurring in Automated Assembly Line A1, including fire, leakage, power outage, equipment failure, personnel injury and other accidents.-------## 2. Emergency Response Organization--### 2.1 Emergency Command Center--| Role | Name | Responsibility |-|------|------|----------------|-| Commander-in-Chief | Manager Wang | Fully responsible for emergency response |-| Deputy Commander | Supervisor Li | Assist commander, responsible for on-site command |-| Team Member | Zhang Maintenance | Equipment emergency response |-| Team Member | Security Personnel | On-site security and evacuation |--### 2.2 Emergency Response Departments--| Department | Responsibility |-|------------|----------------|-| Security Department | On-site security, personnel evacuation, safety guard |-| Equipment Department | Equipment emergency response, fault troubleshooting |-| First Aid Department | On-site first aid, medical rescue |-| Logistics Department | Material support, communication |-------## 3. Emergency Response Procedures--### 3.1 Fire Emergency Response--**Trigger Condition**: Fire detected or fire alarm--**Response Procedure**:--| Step | Response Action | Department | Time Limit | Success Criterion----------------|------------|------------| |-|------|------------------|-| 1 | Immediately press alarm button upon discovering fire | On-duty staff | Immediately | Alarm signal sent |-| 2 | Call internal alarm phone to report fire | On-duty staff | Within 1 min | Report successful |-| 3 | Activate fire broadcast to notify personnel evacuation | Security Department | Within 2 min | Broadcast covers entire area |-| 4 | Open fire hydrants and use fire extinguishers for initial firefighting | Equipment Department | Within 3 min | Fire controlled |-| 5 | Turn off power and gas valves in fire area | Equipment Department | Within 2 min | Power cut off |-| 6 | Evacuate production area personnel to safe assembly point | Security Department | Within 5 min | All personnel evacuated |-| 7 | Call 119 to request fire brigade support | Security Department | Immediately | Alarm successful |-| 8 | Welcome fire brigade and provide on-site information | Security Department | Within 10 min | Fire brigade arrived |--### 3.2 Chemical Leakage Emergency Response--**Trigger Condition**: Chemical leakage detected--**Response Procedure**:--| Step | Response Action | Department | Time Limit | Success Criterion |-|------|----------------|------------|------------|------------------|-| 1 | Stop operation immediately, close leakage source | On-duty staff | Immediately | Leakage source closed |-| 2 | Activate ventilation equipment to dilute leakage concentration | Equipment Department | Within 2 min | Ventilation activated |-| 3 | Use adsorption materials to contain leakage | Equipment Department | Within 3 min | Leakage contained |-| 4 | Evacuate surrounding personnel, set up警戒区域 | Security Department | Within 5 min | Personnel evacuated |-| 5 | Call emergency phone to request medical support | Security Department | Immediately | Medical support requested |-| 6 | Clean up leakage, resume production | Equipment Department | Within 30 min | Site cleaned up |--### 3.3 Power Outage Emergency Response--**Trigger Condition**: Sudden power outage--**Response Procedure**:--| Step | Response Action | Department | Time Limit | Success Criterion |-|------|----------------|------------|------------|------------------|-| 1 | Immediately start backup power | Equipment Department | Within 10 sec | Backup power started |-| 2 | Activate emergency lighting to ensure personnel safety evacuation | Equipment Department | Within 30 sec | Emergency lighting activated |-| 3 | Shut down main equipment to prevent damage | Equipment Department | Within 1 min | Equipment shut down |-| 4 | Personnel evacuate production area in order | Security Department | Within 3 min | Personnel evacuated |-| 5 | Investigate cause of power outage, assess recovery time | Equipment Department | Within 10 min | Cause identified |-| 6 | After power restored, restart equipment in sequence | Equipment Department | Within 20 min | Equipment restarted |--### 3.4 Equipment Failure Emergency Response--**Trigger Condition**: Critical equipment serious failure--**Response Procedure**:--| Step | Response Action | Department | Time Limit | Success Criterion |-|------|----------------|------------|------------|------------------|-| 1 | Press emergency stop button, stop equipment operation | Operator | Immediately | Equipment stopped |-| 2 | Cut off equipment power to prevent failure expansion | Operator | Immediately | Power cut off |-| 3 | Report equipment failure situation | Operator | Within 1 min | Report sent |-| 4 | Maintenance personnel arrive for fault diagnosis | Equipment Department | Within 15 min | Diagnosis completed |-| 5 | Assess failure degree, formulate repair plan | Equipment Department | Within 30 min | Plan formulated |-| 6 | Implement repair, resume production | Equipment Department | Within 2 hours | Production resumed |--### 3.5 Personnel Injury Emergency Response--**Trigger Condition**: Personnel injury accident occurs--**Response Procedure**:--| Step | Response Action | Department | Time Limit | Success Criterion |-|------|----------------|------------|------------|------------------|-| 1 | Stop operation immediately, ensure site safety | On-duty staff | Immediately | Site secured |-| 2 | Check injured person's condition | On-duty staff | Immediately | Condition assessed |-| 3 | Perform on-site first aid | First Aid Department | Within 5 min | First aid completed |-| 4 | Call 120 emergency phone | First Aid Department | Immediately | Emergency call made |-| 5 | Arrange personnel to welcome ambulance | First Aid Department | Within 10 min | Ambulance received |-| 6 | Protect site, cooperate with investigation | Security Department | Ongoing | Site protected |-------## 4. Emergency Support--### 4.1 Material Support--- Fire fighting equipment: Fire extinguishers, fire hydrants, fire broadcast-- First aid supplies: First aid kits, stretchers, protective clothing-- Emergency lighting: Emergency lights, flashlights-- Communication equipment: Walkie-talkies, mobile phones--### 4.2 Training and Drills--- Conduct emergency drills quarterly-- New employee training includes emergency content-- Organize comprehensive emergency drill annually-------## 5. Plan Management--### 5.1 Plan Revision--This plan is revised annually, and should be revised promptly if major changes occur.--### 5.2 Plan Interpretation--This plan is interpreted by the Safety and Environmental Protection Department.-------**Prepared by**: Safety and Environmental Protection Department-**Reviewed by**: Production Department-**Approved by**: General Manager-**Effective Date**: January 15, 2024diff --git a/tests/fixtures/test_samples/en/industry/equipment_topology.md b/tests/fixtures/test_samples/en/industry/equipment_topology.mddeleted file mode 100644index ca94d07..0000000--- a/tests/fixtures/test_samples/en/industry/equipment_topology.md+++ /dev/null@@ -1,141 +0,0 @@-# Advanced Manufacturing Line: Automated Assembly System Technical Documentation--**Document Type**: Equipment Topology Specification-**System Version**: v3.2-**Last Updated**: 2024-**Department**: Engineering & Maintenance-------## 1. System Overview--The **Automated Assembly Line A1** is a high-precision manufacturing system designed for electronic component assembly. The system integrates multiple equipment units including CNC machining centers, robotic arms, automated guided vehicles (AGVs), and quality inspection stations. This document provides detailed equipment topology information for maintenance planning and system optimization.-------## 2. Equipment List--### 2.1 Core Production Equipment--| Equipment ID | Equipment Name | Type | Location | Status | Manufacturer | Specification |-|--------------|----------------|------|----------|--------|--------------|---------------|-| M-001 | CNC Machining Center Alpha | Main Unit | Production Hall A, Zone 1 | Running | TechMach Industries | TM-5000X |-| M-002 | CNC Machining Center Beta | Main Unit | Production Hall A, Zone 1 | Running | TechMach Industries | TM-5000X |-| S-001 | Industrial Robot Arm R1 | Auxiliary | Production Hall A, Zone 2 | Running | AutoBot Robotics | AR-200 |-| S-002 | Industrial Robot Arm R2 | Auxiliary | Production Hall A, Zone 2 | Running | AutoBot Robotics | AR-200 |-| S-003 | Industrial Robot Arm R3 | Auxiliary | Production Hall A, Zone 3 | Standby | AutoBot Robotics | AR-150 |-| P-001 | Cooling Pump Unit A | Auxiliary | Production Hall A, Basement | Running | FlowTech Pumps | CP-300 |-| P-002 | Cooling Pump Unit B | Auxiliary | Production Hall A, Basement | Running | FlowTech Pumps | CP-300 |-| V-001 | Main Control Valve | Valve | Production Hall A, Zone 1 | Running | ValveMaster Corp | CV-500 |-| V-002 | Safety Release Valve | Valve | Production Hall A, Zone 2 | Running | ValveMaster Corp | CV-200 |-| MTR-001 | Drive Motor M1 | Motor | Production Hall A, Zone 1 | Running | PowerDrive Ltd | DM-750 |-| MTR-002 | Drive Motor M2 | Motor | Production Hall A, Zone 1 | Running | PowerDrive Ltd | DM-750 |--### 2.2 Material Handling Equipment--| Equipment ID | Equipment Name | Type | Location | Status | Manufacturer | Specification |-|--------------|----------------|------|----------|--------|--------------|---------------|-| AGV-001 | Automated Guided Vehicle 1 | System | Production Hall A | Running | LogiMove AGV | LM-1000 |-| AGV-002 | Automated Guided Vehicle 2 | System | Production Hall A | Running | LogiMove AGV | LM-1000 |-| CV-001 | Conveyor Belt System | System | Production Hall A, Zone 1-4 | Running | ConvTech | CT-500 |--### 2.3 Monitoring & Control Equipment--| Equipment ID | Equipment Name | Type | Location | Status | Manufacturer | Specification |-|--------------|----------------|------|----------|--------|--------------|---------------|-| INS-001 | Temperature Sensor T1 | Instrument | Production Hall A, Zone 1 | Running | SensorPro | ST-100 |-| INS-002 | Pressure Sensor P1 | Instrument | Production Hall A, Zone 1 | Running | SensorPro | SP-200 |-| INS-003 | Flow Sensor F1 | Instrument | Production Hall A, Zone 2 | Running | SensorPro | SF-150 |-| CTR-001 | Main Control Cabinet | System | Production Hall A, Control Room | Running | ControlMaster | MC-800 |-| CTR-001 | Human-Machine Interface | System | Production Hall A, Control Room | Running | InterfaceTech | HMI-700 |-------## 3. Equipment Topology Relationships--### 3.1 Material Flow Path--The primary material flow follows this sequence:--**Raw Material Storage → CNC Machining Center Alpha (M-001) → CNC Machining Center Beta (M-002) → Quality Inspection Station → Finished Product Storage**--- Raw materials enter the production line through the Conveyor Belt System (CV-001)-- M-001 performs initial machining, then transfers workpieces to M-002-- M-002 completes final machining and outputs to quality inspection-- AGV-001 transports finished products to storage area--### 3.2 Energy Transmission System--**Power Supply → Main Control Cabinet (CTR-001) → Drive Motors (MTR-001, MTR-002) → CNC Machining Centers (M-001, M-002)**--- Main power supply provides 380V three-phase power to CTR-001-- CTR-001 distributes power to individual drive motors-- MTR-001 drives M-001 spindle rotation-- MTR-002 drives M-002 spindle rotation--### 3.3 Control Signal Network--**Human-Machine Interface (CTR-002) → Main Control Cabinet (CTR-001) → Robot Arms (S-001, S-002, S-003) → CNC Machining Centers**--- HMI serves as the primary operator interface-- CTR-001 processes commands and sends control signals-- S-001 and S-002 perform workpiece loading/unloading-- S-003 serves as backup for S-002--### 3.4 Cooling System Circuit--**Cooling Pump Unit A (P-001) → CNC Machining Center Alpha (M-001) → Cooling Pump Unit A (Return)**-**Cooling Pump Unit B (P-002) → CNC Machining Center Beta (M-002) → Cooling Pump Unit B (Return)**--- P-001 circulates cooling fluid through M-001-- P-002 circulates cooling fluid through M-002-- Main Control Valve (V-001) regulates flow to M-001-- Safety Release Valve (V-002) provides overpressure protection--### 3.5 Monitoring & Feedback Loops--**Temperature Sensor T1 (INS-001) → Main Control Cabinet (CTR-001) → Cooling Pump Unit A (P-001)**--- INS-001 monitors M-001 operating temperature-- CTR-001 receives temperature data and adjusts P-001 speed-- Closed-loop control maintains temperature within acceptable range--**Pressure Sensor P1 (INS-002) → Main Control Cabinet (CTR-001) → Safety Release Valve (V-002)**--- INS-002 monitors hydraulic system pressure-- When pressure exceeds threshold, V-002 automatically opens-- Emergency relief protects system from overpressure damage-------## 4. System Interconnections Summary--| Source Equipment | Target Equipment | Connection Type | Description |-|------------------|------------------|-----------------|-------------|-| CV-001 | M-001 | Material Handling | workpiece transfer |-| M-001 | M-002 | Material Handling | sequential processing |-| M-002 | AGV-001 | Material Handling | finished product transport |-| CTR-001 | MTR-001 | Electrical Power | spindle drive power |-| CTR-001 | MTR-002 | Electrical Power | spindle drive power |-| CTR-001 | S-001 | Control Signal | robot coordination |-| CTR-001 | S-002 | Control Signal | robot coordination |-| CTR-001 | S-003 | Control Signal | backup robot control |-| P-001 | M-001 | Cooling Circuit | cooling fluid supply |-| P-002 | M-002 | Cooling Circuit | cooling fluid supply |-| V-001 | M-001 | Cooling Circuit | flow regulation |-| V-002 | P-002 | Cooling Circuit | overpressure protection |-| INS-001 | CTR-001 | Instrument Signal | temperature feedback |-| INS-002 | CTR-001 | Instrument Signal | pressure feedback |-| CTR-002 | CTR-001 | Control Signal | operator commands |-------## 5. Maintenance Notes--- **Preventive Maintenance**: Replace filters on P-001 and P-002 every 3 months-- **Predictive Maintenance**: Monitor vibration data on MTR-001 and MTR-002-- **Emergency Response**: V-002 must be tested monthly to ensure proper operation-------*For technical support, contact: [email protected]*diff --git a/tests/fixtures/test_samples/en/industry/failure_case.md b/tests/fixtures/test_samples/en/industry/failure_case.mddeleted file mode 100644index 0cc36cc..0000000--- a/tests/fixtures/test_samples/en/industry/failure_case.md+++ /dev/null@@ -1,121 +0,0 @@-# Equipment Failure Case Analysis Report--**Report Number**: FA-2024-001-**Prepared Date**: March 15, 2024-**Equipment Name**: Automated Assembly Line A1 - Main Motor-**Failure Date**: January 10, 2024-------## 1. Failure Overview--### 1.1 Equipment Information--| Item | Content |-|------|---------|-| Equipment ID | MTR-001 |-| Equipment Name | Main Motor |-| Model | DM-750 |-| Manufacturer | PowerDrive Ltd |-| Installation Location | Production Hall A, Zone 1 |-| Commissioning Date | June 2022 |--### 1.2 Failure Phenomenon--At 9:30 AM on January 10, 2024, the main motor (MTR-001) of Automated Assembly Line A1 suddenly emitted abnormal sounds during operation, accompanied by significantly increased vibration. The operator immediately pressed the emergency stop button, and the equipment stopped running.--**Specific Phenomena**:-- Motor emitted sharp metal friction sounds-- Body vibration amplitude exceeded normal values by 3 times-- Bearing temperature rapidly rose to 85°C-- Inverter showed abnormal current fluctuations-------## 2. Failure Analysis--### 2.1 Preliminary Inspection--After the maintenance personnel arrived at the site, they conducted preliminary inspections:--1. **Visual Inspection**: No obvious damage to motor housing, no abnormal odors-2. **Insulation Test**: Winding insulation resistance normal, ruling out short circuit possibility-3. **Vibration Test**: Vibration value exceeded standard, mainly concentrated at bearing position-4. **Temperature Test**: Bearing seat temperature was high at 85°C--### 2.2 In-depth Analysis--After disassembly and inspection, the root causes of the failure were confirmed:--**Main Cause**: Severe bearing wear--- Bearing raceway showed obvious wear marks-- Rolling element surface had spalling phenomenon-- Lubricating grease deteriorated and turned black, losing its lubrication function--**Secondary Cause**: Long-term lack of preventive maintenance--- Since commissioning, the motor had never undergone bearing replacement-- Lubricating grease was not regularly replenished as required-- Operating load was consistently at high levels-------## 3. Handling Measures--### 3.1 Emergency Response--1. Immediately stopped equipment operation and cut off power-2. Marked failure status and hung warning signs-3. Started standby motor to maintain production--### 3.2 Root Cause Treatment--1. **Bearing Replacement**: Replaced with same specification bearing (Model: 6208-2RS)-2. **Lubricating Grease Supplement**: Used high-quality lubricating grease (Model: L-XBCHA3)-3. **Bearing Seat Cleaning**: Thoroughly removed old lubricating grease and impurities-4. **Electrical Testing**: Tested winding resistance to ensure normal electrical performance--### 3.3 Treatment Results--| Item | Before Treatment | After Treatment |-|------|------------------|-----------------|-| Vibration Value | 12mm/s | 2.5mm/s |-| Bearing Temperature | 85°C | 42°C |-| Operating Current | Fluctuating ±15% | Stable ±3% |-| Noise Level | Abnormal sharp | Normal |-------## 4. Lessons Learned--### 4.1 Lesson Summary--The insights from this failure:--1. **Lack of Preventive Maintenance**: Bearing had reached its service life without timely replacement, which was the root cause of the failure. Equipment health files should be established to track the service life of key components.--2. **Insufficient Inspection Detail**: Daily inspections failed to timely detect early symptoms of bearing abnormal sounds and increased vibration. Training for inspection personnel needs to be strengthened to improve early failure identification capabilities.--3. **Insufficient Spare Parts Management**: Insufficient standby bearing inventory extended maintenance waiting time. Spare parts inventory management should be improved to ensure adequate key spare parts.--### 4.2 Improvement Suggestions--1. **Establish Predictive Maintenance System**: Introduce vibration monitoring and temperature monitoring systems to achieve failure early warning-2. **Improve Maintenance Schedule**: Develop detailed equipment maintenance calendar and perform maintenance tasks on time-3. **Strengthen Personnel Training**: Enhance professional skills of operators and maintenance personnel-4. **Optimize Spare Parts Management**: Establish key spare parts safety stock mechanism-------## 5. Attachments--- Failure site photos-- Bearing inspection report-- Maintenance record form-------**Prepared by**: Zhang Maintenance-**Reviewed by**: Li Supervisor-**Approved by**: Wang Managerdiff --git a/tests/fixtures/test_samples/en/industry/inspection_record.md b/tests/fixtures/test_samples/en/industry/inspection_record.mddeleted file mode 100644index 1efc492..0000000--- a/tests/fixtures/test_samples/en/industry/inspection_record.md+++ /dev/null@@ -1,102 +0,0 @@-# Equipment Daily Inspection Record--**Inspection Unit**: Equipment Maintenance Department-**Inspection Date**: March 15, 2024-**Inspection Type**: Daily Routine Inspection-**Inspector**: Zhang San-------## 1. Inspection Overview--This inspection covered all equipment of Automated Assembly Line A1, including CNC machining centers, robotic arm systems, material handling systems, cooling systems, and electrical control systems. The inspection started at 9:00 AM and ended at 11:30 AM.-------## 2. Inspection Items and Results--### 2.1 CNC Machining Center Inspection--| Inspection Item | Finding | Measures | Status |-|----------------|---------|----------|--------|-| Motor Operation | Running smoothly, no abnormal sounds | Normal, continue monitoring | ✅ Normal |-| Bearing Temperature | Temperature at 42°C, within normal range | Normal, keep monitoring | ✅ Normal |-| Lubrication Oil Level | Oil level normal, no leakage | Normal | ✅ Normal |-| Tool Status | Tool wear within acceptable range | Normal | ✅ Normal |-| Coolant Level | Coolant level slightly low | Top up coolant | ⚠️ Processed |--**Top up coolant**: Found low coolant level in CNC machining center M-001, immediately topped up to normal level.--### 2.2 Robotic Arm System Inspection--| Inspection Item | Finding | Measures | Status |-|----------------|---------|----------|--------|-| Robotic Arm R1 Operation | Operating normally, smooth movement | Normal | ✅ Normal |-| Robotic Arm R2 Operation | Operating normally | Normal | ✅ Normal |-| Robotic Arm R3 Status | In standby status | Normal | ✅ Normal |-| Gripper Clamping Force | Clamping force normal | Normal | ✅ Normal |-| Safety Fence | Fence closed properly | Normal | ✅ Normal |--### 2.3 Material Handling System Inspection--| Inspection Item | Finding | Measures | Status |-|----------------|---------|----------|--------|-| Conveyor Belt Operation | Running smoothly, no deviation | Normal | ✅ Normal |-| AGV-001 Status | Power at 85%, operating normally | Normal | ✅ Normal |-| AGV-002 Status | Power at 92%, operating normally | Normal | ✅ Normal |-| Sensor Status | Sensors clean, signal normal | Normal | ✅ Normal |--### 2.4 Cooling System Inspection--| Inspection Item | Finding | Measures | Status |-|----------------|---------|----------|--------|-| Cooling Pump A Operation | Operating normally, pressure stable | Normal | ✅ Normal |-| Cooling Pump B Operation | Operating normally | Normal | ✅ Normal |-| Temperature Sensor T1 | Temperature reading normal | Normal | ✅ Normal |-| Filter Status | Filter clean | Normal | ✅ Normal |--### 2.5 Electrical Control System Inspection--| Inspection Item | Finding | Measures | Status |-|----------------|---------|----------|--------|-| Main Control Cabinet | No abnormal alarms | Normal | ✅ Normal |-| Inverter Operation | Operating parameters normal | Normal | ✅ Normal |-| Cable Connections | Connections secure, no looseness | Normal | ✅ Normal |-| Grounding System | Grounding good | Normal | ✅ Normal |-------## 3. Abnormality Summary--### 3.1 Processed Abnormalities--| No. | Equipment | Abnormality Description | Measures | Result |-|------|-----------|------------------------|----------|--------|-| 1 | CNC Machining Center M-001 | Coolant level low | Top up coolant | Restored |-------## 4. Inspection Summary--### 4.1 Overall Evaluation--Overall inspection was good, all equipment operating normally. Only one minor abnormality found (low coolant level), which was processed on-site.--### 4.2 Suggestions--1. Recommend increasing coolant level monitoring frequency to prevent recurrence-2. AGV-001 power consumption relatively fast, recommend checking battery status-3. Recommend regular sensor cleaning to ensure detection accuracy--### 4.3 Next Inspection Plan--- Inspection Date: March 18, 2024-- Inspection Type: Weekly Inspection-- Key Focus: Cooling system operation status, AGV battery endurance capability-------**Inspector Signature**: Zhang San-**Date**: March 15, 2024-**Reviewed by**: Li Si-**Review Date**: March 15, 2024diff --git a/tests/fixtures/test_samples/en/industry/operating_mode.md b/tests/fixtures/test_samples/en/industry/operating_mode.mddeleted file mode 100644index 9674cdc..0000000--- a/tests/fixtures/test_samples/en/industry/operating_mode.md+++ /dev/null@@ -1,244 +0,0 @@-# Automated Assembly Line A1 Operating Mode Switching Manual--**Document Number**: OM-2024-001-**Version**: v1.0-**Preparation Date**: February 2024-**Applicable Equipment**: Automated Assembly Line A1-------## 1. Overview--This document describes the operating modes and mode switching conditions of Automated Assembly Line A1. Operators shall strictly follow this manual for mode switching operations to ensure safe equipment operation.-------## 2. Operating Modes--Automated Assembly Line A1 supports the following operating modes:--### 2.1 Shutdown Mode--**Mode Description**: Equipment completely stops operation, all systems powered off.--**Applicable Conditions**:-- Production task completed-- Equipment maintenance-- Long-term shutdown--**Load Range**: 0%--### 2.2 Standby Mode--**Mode Description**: Equipment is in hot standby state, main power remains powered, control system ready, can start quickly.--**Applicable Conditions**:-- Pre-production preparation-- Production pause-- Short break--**Load Range**: 5-10%--### 2.3 Manual Debug Mode--**Mode Description**: Equipment is manually controlled by operators, used for equipment debugging, maintenance and fault troubleshooting.--**Applicable Conditions**:-- Equipment debugging-- Maintenance operations-- Fault troubleshooting-- New program testing--**Load Range**: 0-30%--### 2.4 Automatic Operation Mode--**Mode Description**: Equipment automatically runs according to preset program without human intervention.--**Applicable Conditions**:-- Normal production operation-- Mass production--**Load Range**: 30-100%--### 2.5 Emergency Stop Mode--**Mode Description**: Equipment immediately stops all actions, cuts off power source.--**Applicable Conditions**:-- Emergency occurs-- Equipment failure-- Personnel safety threatened--**Load Range**: 0%-------## 3. Mode Switching--### 3.1 Shutdown Mode → Standby Mode--**Switching Conditions**:-- Close main power switch-- Control system self-test passed--**Switching Steps**:-1. Close main power switch-2. Start auxiliary system-3. Control system self-test-4. Enter standby state--**Switching Time**: Approximately 30 seconds--### 3.2 Standby Mode → Manual Debug Mode--**Switching Conditions**:-- Engage manual handle-- Select manual mode--**Switching Steps**:-1. Engage manual handle-2. Select manual mode on HMI-3. Confirm mode switch-4. Enter manual debug state--**Switching Time**: Approximately 5 seconds--### 3.3 Manual Debug Mode → Standby Mode--**Switching Conditions**:-- Disengage manual handle-- Exit manual mode--**Switching Steps**:-1. Disengage manual handle-2. Select exit manual mode on HMI-3. Confirm exit-4. Return to standby state--**Switching Time**: Approximately 3 seconds--### 3.4 Standby Mode → Automatic Operation Mode--**Switching Conditions**:-- Production task ready-- Materials sufficient-- All subsystems normal-- Press automatic start button--**Switching Steps**:-1. Confirm production task is issued-2. Confirm materials are sufficient-3. Confirm all systems status normal-4. Press automatic start button-5. System loads production program-6. Gradually increase operation speed-7. Enter automatic operation state--**Switching Time**: Approximately 60 seconds--### 3.5 Automatic Operation Mode → Standby Mode--**Switching Conditions**:-- Production task completed-- Press pause button--**Switching Steps**:-1. Press pause button-2. Wait for current process to complete-3. Equipment stops automatic operation-4. Keep power supply-5. Enter standby state--**Switching Time**: Approximately 30 seconds--### 3.6 Automatic Operation Mode → Emergency Stop Mode--**Switching Conditions**:-- Press emergency stop button-- Serious fault detected-- Safety guard opened--**Switching Steps**:-1. Press emergency stop button (or fault triggered)-2. Immediately stop all moving parts-3. Cut off main power-4. Activate alarm device-5. Enter emergency stop state--**Switching Time**: Immediate--### 3.7 Emergency Stop Mode → Standby Mode--**Switching Conditions**:-- Fault cleared-- Site safety confirmed-- Press reset button--**Switching Steps**:-1. Confirm fault is cleared-2. Confirm site is safe-3. Close emergency stop button-4. Press reset button-5. System self-test-6. Enter standby state--**Switching Time**: Approximately 60 seconds-------## 4. Mode Switching Flowchart--```- ┌──────────────┐- │ Shutdown │- │ Mode │- └──────┬───────┘- │- ┌──────▼───────┐- │ Standby │- │ Mode │- └──────┬───────┘- │- ┌──────────────┴──────────────┐- │ │- ┌──────▼───────┐ ┌───────▼──────┐- │ Manual │ │ Automatic │- │ Debug Mode │ │ Mode │- └──────┬───────┘ └──────┬───────┘- │ │- └──────────┬───────────────────┘- │- ┌──────▼───────┐- │ Emergency │- │ Stop │- │ Mode │- └──────────────┘-```-------## 5. Precautions--1. **Safety First**: Ensure personnel safety during any mode switching-2. **Sequential Execution**: Must follow switching steps in sequence, do not skip steps-3. **Status Confirmation**: Confirm current status meets switching conditions before switching-4. **Exception Handling**: Stop immediately and report if exception occurs during switching-------## 6. Load and Mode Reference Table--| Mode | Load Range | Description |-|------|-----------|-------------|-| Shutdown Mode | 0% | Completely powered off |-| Standby Mode | 5-10% | Hot standby |-| Manual Debug Mode | 0-30% | Low load debugging |-| Automatic Operation Mode | 30-100% | Normal production |-| Emergency Stop Mode | 0% | Immediate stop |-------**Prepared by**: Equipment Department-**Reviewed by**: Technical Department-**Approved by**: Production Departmentdiff --git a/tests/fixtures/test_samples/en/industry/operation_flow.md b/tests/fixtures/test_samples/en/industry/operation_flow.mddeleted file mode 100644index 829e835..0000000--- a/tests/fixtures/test_samples/en/industry/operation_flow.md+++ /dev/null@@ -1,189 +0,0 @@-# Automated Assembly Line A1 Startup Operation Procedure--**Procedure Number**: OP-2024-001-**Version**: v2.1-**Preparation Date**: February 2024-**Applicable Equipment**: Automated Assembly Line A1-------## 1. Scope of Application--This procedure applies to the startup operation of Automated Assembly Line A1, including CNC machining centers, robotic arm systems, material handling systems, and quality inspection stations.-------## 2. Pre-Startup Checks--### 2.1 Environment Check--| Check Item | Check Content | Status |-|------------|---------------|--------|-| Temperature | Environment temperature should be within 15-30°C | □ |-| Humidity | Relative humidity should be within 40-70% | □ |-| Cleanliness | No debris or water accumulation around equipment | □ |--### 2.2 Equipment Check--| Check Item | Check Content | Status |-|------------|---------------|--------|-| Power Supply | Main power voltage normal, three-phase balanced | □ |-| Air Source | Air pressure maintained at 0.5-0.7MPa | □ |-| Lubrication | All lubrication points have sufficient grease | □ |-| Safety Devices | Emergency stop button, door locks normal | □ |-------## 3. Startup Procedure--### 3.1 Step 1: Start Auxiliary System--**Operation**: Turn on auxiliary power supply for control cabinet--- Open control cabinet door-- Close auxiliary power switch-- Confirm auxiliary power indicator lights up--**Expected Result**: Auxiliary power normally connected, control panel shows ready status--**Trigger Condition**: Auxiliary power normal--### 3.2 Step 2: Start Hydraulic System--**Operation**: Start hydraulic station--- Press hydraulic station start button-- Wait for hydraulic pressure to rise to set value-- Check hydraulic oil level--**Expected Result**: Hydraulic pressure stable at 3.5MPa, oil level normal--**Trigger Condition**: Hydraulic pressure reaches set value--### 3.3 Step 3: Start Cooling System--**Operation**: Turn on cooling pump--- Turn on cooling pump power switch-- Adjust coolant flow to appropriate value-- Check coolant temperature--**Expected Result**: Cooling system正常运行,进出口温差在5-10°C--**Trigger Condition**: Cooling pump runs without abnormality--### 3.4 Step 4: Start Control System--**Operation**: Start main control system--- Select "Automatic Mode" on HMI-- Click "System Start" button-- Wait for system self-test to complete--**Expected Result**: HMI displays "System Ready", no alarm information--**Trigger Condition**: System self-test passed--### 3.5 Step 5: Activate Servo System--**Operation**: Start servo drive--- Start each axis servo driver in sequence-- Wait for servo system to be ready-- Perform origin reference return--**Expected Result**: Each axis returns to reference origin, position display correct--**Trigger Condition**: Servo system without fault--### 3.6 Step 6: Start Material Handling System--**Operation**: Start conveyor and AGV--- Start conveyor motor-- Activate AGV navigation system-- Set transport path--**Expected Result**: Conveyor runs normally, AGV in position and on standby--**Trigger Condition**: Conveyor runs smoothly--### 3.7 Step 7: Start Robotic System--**Operation**: Activate robotic arm--- Start robotic arm control cabinet-- Load processing program-- Perform robotic arm origin return--**Expected Result**: Each robotic arm joint normal, reaching origin position--**Trigger Condition**: Robotic arm without collision alarm--### 3.8 Step 8: Start Quality Inspection System--**Operation**: Turn on inspection equipment--- Start vision inspection system-- Calibrate inspection parameters-- Load inspection program--**Expected Result**: Inspection system ready, can normally identify workpieces--**Trigger Condition**: Inspection system self-test passed-------## 4. Full Startup Confirmation--After completing the above steps, perform full confirmation:--| Check Item | Confirmation Content | Result |-|------------|---------------------|--------|-| System Status | All subsystems display "Ready" | □ |-| Communication Status | All equipment communication normal | □ |-| Safety Status | Safety doors closed, emergency stop released | □ |-| Production Mode | Switch to automatic production mode | □ |-------## 5. Startup Abnormality Handling--### 5.1 Insufficient Hydraulic Pressure--- Check if hydraulic oil is sufficient-- Check if hydraulic pump is normal-- Check for leaks--### 5.2 Cooling System Alarm--- Check coolant level-- Check cooling pump operating status-- Clean cooling filter--### 5.3 Servo System Fault--- Check servo drive alarm code-- Check motor connection-- Perform fault reset-------## 6. Shutdown Procedure--### 6.1 Normal Shutdown--1. Stop material input-2. Wait for current process to complete-3. Stop each subsystem in sequence-4. Turn off main power--### 6.2 Emergency Shutdown--Press emergency stop button, equipment stops immediately, then follow normal procedure to check before restarting.-------**Prepared by**: Equipment Department-**Reviewed by**: Technical Department-**Approved by**: Production Departmentdiff --git a/tests/fixtures/test_samples/en/industry/safety_control.md b/tests/fixtures/test_samples/en/industry/safety_control.mddeleted file mode 100644index 39195bd..0000000--- a/tests/fixtures/test_samples/en/industry/safety_control.md+++ /dev/null@@ -1,156 +0,0 @@-# Automated Assembly Line A1 Safety Control Manual--**Document Number**: SC-2024-001-**Version**: v1.5-**Preparation Date**: February 2024-**Scope of Application**: All operators of Automated Assembly Line A1-------## 1. General Provisions--### 1.1 Purpose--This manual is formulated to strengthen safety production management of Automated Assembly Line A1, prevent and reduce production safety accidents, and protect employee life safety and physical health.--### 1.2 Scope of Application--This manual applies to all operational activities of Automated Assembly Line A1, including equipment operation, maintenance, inspection and testing.-------## 2. Hazard Identification--### 2.1 Equipment Hazards--| No. | Hazard Name | Hazard Factors | Possible Consequences |-|-----|-------------|----------------|----------------------|-| 1 | CNC Machining Center | High temperature parts, rotating parts | Burns, mechanical injury |-| 2 | Industrial Robotic Arm | Moving parts, clamping force | Crush injury, impact injury |-| 3 | Cooling System | High pressure liquid, temperature change | Burns, frostbite |-| 4 | Hydraulic Station | High pressure oil, aging seals | High pressure jet injury |-| 5 | Electrical Control Cabinet | Electrical components, high voltage power | Electric shock, electrocution |--### 2.2 Environmental Hazards--| No. | Hazard Name | Hazard Factors | Possible Consequences |-|-----|-------------|----------------|----------------------|-| 1 | Workshop Passageway | Floor oil contamination, object stacking | Falls, trips |-| 2 | Material Stacking Area | Material tipping, instability | Crushing, collision |-| 3 | Noise Area | Equipment operating noise | Hearing damage |-| 4 | Chemical Storage | Toxic and hazardous chemicals | Poisoning, chemical burns |--### 2.3 Behavioral Hazards--| No. | Hazard Name | Hazard Factors | Possible Consequences |-|-----|-------------|----------------|----------------------|-| 1 | Violation of Operations | Violating operating procedures | Equipment damage, personal injury |-| 2 | Fatigue Operations | Continuous work, insufficient rest | Slow reaction, misoperation |-| 3 | Missing Protection | Not wearing protective equipment | Personal injury |-------## 3. Risk Points and Control Measures--### 3.1 Mechanical Equipment Risks--| Risk Point | Risk Level | Control Measures | Responsible Person |-|------------|-------------|------------------|-------------------|-| CNC Machining Center Operation | Major Risk | 1. Strictly follow operating procedures 2. Wear protective goggles and gloves 3. Prohibit opening protective doors during operation 4. Regularly check protective device effectiveness | Equipment Person in Charge |-| Robotic Arm Operating Area | Major Risk | 1. Set safety fences and warning signs 2. Install light curtain protection devices 3. Confirm safe area is clear before operation 4. Strictly prohibit unauthorized entry into operating area | Team Leader |-| Hydraulic System Maintenance | Greater Risk | 1. Release pressure before maintenance 2. Wear protective gloves and goggles 3. Use professional tools for maintenance 4. Conduct pressure test after maintenance | Maintenance Technician |--### 3.2 Electrical Safety Risks--| Risk Point | Risk Level | Control Measures | Responsible Person |-|------------|-------------|------------------|-------------------|-| Electrical Cabinet Operation | Major Risk | 1. Only qualified electricians with electrical work certificates can operate 2. Perform voltage verification before operation 3. Wear insulating shoes and gloves 4. Prohibit live work | Electrician |-| Temporary Electricity Use | Greater Risk | 1. Complete temporary electricity use approval 2. Use qualified electrical equipment 3. Regularly check line insulation performance 4. Implement one machine one switch one protection | Equipment Person in Charge |-| Static Electricity Protection | General Risk | 1. Wear anti-static work clothes 2. Ensure equipment grounding is reliable 3. Maintain appropriate ambient humidity | Safety Officer |--### 3.3 Chemical Safety Risks--| Risk Point | Risk Level | Control Measures | Responsible Person |-|------------|-------------|------------------|-------------------|-| Coolant Use | Greater Risk | 1. Wear protective gloves and goggles 2. Keep workplace ventilated 3. Avoid direct skin contact 4. Regularly test coolant concentration | Equipment Person in Charge |-| Lubricating Grease | General Risk | 1. Wear protective gloves 2. Avoid contact with mouth and eyes 3. Use special tools for application 4. Collect waste oil for unified disposal | Maintenance Technician |-| Cleaning Agent Use | Greater Risk | 1. Use in ventilated areas 2. Wear gas masks 3. Store away from fire sources 4. Operate according to MSDS requirements | Team Leader |--### 3.4 Environmental Safety Risks--| Risk Point | Risk Level | Control Measures | Responsible Person |-|------------|-------------|------------------|-------------------|-| Passageway Blockage | General Risk | 1. Keep passageways clear 2. Do not stack materials in passageways 3. Clean oil stains and debris promptly 4. Install anti-slip facilities | Team Leader |-| Noise Hazard | General Risk | 1. Wear earplugs or earmuffs 2. Control at noise source 3. Conduct noise testing regularly 4. Arrange work time reasonably | Safety Officer |-| Material Stacking | Greater Risk | 1. Stack neatly and stably 2. Do not exceed specified height 3. Leave safety passages 4. Regularly check stacking status | Warehouse Keeper |-------## 4. Personal Protective Equipment--### 4.1 Required Protective Equipment--| Protective Equipment | Applicable Area | Replacement Cycle | Responsible Person |-|---------------------|-----------------|-------------------|-------------------|-| Safety Helmet | All work areas | Replace when damaged | Individual Employee |-| Protective Goggles | Processing area, maintenance area | Replace when damaged | Individual Employee |-| Protective Gloves | When contacting chemicals, mechanical equipment | Replace when damaged | Individual Employee |-| Earplugs/Earmuffs | Noise areas | Replace weekly | Individual Employee |-| Insulating Shoes | Electrical work areas | Replace every 6 months | Individual Employee |-| Anti-static Work Clothes | All work areas | Replace every 1 year | Individual Employee |--### 4.2 Protective Equipment Usage Regulations--1. Must correctly wear protective equipment before work-2. Must immediately replace damaged or ineffective protective equipment-3. Strictly prohibit unauthorized modification or removal of protective devices-4. Must return protective equipment when leaving position or transferring-------## 5. Safety Responsibility System--### 5.1 Safety Responsibilities at All Levels--| Role | Safety Responsibilities |-|------|----------------------|-| General Manager | Fully responsible for company safety production work |-| Safety Supervisor | Responsible for safety management system construction, safety supervision and inspection |-| Equipment Person in Charge | Responsible for equipment safe operation, hazard investigation and rectification |-| Team Leader | Responsible for team safety management, employee safety education |-| Operators | Strictly follow safety procedures, correctly use protective equipment |--### 5.2 Safety Assessment and Rewards/Penalties--- Conduct monthly safety performance assessment-- Reward promptly reporting discovered hazards-- Penalize violations according to regulations-- Commend annual safety advanced individuals-------## 6. Hazard Investigation and Rectification--### 6.1 Hazard Investigation Frequency--| Investigation Type | Frequency | Responsible Person |-|-------------------|-----------|-------------------|-| Daily Inspection | Daily | On-duty Employee |-| Weekly Inspection | Weekly | Team Leader |-| Monthly Inspection | Monthly | Equipment Person in Charge |-| Special Inspection | Quarterly | Safety Supervisor |--### 6.2 Hazard Rectification Process--1. Discover hazard, record hazard information-2. Assess hazard level, determine rectification measures-3. Issue rectification notice, implement rectification responsibility-4. Implement rectification, accept rectification results-5. Close file, continuous improvement-------**Prepared by**: Safety and Environmental Protection Department-**Reviewed by**: Production Department-**Approved by**: General Manager-**Effective Date**: February 15, 2024diff --git a/tests/fixtures/test_samples/en/industry/system_topology.md b/tests/fixtures/test_samples/en/industry/system_topology.mddeleted file mode 100644index 8beac72..0000000--- a/tests/fixtures/test_samples/en/industry/system_topology.md+++ /dev/null@@ -1,185 +0,0 @@-# Factory A System Architecture Documentation--**Document Number**: SA-2024-001-**Version**: v1.0-**Preparation Date**: January 2024-------## 1. Factory Overview--Factory A is a modern manufacturing factory of the company, located in the industrial park, covering an area of approximately 50,000 square meters. The factory mainly engages in electronic product manufacturing and precision machining business.--### 1.1 Factory Scale--| Item | Data |-|------|------|-| Occupied Area | 50,000 square meters |-| Building Area | 35,000 square meters |-| Employee Count | Approximately 500 people |-| Annual Output Value | 500 million yuan |-------## 2. Factory Layout--Factory A consists of the following main functional areas:--### 2.1 Production Areas--| Area Name | Function | Area |-|-----------|----------|------|-| Manufacturing Workshop A | Automated assembly production line | 8,000 square meters |-| Manufacturing Workshop B | Precision machining center | 6,000 square meters |-| Manufacturing Workshop C | Assembly workshop | 5,000 square meters |--### 2.2 Support Areas--| Area Name | Function | Area |-|-----------|----------|------|-| Warehouse Area | Raw materials and finished product storage | 10,000 square meters |-| Utility Station | Power, water, gas supply | 2,000 square meters |-| Office Area | Administrative offices | 3,000 square meters |-------## 3. Production Systems--### 3.1 Manufacturing Workshop A - Automated Assembly Production Line--Manufacturing Workshop A is the core production workshop of the factory, mainly including the following systems:--#### 3.1.1 CNC Machining System--| Equipment Name | Specification | Quantity | Function |-|---------------|--------------|----------|----------|-| CNC Machining Center Alpha | TM-5000X | 2 units | Precision parts machining |-| CNC Machining Center Beta | TM-5000X | 2 units | Precision parts machining |--#### 3.1.2 Robotic System--| Equipment Name | Specification | Quantity | Function |-|---------------|--------------|----------|----------|-| Industrial Robotic Arm R1 | AR-200 | 3 units | Workpiece handling and assembly |-| Industrial Robotic Arm R2 | AR-200 | 3 units | Workpiece handling and assembly |-| Industrial Robotic Arm R3 | AR-150 | 2 units | Backup robotic arm |--#### 3.1.3 Material Handling System--| Equipment Name | Specification | Quantity | Function |-|---------------|--------------|----------|----------|-| Conveyor Belt System | CT-500 | 1 set | Workpiece transportation |-| Automated Guided Vehicle AGV | LM-1000 | 4 units | Material distribution |--#### 3.1.4 Support Systems--| System Name | Function |-|-------------|----------|-| Cooling System | Provide cooling for CNC equipment |-| Lubrication System | Provide lubrication for mechanical equipment |-| Hydraulic System | Provide power for pneumatic equipment |-| Dust Removal System | Keep workshop clean |--### 3.2 Manufacturing Workshop B - Precision Machining Center--Manufacturing Workshop B mainly undertakes high-precision parts machining tasks:--| System Name | Main Equipment | Function |-|-------------|----------------|----------|-| Turning System | 4 CNC lathes | Parts turning machining |-| Milling System | 3 CNC milling machines | Parts milling machining |-| Grinding System | 2 precision grinders | Parts precision grinding |-| Inspection System | Coordinate measuring machine | Dimension inspection |--### 3.3 Manufacturing Workshop C - Assembly Workshop--Manufacturing Workshop C is responsible for product assembly:--| System Name | Function |-|-------------|----------|-| Final Assembly Line | Product final assembly |-| Testing Line | Product function testing |-| Packaging Line | Product packaging and storage |-------## 4. Utility Systems--### 4.1 Power Supply System--| Item | Data |-|------|------|-| Transformer Capacity | 2000KVA |-| Supply Voltage | 10KV |-| Backup Power | Diesel generator 500KW |--### 4.2 Water Supply System--| Item | Data |-|------|------|-| Daily Water Supply | 200 tons |-| Water Supply Pressure | 0.3MPa |--### 4.3 Gas Supply System--| Item | Data |-|------|------|-| Air Compressors | 3 units |-| Supply Pressure | 0.7MPa |-------## 5. Hierarchy Structure Summary--The system hierarchy structure of Factory A is as follows:--```-Factory A-├── Manufacturing Workshop A-│ ├── CNC Machining System-│ │ ├── CNC Machining Center Alpha-│ │ └── CNC Machining Center Beta-│ ├── Robotic System-│ │ ├── Industrial Robotic Arm R1-│ │ ├── Industrial Robotic Arm R2-│ │ └── Industrial Robotic Arm R3-│ ├── Material Handling System-│ │ ├── Conveyor Belt System-│ │ └── Automated Guided Vehicle AGV-│ └── Support Systems-│ ├── Cooling System-│ ├── Lubrication System-│ ├── Hydraulic System-│ └── Dust Removal System-├── Manufacturing Workshop B-│ ├── Turning System-│ ├── Milling System-│ ├── Grinding System-│ └── Inspection System-├── Manufacturing Workshop C-│ ├── Final Assembly Line-│ ├── Testing Line-│ └── Packaging Line-├── Warehouse Area-├── Utility Station-│ ├── Power Supply System-│ ├── Water Supply System-│ └── Gas Supply System-└── Office Area-```-------## 6. System Relationships--The following relationships exist between systems:--- Manufacturing Workshops A, B, and C share utility services from the Utility Station (power, water, gas)-- The Warehouse Area provides raw material supply and finished product storage for the three manufacturing workshops-- The Material Handling System connects various manufacturing workshops to achieve material flow-------**Prepared by**: Engineering Department-**Reviewed by**: Technical Department-**Approved by**: Factory Managementdiff --git a/tests/fixtures/test_samples/en/medicine/clinical_guideline_sample.md b/tests/fixtures/test_samples/en/medicine/clinical_guideline_sample.mddeleted file mode 100644index 6bb40dc..0000000--- a/tests/fixtures/test_samples/en/medicine/clinical_guideline_sample.md+++ /dev/null@@ -1,142 +0,0 @@-# Guidelines for the Prevention and Treatment of Type 2 Diabetes Mellitus (2020 Edition)--## 1. Overview--Type 2 diabetes mellitus (T2DM) is a common chronic metabolic disease characterized by insulin resistance and insulin secretory deficiency, leading to elevated blood glucose levels. This guideline aims to provide standardized diagnostic and therapeutic recommendations for clinicians to improve the prevention and treatment of type 2 diabetes.--## 2. Diagnostic Criteria--### 2.1 Diabetes Diagnostic Criteria-- Glycated hemoglobin (HbA1c) ≥6.5%-- Fasting plasma glucose (FPG) ≥7.0mmol/L-- 2-hour plasma glucose ≥11.1mmol/L during oral glucose tolerance test (OGTT)-- Random plasma glucose ≥11.1mmol/L with typical diabetes symptoms--### 2.2 Prediabetes Diagnostic Criteria-- Impaired fasting glucose (IFG): 6.1≤FPG<7.0mmol/L-- Impaired glucose tolerance (IGT): 7.8≤2-hour plasma glucose<11.1mmol/L during OGTT-- Glycated hemoglobin: 5.7%≤HbA1c<6.5%--## 3. Treatment Pathway--### 3.1 Lifestyle Intervention-**Recommendation Level**: A-**Evidence Grade**: 1a--All patients with type 2 diabetes should receive lifestyle intervention, including:-- Rational diet: Control total calories, properly distribute carbohydrates, proteins and fats-- Regular exercise: At least 150 minutes of moderate-intensity aerobic exercise per week-- Weight control: Maintain BMI below 24kg/m²-- Smoking cessation and alcohol restriction-- Psychological balance--### 3.2 Glycemic Control Targets-**Recommendation Level**: A-**Evidence Grade**: 1a--- General adults: HbA1c<7.0%-- Elderly patients (over 65 years): HbA1c<7.5% (good health status) or <8.0% (poor health status)-- Gestational diabetes: HbA1c<6.5%-- Patients with severe complications or high hypoglycemia risk: HbA1c<8.0%--### 3.3 Pharmacological Treatment Pathway--#### 3.3.1 Monotherapy-**Recommendation Level**: A-**Evidence Grade**: 1a--- First-line: Metformin: Initial dose 500mg, 2-3 times daily, maximum dose 2000mg/day-- If metformin intolerance, alternatives include:- - Sulfonylureas: Glimepiride 1-4mg/day- - Thiazolidinediones: Pioglitazone 15-45mg/day- - DPP-4 inhibitors: Sitagliptin 100mg/day- - SGLT-2 inhibitors: Dapagliflozin 10mg/day--#### 3.3.2 Dual Therapy-**Recommendation Level**: A-**Evidence Grade**: 1a--If HbA1c does not reach target after 3 months of monotherapy, initiate dual therapy:-- Metformin + sulfonylureas-- Metformin + thiazolidinediones-- Metformin + DPP-4 inhibitors-- Metformin + SGLT-2 inhibitors-- Metformin + GLP-1 receptor agonists--#### 3.3.3 Triple Therapy-**Recommendation Level**: A-**Evidence Grade**: 1b--If HbA1c does not reach target after 3 months of dual therapy, initiate triple therapy:-- Metformin + sulfonylureas + thiazolidinediones-- Metformin + sulfonylureas + DPP-4 inhibitors-- Metformin + sulfonylureas + SGLT-2 inhibitors-- Metformin + sulfonylureas + GLP-1 receptor agonists--#### 3.3.4 Insulin Therapy-**Recommendation Level**: A-**Evidence Grade**: 1a--If HbA1c does not reach target after 3 months of triple therapy, initiate insulin therapy:-- Basal insulin: Insulin glargine, initial dose 0.1-0.2U/kg/day-- Premixed insulin: Insulin aspart 30, initial dose 0.2-0.4U/kg/day, injected before breakfast and dinner-- Prandial + basal insulin: Insulin aspart + insulin glargine, adjust dose according to blood glucose--## 4. Complication Screening and Management--### 4.1 Macrovascular Complications-**Recommendation Level**: A-**Evidence Grade**: 1a--- Cardiovascular disease: Annual electrocardiogram examination, cardiovascular risk assessment-- Cerebrovascular disease: Regular carotid artery ultrasound examination-- Lower extremity vascular disease: Annual ankle-brachial index (ABI) examination--### 4.2 Microvascular Complications-**Recommendation Level**: A-**Evidence Grade**: 1a--- Diabetic nephropathy: Annual urinary albumin/creatinine ratio (UACR) and serum creatinine examination-- Diabetic retinopathy: Annual fundus examination-- Diabetic neuropathy: Annual foot sensory examination--## 5. Follow-up and Monitoring--### 5.1 Follow-up Frequency-- Newly diagnosed patients: Follow-up every 2-4 weeks until blood glucose reaches target-- Patients with stable blood glucose control: Follow-up every 3-6 months-- Patients with complications: Increase follow-up frequency according to complication severity--### 5.2 Monitoring Indicators-- Blood glucose: Fasting blood glucose, 2-hour postprandial blood glucose-- Glycated hemoglobin: Test every 3 months-- Blood lipids: Test every 6 months-- Blood pressure: Measure at each follow-up-- Body weight: Measure at each follow-up-- Foot examination: Conduct every 3 months--## 6. Special Population Management--### 6.1 Elderly Diabetes Patients-**Recommendation Level**: B-**Evidence Grade**: 2a--- Appropriate relaxation of glycemic control targets to avoid hypoglycemia-- Prioritize drugs with low hypoglycemia risk-- Comprehensive assessment of cardiac and renal function, adjust drug doses--### 6.2 Gestational Diabetes Patients-**Recommendation Level**: A-**Evidence Grade**: 1a--- Strict blood glucose control, targets: Fasting blood glucose <5.3mmol/L, 1-hour postprandial blood glucose <7.8mmol/L, 2-hour postprandial blood glucose <6.7mmol/L-- Insulin therapy is preferred-- OGTT recheck 6-12 weeks after delivery--### 6.3 Patients with Cardiovascular Disease-**Recommendation Level**: A-**Evidence Grade**: 1a--- Prioritize drugs with cardiovascular benefits: SGLT-2 inhibitors, GLP-1 receptor agonists-- Blood pressure control target: <130/80mmHg-- Lipid control target: LDL-C <1.8mmol/L\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/medicine/discharge_summary_sample.md b/tests/fixtures/test_samples/en/medicine/discharge_summary_sample.mddeleted file mode 100644index bc1cf95..0000000--- a/tests/fixtures/test_samples/en/medicine/discharge_summary_sample.md+++ /dev/null@@ -1,90 +0,0 @@-# Discharge Summary--## Basic Information-- **Name**: John Smith-- **Gender**: Male-- **Age**: 65 years-- **Hospitalization Number**: 20260201001-- **Admission Date**: February 1, 2026-- **Discharge Date**: February 10, 2026-- **Admission Diagnosis**: 1. Coronary atherosclerotic heart disease 2. Unstable angina pectoris 3. Hypertension grade 3 (very high risk)-- **Discharge Diagnosis**: 1. Coronary atherosclerotic heart disease 2. Unstable angina pectoris 3. Hypertension grade 3 (very high risk) 4. Type 2 diabetes mellitus--## Hospitalization Course--### February 1, 2026-- **Admission Condition**: The patient was admitted due to "recurrent chest pain for 2 weeks, aggravated for 1 day". On admission, the chest pain was oppressive, located in the precordial area, about the size of a palm, radiating to the left shoulder, lasting about 15 minutes, relieved after rest.-- **Physical Examination**: Temperature 36.5℃, pulse 72 beats/min, respiration 18 breaths/min, blood pressure 160/95mmHg. No cardiac enlargement, heart rate 72 beats/min, regular rhythm, no murmurs in all valve auscultation areas.-- **Auxiliary Examination**: Electrocardiogram: Sinus rhythm, ST segment depression 0.1-0.2mV in V1-V4 leads. Blood routine, liver and kidney function, electrolytes were normal.--### February 2, 2026-- **Examination**: Myocardial enzymes: Troponin I 0.05ng/ml (normal), CK-MB 15U/L (normal). Echocardiogram: Left ventricular ejection fraction 60%, normal chamber sizes, no obvious abnormal wall motion.-- **Treatment**: Aspirin 100mg qd, Clopidogrel 75mg qd, Atorvastatin 20mg qn, Metoprolol 25mg bid, Valsartan 80mg qd, Isosorbide mononitrate 20mg bid.--### February 3, 2026-- **Examination**: Coronary angiography: No significant stenosis in left main coronary artery, 80% stenosis in proximal left anterior descending artery, 50% stenosis in mid circumflex artery, 40% stenosis in mid right coronary artery.-- **Diagnosis**: Coronary atherosclerotic heart disease, unstable angina pectoris, three-vessel disease.--### February 4, 2026-- **Operation**: Coronary artery bypass grafting (CABG)- - **Surgeons**: Dr. Wang (chief surgeon), Dr. Li (assistant)- - **Operation Time**: 08:30-14:30- - **Operation Method**: Off-pump coronary artery bypass grafting- - **Grafts**: Left internal mammary artery → left anterior descending artery, great saphenous vein → circumflex artery, great saphenous vein → right coronary artery- - **Intraoperative Condition**: The operation was successful, blood loss about 300ml, no blood transfusion.--### February 5, 2026-- **Postoperative Condition**: The patient was transferred to intensive care unit, with mechanical ventilation, vital signs stable.-- **Treatment**: Dopamine 3μg/kg/min intravenous pump, nitroglycerin 5μg/min intravenous pump, cefuroxime 1.5g q8h intravenous drip, omeprazole 40mg q12h intravenous injection.--### February 6, 2026-- **Postoperative Condition**: The patient was extubated, changed to nasal cannula oxygen, oxygen saturation 98%.-- **Treatment**: Discontinued dopamine, continued nitroglycerin intravenous pump, adjusted to 3μg/min.--### February 7, 2026-- **Postoperative Condition**: The patient was transferred to general ward, vital signs stable, no chest pain, dyspnea or other discomfort.-- **Examination**: Blood routine: White blood cell count 8.5×10⁹/L, hemoglobin 120g/L, platelet count 180×10⁹/L. Liver and kidney function, electrolytes were normal.-- **Treatment**: Discontinued nitroglycerin intravenous pump, changed to isosorbide mononitrate 20mg bid oral.--### February 8, 2026-- **Examination**: Blood glucose: Fasting blood glucose 7.8mmol/L, 2-hour postprandial blood glucose 11.2mmol/L.-- **Diagnosis**: Type 2 diabetes mellitus.-- **Treatment**: Added metformin 500mg bid oral.--### February 9, 2026-- **Examination**: Electrocardiogram: Sinus rhythm, ST segment in V1-V4 leads improved compared to previous.-- **Treatment**: Adjusted metoprolol dose to 50mg bid oral.--### February 10, 2026-- **Discharge Assessment**: The patient's general condition was good, no chest pain, dyspnea or other discomfort, vital signs stable. Wound healing was good, no redness, exudation.-- **Discharge Instructions**: See discharge instructions section.--## Discharge Instructions--### Medication Treatment-- **Antiplatelet drugs**: Aspirin 100mg qd, lifetime use; Clopidogrel 75mg qd, use for 12 months-- **Lipid-lowering drugs**: Atorvastatin 20mg qn, lifetime use-- **β-blockers**: Metoprolol 50mg bid, adjust dose according to heart rate-- **ACEI/ARB**: Valsartan 80mg qd, lifetime use-- **Nitrates**: Isosorbide mononitrate 20mg bid, can gradually reduce dose after symptom relief-- **Antidiabetic drugs**: Metformin 500mg bid, monitor blood glucose-- **Antibiotics**: Cefuroxime axetil 250mg bid, use for 3 days--### Diet and Activity-- **Diet**: Low-salt, low-fat, diabetic diet, control total calories, daily salt intake <5g-- **Activity**: Avoid strenuous exercise within 1 month after surgery, can perform mild activities such as walking; gradually resume normal activities after 3 months-- **Weight**: Control weight, target BMI <24kg/m²--### Follow-up Plan-- **1 week after discharge**: Cardiology outpatient follow-up, recheck blood routine, liver and kidney function, electrolytes-- **2 weeks after discharge**: Suture removal, thoracic surgery outpatient follow-up-- **1 month after discharge**: Cardiology outpatient follow-up, recheck electrocardiogram, echocardiogram-- **3 months after discharge**: Cardiology outpatient follow-up, recheck coronary CTA-- **6 months after discharge**: Cardiology outpatient follow-up, comprehensive assessment of cardiac function--### Notes-- Keep the wound clean and dry, avoid infection-- Take medication on time, do not adjust dosage without authorization-- Regularly monitor blood pressure and blood glucose-- Seek medical attention promptly if chest pain, dyspnea, fever or other discomfort occurs-- Quit smoking and limit alcohol, maintain good living habits\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/medicine/package_insert_sample.md b/tests/fixtures/test_samples/en/medicine/package_insert_sample.mddeleted file mode 100644index de94b0b..0000000--- a/tests/fixtures/test_samples/en/medicine/package_insert_sample.md+++ /dev/null@@ -1,158 +0,0 @@-# Package Insert--## [Drug Name]-Generic Name: Metformin Hydrochloride Sustained-release Tablets-Brand Name: Glucophage-English Name: Metformin Hydrochloride Sustained-release Tablets--## [Ingredients]-The main ingredient of this product is metformin hydrochloride, whose chemical name is 1,1-dimethylbiguanide hydrochloride.-Molecular Formula: C4H11N5·HCl-Molecular Weight: 165.63--## [Properties]-This product is a white or off-white film-coated tablet, which appears white after removing the coating.--## [Indications]-1. For patients with type 2 diabetes mellitus whose blood glucose cannot be controlled satisfactorily by diet alone, especially obese patients, it may also have a weight-reducing effect.-2. It can be effective for patients who respond poorly to sulfonylureas.-3. It can be used in combination with sulfonylureas or insulin to improve blood glucose control.--## [Specification]-500mg (calculated as metformin hydrochloride)--## [Dosage and Administration]-Oral administration, taken with meals or after meals. The usual starting dose is 500mg once daily with dinner. The dose is adjusted according to blood glucose and urine glucose levels, with a maximum daily dose not exceeding 2000mg. If a single daily dose of 2000mg fails to achieve satisfactory efficacy, it can be changed to 1000mg twice daily.--## [Adverse Reactions]-### 1. Common Adverse Reactions (incidence >1%)-- **Gastrointestinal reactions**: Nausea, vomiting, diarrhea, abdominal pain, dyspepsia, heartburn-- **Systemic reactions**: Fatigue, headache, dizziness--### 2. Uncommon Adverse Reactions (incidence 0.1%-1%)-- **Skin reactions**: Rash, pruritus-- **Metabolic abnormalities**: Hypoglycemia (when used in combination with sulfonylureas or insulin)-- **Laboratory test abnormalities**: Elevated lactate dehydrogenase, elevated alanine aminotransferase, elevated aspartate aminotransferase--### 3. Rare Adverse Reactions (incidence <0.1%)-- **Lactic acidosis**: Manifested as fatigue, nausea, vomiting, abdominal pain, deep and rapid breathing, consciousness disturbance-- **Hematological system**: Granulocytopenia, thrombocytopenia-- **Allergic reactions**: Urticaria, angioedema-- **Hepatobiliary abnormalities**: Hepatitis, cholestatic jaundice--### 4. Adverse Reaction Incidence Statistics-| System | Adverse Reaction | Incidence |-| :--- | :--- | :--- |-| **Gastrointestinal** | Nausea | 5.2% |-| **Gastrointestinal** | Vomiting | 2.6% |-| **Gastrointestinal** | Diarrhea | 4.5% |-| **Gastrointestinal** | Abdominal pain | 2.1% |-| **Systemic** | Fatigue | 1.8% |-| **Systemic** | Headache | 1.5% |-| **Skin** | Rash | 0.3% |-| **Metabolic** | Hypoglycemia | 0.2% (when used alone), 1.5% (when used with sulfonylureas) |-| **Hepatobiliary** | Elevated transaminases | 0.1% |-| **Hematological** | Granulocytopenia | <0.1% |--## [Contraindications]-1. **Absolute Contraindications**:- - Patients allergic to metformin and other ingredients- - Severe renal impairment (eGFR <30ml/min/1.73m²)- - Metabolic acidosis (including diabetic ketoacidosis)- - Severe infection, shock or other diseases that may cause tissue hypoxia- - Alcoholics- - Patients with uncorrected vitamin B12 or folate deficiency- - Within 48 hours before and after intravenous injection of iodinated contrast media--2. **Relative Contraindications**:- - Renal impairment (eGFR 30-45ml/min/1.73m²)- - Hepatic impairment- - Heart failure- - Severe pulmonary insufficiency- - Pregnant and lactating women--## [Precautions]-1. **Lactic Acidosis**: Metformin can cause lactic acidosis, which is rare but fatal. Once it occurs, stop taking the drug immediately and seek medical attention.-2. **Renal Function Monitoring**: Renal function should be checked before and during treatment, especially in elderly patients.-3. **Liver Function Monitoring**: Liver function should be checked regularly during treatment.-4. **Blood Glucose Monitoring**: Blood glucose and glycated hemoglobin should be monitored regularly during treatment.-5. **Vitamin B12 Deficiency**: Long-term use of metformin may reduce vitamin B12 absorption, so it is recommended to monitor vitamin B12 levels regularly.-6. **Before and After Surgery**: Metformin should be temporarily discontinued before elective surgery and can be resumed after renal function recovery.-7. **Contrast Examination**: Metformin should be temporarily discontinued 48 hours before and after intravenous injection of iodinated contrast media.--## [Drug Interactions]--### 1. Interactions with Other Antidiabetic Drugs-- **Sulfonylureas**: Combined use may increase the risk of hypoglycemia-- **Insulin**: Combined use may increase the risk of hypoglycemia, and insulin dose should be reduced-- **Meglitinides**: Combined use may increase the risk of hypoglycemia-- **GLP-1 receptor agonists**: Combined use may enhance hypoglycemic effect-- **SGLT-2 inhibitors**: Combined use may enhance hypoglycemic effect and reduce the risk of hypoglycemia--### 2. Interactions with Other Drugs-- **Antihypertensive drugs**: ACEI, ARB, calcium channel blockers, etc. may enhance the hypoglycemic effect of metformin-- **Lipid-lowering drugs**: Statins may increase the blood concentration of metformin-- **Antibiotics**: Some antibiotics (such as cephalosporins) may increase the risk of lactic acidosis-- **Anticoagulants**: Warfarin combined with metformin may increase the risk of bleeding-- **Diuretics**: Thiazide diuretics may reduce the hypoglycemic effect of metformin-- **Glucocorticoids**: May reduce the hypoglycemic effect of metformin-- **Contraceptives**: May reduce the hypoglycemic effect of metformin--### 3. Conditional Interactions-| Drug Combination | Patient Characteristics | Interaction Result | Clinical Recommendation |-| :--- | :--- | :--- | :--- |-| **Metformin + Sulfonylureas** | Elderly patients | Increased risk of hypoglycemia | Reduce sulfonylurea dose, closely monitor blood glucose |-| **Metformin + Insulin** | Renal impairment | Increased risk of hypoglycemia and lactic acidosis | Reduce insulin dose, monitor renal function |-| **Metformin + Statins** | Hepatic impairment | Increased risk of liver damage | Monitor liver function, reduce statin dose if necessary |-| **Metformin + Diuretics** | Heart failure | Reduced hypoglycemic effect, increased cardiovascular risk | Avoid combination, choose other antihypertensive drugs |-| **Metformin + Glucocorticoids** | Any patient | Reduced hypoglycemic effect, elevated blood glucose | Increase monitoring frequency, adjust dose if necessary |--## [Use in Special Populations]--### 1. Pregnant and Lactating Women-- **Pregnant Women**: Metformin is not recommended during pregnancy unless clearly needed.-- **Lactating Women**: Metformin can be secreted into breast milk, so it is not recommended during lactation.--### 2. Pediatric Use-- Children aged 10-16 years: Same dose as adults, maximum dose not exceeding 2000mg/day.-- Children under 10 years: Safety and efficacy have not been established.--### 3. Geriatric Use-- Elderly patients over 65 years should have regular renal function checks and adjust doses according to renal function.-- No dose adjustment is needed for elderly patients with normal renal function.--## [Overdose]-- **Symptoms**: Mainly manifested as lactic acidosis, including nausea, vomiting, abdominal pain, deep and rapid breathing, consciousness disturbance.-- **Treatment**: Stop taking the drug immediately, seek medical attention. Hemodialysis can be performed to remove accumulated metformin from the body.--## [Pharmacology and Toxicology]--### 1. Pharmacological Actions-- **Mechanism of Action**: Metformin lowers blood glucose by inhibiting hepatic glucose production, reducing intestinal glucose absorption, increasing peripheral tissue glucose uptake and utilization, and improving insulin sensitivity.-- **Pharmacokinetics**: Absorbed from the small intestine after oral administration, bioavailability is 50%-60%, peak time is 2.5-4 hours, half-life is 4-8 hours, mainly excreted by the kidneys.--### 2. Toxicological Studies-- **Acute Toxicity**: Oral LD50 in mice is 3g/kg, oral LD50 in rats is 6g/kg.-- **Chronic Toxicity**: No obvious toxic reactions were observed in rats and dogs after long-term administration (2 years).-- **Teratogenicity**: No teratogenic effects were observed in animal experiments.-- **Carcinogenicity**: No carcinogenic effects were observed in animal experiments.--## [Storage]-Sealed, stored below 25℃.--## [Packaging]-Aluminum-plastic packaging, 30 tablets/box.--## [Expiration Date]-36 months.--## [Approval Number]-National Drug Approval Number: H20023370--## [Manufacturer]-Manufacturer: Sino-American Shanghai Squibb Pharmaceuticals Ltd.-Address: No. 1315 Jianchuan Road, Minhang District, Shanghai-Postal Code: 200240-Telephone: 021-54220000-Fax: 021-54220100-Website: www.bms.com.cn\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/medicine/pathology_report_sample.md b/tests/fixtures/test_samples/en/medicine/pathology_report_sample.mddeleted file mode 100644index dd62b79..0000000--- a/tests/fixtures/test_samples/en/medicine/pathology_report_sample.md+++ /dev/null@@ -1,82 +0,0 @@-# Pathology Report--## Basic Information-- **Pathology Number**: 2026-02001-- **Patient Name**: Jane Doe-- **Gender**: Female-- **Age**: 58 years-- **Submitting Department**: Breast Surgery-- **Submission Date**: February 15, 2026-- **Report Date**: February 20, 2026--## Specimen Information-- **Specimen Type**: Right modified radical mastectomy specimen-- **Specimen Size**: 20cm×15cm×5cm-- **Tumor Location**: Right breast, upper outer quadrant-- **Tumor Size**: 3.5cm×2.5cm×2.0cm-- **Margin Status**: Superior, inferior, medial, lateral, and basal margins all free of carcinoma--## Histological Examination--### Gross Examination-- **Tumor Morphology**: Irregular shape, hard consistency, ill-defined borders-- **Cut Surface Characteristics**: Gray-white, fish-fleshed appearance, with necrosis-- **Surrounding Tissue**: Fat tissue shows carcinoma infiltration--### Microscopic Examination-- **Histological Type**: Invasive ductal carcinoma, no special type-- **Histological Grade**: Grade II (Bloom-Richardson grading)-- **Mitotic Count**: 10 mitoses/10HPF-- **Necrosis**: Focal necrosis present-- **Vascular Invasion**: Lymphatic invasion present, no vascular invasion-- **Nerve Invasion**: No nerve invasion--## Immunohistochemical Examination--### Routine Immunohistochemistry-- **ER**: (+, 90%)-- **PR**: (+, 70%)-- **HER2**: (2+)-- **Ki-67**: (+, 30%)-- **E-cadherin**: (+)-- **P120**: (membrane+)-- **CK5/6**: (-)-- **EGFR**: (-)--### FISH Test-- **HER2 Gene Amplification**: Positive (HER2/CEP17 ratio=3.2)--## Molecular Testing--### Genetic Testing-- **BRCA1**: Wild type-- **BRCA2**: Wild type-- **PIK3CA**: E545K mutation-- **TP53**: R273H mutation-- **ERBB2**: No mutation--## Lymph Node Examination-- **Axillary Lymph Nodes**: 20 nodes, 3 with metastatic carcinoma-- **Sentinel Lymph Nodes**: 2 nodes, 1 with metastatic carcinoma-- **Internal Mammary Lymph Nodes**: 0 nodes, no metastatic carcinoma--## TNM Staging-- **T Stage**: T2 (tumor greatest dimension >2cm and ≤5cm)-- **N Stage**: N1 (1-3 axillary lymph nodes with metastasis)-- **M Stage**: M0 (no distant metastasis)-- **Pathological Stage**: pT2N1M0, Stage IIB--## Other Examinations-- **Intravascular Tumor Thrombus**: Positive-- **Perineural Invasion**: Negative-- **Skin Invasion**: Negative-- **Pectoral Fascia Invasion**: Negative--## Pathological Diagnosis-Right breast invasive ductal carcinoma, no special type, Grade II, pT2N1M0, Stage IIB. Immunohistochemistry: ER (+, 90%), PR (+, 70%), HER2 (2+, FISH positive), Ki-67 (+, 30%). Molecular testing: PIK3CA E545K mutation, TP53 R273H mutation, BRCA1/2 wild type. Axillary lymph node metastasis (3/20), sentinel lymph node metastasis (1/2).--## Notes-1. Suggest comprehensive judgment combined with clinical and other examination results-2. Suggest HER2-targeted therapy-3. Suggest endocrine therapy-4. Suggest regular follow-up\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/medicine/textbook_sample.md b/tests/fixtures/test_samples/en/medicine/textbook_sample.mddeleted file mode 100644index 13a7cff..0000000--- a/tests/fixtures/test_samples/en/medicine/textbook_sample.md+++ /dev/null@@ -1,113 +0,0 @@-# Internal Medicine (8th Edition)--## Chapter 1 Respiratory System Diseases--### 1.1 Chronic Obstructive Pulmonary Disease--#### 1.1.1 Etiology and Pathogenesis-Chronic obstructive pulmonary disease (COPD) is a preventable and treatable disease characterized by persistent airflow limitation that usually progresses. The airflow limitation is associated with an enhanced chronic inflammatory response in the airways and lungs to noxious particles or gases, primarily from cigarette smoke.--**Risk Factors**:-- **Environmental Factors**: Tobacco smoke, occupational dust and chemicals, air pollution, infection-- **Individual Factors**: Genetic factors (e.g., α1-antitrypsin deficiency), lung development abnormalities, airway hyperresponsiveness--**Pathogenesis**:-1. Airway inflammation: Involvement of neutrophils, macrophages, T lymphocytes, etc.-2. Oxidative stress: Increased production of oxidants, decreased antioxidant capacity-3. Protease-antiprotease imbalance: Enhanced protease activity, decreased antiprotease activity-4. Airway remodeling: Structural changes in airways leading to airflow limitation--### 1.2 Bronchial Asthma--#### 1.2.1 Definition and Classification-Bronchial asthma is a heterogeneous disease characterized by chronic airway inflammation involving various cells (e.g., eosinophils, mast cells, T lymphocytes, neutrophils, airway epithelial cells) and cellular components.--**Classification**:-- Allergic asthma-- Non-allergic asthma-- Late-onset asthma-- Severe asthma--### 1.3 Pneumonia--#### 1.3.1 Classification-- Anatomical classification: Lobar pneumonia, lobular pneumonia, interstitial pneumonia-- Etiological classification: Bacterial pneumonia, viral pneumonia, mycoplasma pneumonia, fungal pneumonia-- Classification by acquisition setting: Community-acquired pneumonia, hospital-acquired pneumonia--## Chapter 2 Cardiovascular System Diseases--### 2.1 Hypertension--#### 2.1.1 Definition and Classification-Hypertension is defined as a systolic blood pressure (SBP) ≥140 mmHg and/or diastolic blood pressure (DBP) ≥90 mmHg measured on three separate occasions without antihypertensive medication.--**Blood Pressure Classification**:-- Normal blood pressure: SBP <120 mmHg and DBP <80 mmHg-- Elevated blood pressure: SBP 120-139 mmHg and/or DBP 80-89 mmHg-- Hypertension:- - Stage 1 hypertension: SBP 140-159 mmHg and/or DBP 90-99 mmHg- - Stage 2 hypertension: SBP ≥160 mmHg and/or DBP ≥100 mmHg--### 2.2 Coronary Heart Disease--#### 2.2.1 Pathophysiology-Coronary atherosclerosis is the main cause of coronary heart disease, with pathological changes including lipid deposition, fibrous tissue proliferation, plaque formation, and ultimately stenosis or occlusion of coronary arteries, leading to myocardial ischemia, hypoxia, or necrosis.--**Clinical Types**:-- Asymptomatic myocardial ischemia-- Angina pectoris-- Myocardial infarction-- Ischemic cardiomyopathy-- Sudden cardiac death--## Chapter 3 Digestive System Diseases--### 3.1 Peptic Ulcer--#### 3.1.1 Etiology and Pathogenesis-Peptic ulcer mainly refers to chronic ulcers occurring in the stomach and duodenum, namely gastric ulcer (GU) and duodenal ulcer (DU).--**Main Etiological Factors**:-- Helicobacter pylori (Hp) infection-- Non-steroidal anti-inflammatory drugs (NSAIDs) use-- Gastric acid and pepsin-- Genetic factors-- Other factors: Smoking, alcohol consumption, stress, etc.--**Pathogenesis**:-Imbalance between defensive factors and aggressive factors in the gastric and duodenal mucosa. Either enhanced aggressive factors or weakened defensive factors can lead to peptic ulcer formation.--## Chapter 4 Endocrine System Diseases--### 4.1 Diabetes Mellitus--#### 4.1.1 Definition and Classification-Diabetes mellitus is a group of metabolic diseases characterized by chronic hyperglycemia resulting from defects in insulin secretion, insulin action, or both.--**Classification**:-- Type 1 diabetes mellitus (T1DM): Destruction of pancreatic β cells, leading to absolute insulin deficiency-- Type 2 diabetes mellitus (T2DM): Predominantly insulin resistance with progressive insulin secretory deficiency, or predominantly insulin secretory deficiency with insulin resistance-- Other specific types of diabetes-- Gestational diabetes mellitus (GDM)--#### 4.1.2 Clinical Manifestations-- Polyuria, polydipsia, polyphagia, weight loss ("three polys and one loss")-- Skin infections, slow wound healing-- Blurred vision-- Fatigue--## Chapter 5 Nervous System Diseases--### 5.1 Stroke--#### 5.1.1 Classification and Etiology-Stroke, also known as cerebrovascular accident, refers to diseases caused by cerebral blood circulation disorders and brain tissue functional or structural damage due to cerebrovascular occlusion or rupture.--**Classification**:-- Ischemic stroke: Cerebral thrombosis, cerebral embolism, lacunar infarction-- Hemorrhagic stroke: Intracerebral hemorrhage, subarachnoid hemorrhage--**Risk Factors**:-- Non-modifiable factors: Age, gender, race, genetic factors-- Modifiable factors: Hypertension, diabetes, hyperlipidemia, smoking, alcohol consumption, obesity, physical inactivity, atrial fibrillation, etc.\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/tcm/herb_property_single.md b/tests/fixtures/test_samples/en/tcm/herb_property_single.mddeleted file mode 100644index 64a2382..0000000--- a/tests/fixtures/test_samples/en/tcm/herb_property_single.md+++ /dev/null@@ -1,18 +0,0 @@-# Herb Property Sample - Single Herb--## Ginseng--### Alternative Names-Ginseng, also known as Yellow Ginseng, Blood Ginseng, Human Bearing, Ghost Cover, Divine Herb, Earth Essence, Sea Cream, and Wrinkled Face Rejuvenation.--### Collection and Identification-*Bielu* states: Ginseng grows in the valleys of Shangdang and Liaodong. The roots are collected in the first ten days of February, April, and August, scraped with a bamboo knife, and dried in the sun, avoiding wind exposure.--### Properties and Flavors-Sweet, slightly cold, non-toxic.--### Indications-Tonifies the five viscera, calms the spirit, stabilizes the soul, stops palpitations, eliminates pathogenic factors, improves eyesight, opens the heart, and enhances wisdom. Long-term use promotes lightness of body and prolongs life.--### Meridians-Enters the Spleen Meridian, Lung Meridian, and Heart Meridian.diff --git a/tests/fixtures/test_samples/en/tcm/herbal_compendium_sample.md b/tests/fixtures/test_samples/en/tcm/herbal_compendium_sample.mddeleted file mode 100644index f3d35ae..0000000--- a/tests/fixtures/test_samples/en/tcm/herbal_compendium_sample.md+++ /dev/null@@ -1,55 +0,0 @@-# Herbal Compendium Sample--## Ginseng--### Alternative Names-Ginseng, also known as Yellow Ginseng, Blood Ginseng, Human Bearing, Ghost Cover, Divine Herb, Earth Essence, Sea Cream, and Wrinkled Face Rejuvenation.--### Collection and Identification-*Bielu* states: Ginseng grows in the valleys of Shangdang and Liaodong. The roots are collected in the first ten days of February, April, and August, scraped with a bamboo knife, and dried in the sun, avoiding wind exposure.--### Properties and Flavors-Sweet, slightly cold, non-toxic.--### Indications-Tonifies the five viscera, calms the spirit, stabilizes the soul, stops palpitations, eliminates pathogenic factors, improves eyesight, opens the heart, and enhances wisdom. Long-term use promotes lightness of body and prolongs life.--### Attached Prescriptions-1. Yin Deficiency and Yang Exhaustion Syndrome: 1 liang of ginseng, 1 piece of prepared aconite, divided into four doses, decocted with water.-2. Spleen and Stomach Weakness: 2 qian each of ginseng and atractylodes, 1 qian each of poria and licorice, decocted with water.--## Licorice--### Alternative Names-Licorice, also known as Honey Sweet, Honey Herb, Beautiful Herb, Spirit Herb, and National Elder.--### Collection and Identification-*Bielu* states: Licorice grows in the valleys and sandy mountains of Hexi and Shangjun. It is collected on the last day of February and August, dried in the sun for ten days to complete.--### Properties and Flavors-Sweet, neutral, non-toxic.--### Indications-Treats cold-heat pathogenic factors of the five viscera and six bowels, strengthens tendons and bones, promotes muscle growth, increases strength, heals sores from metal wounds, and detoxifies. Long-term use promotes lightness of body and prolongs life.--### Attached Prescriptions-1. Cold Damage with Sore Throat: 2 liang of licorice, 1 liang of platycodon, decocted with water.-2. Childhood Heat Cough: 2 liang of licorice, soaked in pig bile for five nights, roasted and ground into powder, made into mung bean-sized pills with honey, take ten pills after meals with mint soup.--## Astragalus--### Alternative Names-Astragalus, also known as Dai Shen, Dai Shen, Bai Ben, Wang Sun, Hundred Medicine Cotton, Cotton Astragalus, Du Shen, Shu Zhi, and Huang Qi.--### Collection and Identification-*Bielu* states: Astragalus grows in the valleys of Shu County, Baishui, and Hanzhong. It is collected in February and October, and dried in the shade.--### Properties and Flavors-Sweet, slightly warm, non-toxic.--### Indications-Treats long-term ulcerative sores, expels pus and relieves pain, severe leprosy, five types of hemorrhoids and fistulas, tonifies deficiency, and treats various childhood diseases.--### Attached Prescriptions-1. Qi Deficiency with Night Sweats: 2 liang of astragalus, 1 liang of atractylodes, 0.5 liang of saposhnikovia, ground into powder, take 3 qian each time, decocted with water.-2. Qi Deficiency with Fatigue: 1 liang each of astragalus and ginseng, decocted with water.diff --git a/tests/fixtures/test_samples/en/tcm/medical_case_record_sample.md b/tests/fixtures/test_samples/en/tcm/medical_case_record_sample.mddeleted file mode 100644index 5475121..0000000--- a/tests/fixtures/test_samples/en/tcm/medical_case_record_sample.md+++ /dev/null@@ -1,61 +0,0 @@-# Medical Case Record Sample--## Taiyang Wind Stroke Case--### Symptoms-Fever, sweating, aversion to wind, moderate pulse, nasal congestion, retching.--### Syndrome Differentiation-In Taiyang wind stroke, the yang is floating while the yin is weak. When yang floats, heat arises spontaneously; when yin is weak, sweat emerges on its own. For symptoms such as slight aversion to cold, mild aversion to wind, gentle fever, nasal congestion, and retching, Guizhi Decoction is the main treatment.--### Treatment Principle-Relieve the muscles to expel exterior pathogens, harmonize nutritive and defensive qi.--### Prescription-Guizhi Decoction: Cinnamon Twig 3 liang (peeled), Peony 3 liang, Licorice 2 liang (prepared), Ginger 3 liang (sliced), Jujube 12 pieces (broken).--### Decoction Method-Take the five ingredients, cut three of them, add 7 sheng of water, simmer over low heat to obtain 3 sheng, remove the dregs, adjust to suitable temperature, and take 1 sheng. Soon after taking, drink about 1 sheng of hot rice gruel to aid the medicinal effect, cover with a blanket for about one hour, and it is better to have a slight sweat all over the body; do not let the sweat flow profusely, otherwise the disease will not be cured.--### Case Analysis-This case is a typical Taiyang wind stroke syndrome. The patient experienced wind pathogen invasion, unconsolidated defensive qi, and leakage of nutritive yin, resulting in symptoms such as fever, sweating, and aversion to wind. Treatment with Guizhi Decoction to relieve the muscles, expel exterior pathogens, and harmonize nutritive and defensive qi, leading to pathogen elimination and recovery.--## Taiyang Cold Damage Case--### Symptoms-Headache, fever, body pain, low back pain, joint pain, aversion to wind, absence of sweating, and asthma.--### Syndrome Differentiation-In Taiyang disease, for symptoms such as headache, fever, body pain, low back pain, joint pain, aversion to wind, absence of sweating, and asthma, Mahuang Decoction is the main treatment.--### Treatment Principle-Induce sweating to expel exterior pathogens, ventilate the lungs to relieve asthma.--### Prescription-Mahuang Decoction: Ephedra 3 liang (de-jointed), Cinnamon Twig 2 liang (peeled), Licorice 1 liang (prepared), Apricot Kernel 70 pieces (peeled and tipped).--### Decoction Method-Take the four ingredients, add 9 sheng of water, first boil Ephedra to reduce by 2 sheng, remove the froth, add the other ingredients, boil to obtain 2.5 sheng, remove the dregs, warm and take 8 he, cover to induce slight sweating, no need to drink porridge, follow the same aftercare as Guizhi Decoction.--### Case Analysis-This case is a typical Taiyang cold damage syndrome. The patient experienced cold pathogen invasion, which constrained defensive yang and stagnated nutritive yin, resulting in symptoms such as headache, fever, body pain, and absence of sweating. Treatment with Mahuang Decoction to induce sweating, expel exterior pathogens, ventilate the lungs, and relieve asthma, allowing cold pathogens to be expelled with sweat.--## Shaoyang Disease Case--### Symptoms-Alternating chills and fever, fullness and discomfort in the chest and hypochondria, reluctance to talk and eat, vexation and propensity to vomit, bitter taste in the mouth, dry throat, and dizziness.--### Syndrome Differentiation-In cold damage or wind stroke of five to six days, for symptoms such as alternating chills and fever, fullness and discomfort in the chest and hypochondria, reluctance to talk and eat, vexation and propensity to vomit, or chest vexation without vomiting, or thirst, or abdominal pain, or hypochondriac fullness and hardness, or palpitations in the epigastrium and urinary difficulty, or absence of thirst with slight fever, or cough, Xiaochaihu Decoction is the main treatment.--### Treatment Principle-Harmonize Shaoyang.--### Prescription-Xiaochaihu Decoction: Bupleurum 8 liang, Scutellaria 3 liang, Ginseng 3 liang, Licorice 3 liang (prepared), Ginger 3 liang (sliced), Jujube 12 pieces (broken), Pinellia 0.5 sheng (washed).--### Decoction Method-Take the seven ingredients, add 12 sheng of water, boil to obtain 6 sheng, remove the dregs, simmer again to obtain 3 sheng, warm and take 1 sheng, three times a day.--### Case Analysis-This case is a typical Shaoyang disease syndrome. The patient experienced pathogen invasion of Shaoyang, which disrupted the pivot function, resulting in symptoms such as alternating chills and fever, fullness and discomfort in the chest and hypochondria, and vexation and propensity to vomit. Treatment with Xiaochaihu Decoction to harmonize Shaoyang, leading to pathogen elimination and recovery.diff --git a/tests/fixtures/test_samples/en/tcm/meridian_treatise_sample.md b/tests/fixtures/test_samples/en/tcm/meridian_treatise_sample.mddeleted file mode 100644index d2f03eb..0000000--- a/tests/fixtures/test_samples/en/tcm/meridian_treatise_sample.md+++ /dev/null@@ -1,57 +0,0 @@-# Meridian Treatise Sample--## Circulation of the Twelve Meridians--### Lung Meridian of Hand-Taiyin-Originates in the middle jiao, descends to connect with the large intestine, returns to circle the stomach, ascends across the diaphragm to belong to the lung. From the lung system, it transversely exits the axilla, descends along the medial aspect of the upper arm, traveling anterior to the Heart Meridian of Hand-Shaoyin and Pericardium Meridian of Hand-Jueyin, enters the cubital fossa, follows the medial aspect of the forearm along the radial bone, enters the cunkou (wrist pulse), ascends to the thenar eminence, follows the thenar eminence, and exits at the tip of the thumb. Its branch: from behind the wrist, straightly exits to the medial side of the index finger, ending at its tip.--### Large Intestine Meridian of Hand-Yangming-Originates at the tip of the index finger, follows the radial side of the finger, exits between the first and second metacarpal bones, enters the space between the two tendons, follows the lateral aspect of the forearm, enters the lateral aspect of the elbow, ascends the lateral anterior aspect of the upper arm, reaches the shoulder, exits anterior to the acromion, ascends to the meeting point of the Du Meridian at the highest point of the shoulder, descends into the supraclavicular fossa, connects with the lung, descends across the diaphragm, and belongs to the large intestine. Its branch: from the supraclavicular fossa, ascends the neck, penetrates the cheek, enters the lower teeth, returns to curve around the mouth, crosses the philtrum, from left to right and right to left, ascending to flanking the nostrils.--### Stomach Meridian of Foot-Yangming-Originates at the meeting point of the nose, joins the Bladder Meridian of Foot-Taiyang at the side, descends along the lateral side of the nose, enters the upper teeth, returns to curve around the mouth, circles the lips, descends to meet at the mentolabial groove, then follows the lower margin of the mandible, exits at Daying (ST 5), follows the angle of the mandible, ascends in front of the ear, passes through Tinggong (SI 19), follows the hairline, and reaches the forehead. Its branch: from before Daying (ST 5), descends to Renying (ST 9), follows the throat, enters the supraclavicular fossa, descends across the diaphragm, belongs to the stomach, and connects with the spleen. Its straight branch: from the supraclavicular fossa, descends the medial aspect of the breast, follows the lateral side of the umbilicus, and enters the qijie (气街, energy thoroughfare). Its branch: originates from the stomach orifice, descends along the abdomen, and joins at the qijie. From there, it descends through Biguan (ST 31), reaches Futu (ST 32), descends the knee, follows the lateral aspect of the tibia, descends to the dorsum of the foot, and enters the space between the middle toes. Its branch: separates 3 cun below the knee, descends to the lateral side of the middle toe. Its branch: separates on the dorsum of the foot, enters the space between the first and second toes, ending at its tip.--### Spleen Meridian of Foot-Taiyin-Originates at the tip of the big toe, follows the medial side of the toe along the white skin margin, passes behind the ball of the foot, ascends the anterior aspect of the medial malleolus, ascends the medial aspect of the lower leg, follows the posterior aspect of the tibia, crosses and emerges anterior to the Liver Meridian of Foot-Jueyin, ascends the medial aspect of the thigh, enters the abdomen, belongs to the spleen, connects with the stomach, ascends across the diaphragm, flanks the throat, connects with the root of the tongue, and spreads over the lower surface of the tongue. Its branch: from the stomach, ascends across the diaphragm, and flows into the heart.--### Heart Meridian of Hand-Shaoyin-Originates in the heart, exits to belong to the heart system, descends across the diaphragm, and connects with the small intestine. Its branch: from the heart system, ascends to flank the throat, and connects with the eye system. Its straight branch: from the heart system, ascends to the lung, descends to exit the axilla, follows the medial posterior aspect of the upper arm, traveling posterior to the Lung Meridian of Hand-Taiyin and Pericardium Meridian of Hand-Jueyin, enters the cubital fossa, follows the medial posterior aspect of the forearm, reaches the ulnar side of the wrist, enters the palm, follows the medial side of the little finger, and exits at its tip.--### Small Intestine Meridian of Hand-Taiyang-Originates at the tip of the little finger, follows the lateral side of the hand, ascends the wrist, exits the ulnar styloid process, ascends straight along the posterior aspect of the forearm, exits between the two bones at the medial aspect of the elbow, ascends the lateral posterior aspect of the upper arm, exits the scapular region, circles the scapula, crosses the shoulder, enters the supraclavicular fossa, connects with the heart, follows the esophagus, descends across the diaphragm, reaches the stomach, and belongs to the small intestine. Its branch: from the supraclavicular fossa, ascends the neck, reaches the cheek, goes to the outer canthus, and enters the ear. Its branch: from the cheek, ascends to the inferior margin of the nose, reaches the inner canthus, and obliquely connects to the zygomatic region.--### Bladder Meridian of Foot-Taiyang-Originates at the inner canthus, ascends the forehead, and meets at the vertex. Its branch: from the vertex to the upper angle of the ear. Its straight branch: from the vertex, enters to connect with the brain, returns to exit and descends along the posterior aspect of the neck, follows the medial aspect of the scapulae, flanks the spine, reaches the lumbar region, enters the paravertebral muscles, connects with the kidney, and belongs to the bladder. Its branch: from the lumbar region, descends flanking the spine, penetrates the gluteal region, and enters the popliteal fossa. Its branch: from the medial aspect of the scapulae, descends bilaterally through the scapulae, flanks the spine internally, passes through the hip joint, follows the lateral posterior aspect of the thigh, and joins in the popliteal fossa — from there, it descends through the calf, exits posterior to the lateral malleolus, follows Jinggu (BL 64) to the lateral side of the little toe.--### Kidney Meridian of Foot-Shaoyin-Originates below the little toe, curves to the sole of the foot, emerges below Rangu (KI 2), follows behind the medial malleolus, enters the heel, ascends the medial aspect of the lower leg, exits the medial aspect of the popliteal fossa, ascends the medial posterior aspect of the thigh, penetrates the spine to belong to the kidney, and connects with the bladder. Its straight branch: from the kidney, ascends through the liver and diaphragm, enters the lung, follows the throat, and flanks the root of the tongue. Its branch: from the lung, connects with the heart, and flows into the chest.--### Pericardium Meridian of Hand-Jueyin-Originates in the chest, exits to belong to the pericardium, descends across the diaphragm, and sequentially connects with the triple energizer. Its branch: follows the chest, exits the costal region, descends 3 cun below the axilla, ascends to the axilla, follows the medial aspect of the upper arm, traveling between the Lung Meridian of Hand-Taiyin and Heart Meridian of Hand-Shaoyin, enters the cubital fossa, descends the forearm between the two tendons, enters the palm, follows the middle finger, and exits at its tip. Its branch: separates in the palm, follows the ring finger, and exits at its tip.--### Triple Energizer Meridian of Hand-Shaoyang-Originates at the tip of the ring finger, ascends through the space between the ring and middle fingers, follows the dorsal aspect of the wrist, exits between the two bones of the forearm, ascends through the elbow, follows the lateral aspect of the upper arm, ascends the shoulder, and crosses behind the Gallbladder Meridian of Foot-Shaoyang, enters the supraclavicular fossa, spreads in the chest, disperses to connect with the pericardium, descends across the diaphragm, and pertains to the triple energizer. Its branch: from the chest, ascends the supraclavicular fossa, ascends the neck, connects behind the ear, ascends straight to the upper angle of the ear, bends downward to the cheek, and reaches the mandible. Its branch: from behind the ear, enters the ear, exits in front of the ear, passes in front of Tinggong (SI 19), crosses the cheek, and reaches the outer canthus.--### Gallbladder Meridian of Foot-Shaoyang-Originates at the outer canthus, ascends to the corner of the forehead, descends behind the ear, follows the neck, travels anterior to the Triple Energizer Meridian of Hand-Shaoyang, reaches the shoulder, then crosses behind the Triple Energizer Meridian of Hand-Shaoyang, and enters the supraclavicular fossa. Its branch: from behind the ear, enters the ear, exits in front of the ear, and reaches behind the outer canthus. Its branch: separates from the outer canthus, descends to Daying (ST 5), joins the Triple Energizer Meridian of Hand-Shaoyang, reaches the mandible, descends to Jiache (ST 6), descends the neck, and joins the supraclavicular fossa — from there, it descends the chest, penetrates the diaphragm, connects with the liver, belongs to the gallbladder, follows the costal region, exits the qijie, circles the pubic region, and transversely enters the hip joint. Its straight branch: from the supraclavicular fossa, descends the axilla, follows the chest, passes the hypochondrium, and joins in the hip joint. From there, it follows the lateral aspect of the thigh, exits the lateral aspect of the knee, descends the anterior aspect of the fibula, straightly descends to the tip of the fibula, descends anterior to the lateral malleolus, follows the dorsum of the foot, and enters the space between the fourth and fifth toes. Its branch: separates on the dorsum of the foot, enters the space between the first and second toes, follows the medial aspect of the first metatarsal bone, ends at its tip, and then penetrates the toenail to reach the三毛 region.--### Liver Meridian of Foot-Jueyin-Originates at the lateral side of the big toe, ascends along the dorsum of the foot, 1 cun away from the medial malleolus, ascends 8 cun above the medial malleolus, crosses and emerges posterior to the Spleen Meridian of Foot-Taiyin, ascends the medial aspect of the popliteal fossa, follows the medial aspect of the thigh, enters the pubic region, circles the external genitalia, reaches the lower abdomen, flanks the stomach, belongs to the liver, connects with the gallbladder, ascends through the diaphragm, spreads over the costal region, follows the posterior aspect of the throat, enters the nasopharynx, connects with the eye system, ascends to the forehead, and meets the Du Meridian at the vertex. Its branch: from the eye system, descends the cheek, and circles the inner aspect of the lips. Its branch: again separates from the liver, penetrates the diaphragm, and flows into the lung.--## Commonly Used Acupoints--### Hegu (LI 4)-Location: On the dorsum of the hand, between the first and second metacarpal bones, at the midpoint of the second metacarpal bone on the radial side.-Indications: Headache, redness and swelling of the eyes, nosebleed, toothache, lockjaw, facial paralysis, deafness, mumps, sore throat, febrile disease without sweating, excessive sweating, abdominal pain, constipation, amenorrhea, difficult labor.--### Zusanli (ST 36)-Location: On the anterolateral side of the lower leg, 3 cun below Dubi (ST 35), one finger-width (middle finger) lateral to the anterior crest of the tibia.-Indications: Stomachache, vomiting, dysphagia, abdominal distension, diarrhea, dysentery, constipation, breast abscess, intestinal abscess, lower limb pain, edema, mania, beriberi, consumptive disease with emaciation.--### Sanyinjiao (SP 6)-Location: On the medial side of the lower leg, 3 cun above the tip of the medial malleolus, posterior to the medial crest of the tibia.-Indications: Borborygmus, abdominal distension, diarrhea, irregular menstruation, leukorrhea, uterine prolapse, infertility, difficult labor, spermatorrhea, impotence, enuresis, hernia, insomnia, lower limb weakness, beriberi.--### Guanyuan (CV 4)-Location: On the lower abdomen, on the anterior midline, 3 cun below the umbilicus.-Indications: Collapse syndrome, consumptive cold and exhaustion, emaciation and weakness, lower abdominal pain, cholera with vomiting and diarrhea, dysentery, rectal prolapse, hernia, blood in the stool, blood in the urine, difficult urination, frequent urination, urinary retention, spermatorrhea, white turbidity, impotence, premature ejaculation, irregular menstruation, amenorrhea, dysmenorrhea, leukorrhea, uterine prolapse, uterine bleeding, vaginal itching, lochiorrhea, retained placenta, diabetes, dizziness.diff --git a/tests/fixtures/test_samples/en/tcm/prescription_formulary_sample.md b/tests/fixtures/test_samples/en/tcm/prescription_formulary_sample.mddeleted file mode 100644index c293411..0000000--- a/tests/fixtures/test_samples/en/tcm/prescription_formulary_sample.md+++ /dev/null@@ -1,97 +0,0 @@-# Standard Formula Samples (Revised: No Overlap in Sovereign-Minister-Assistant-Envoy)--## Guizhi Decoction (Cinnamon Twig Decoction)--### Ingredients-Guizhi (Cinnamon Twig) 3 liang (peeled), Shaoyao (Peony Root) 3 liang, Gancao (Licorice) 2 liang (roasted),-Shengjiang (Fresh Ginger) 3 liang (sliced), Dazao (Jujube) 12 pieces (pitted).--### Decoction and Administration-Take the five ingredients, coarsely crush three of them.-Add 7 sheng of water, simmer gently over low heat until 3 sheng remains.-Strain out the dregs. Adjust to warm temperature and take 1 sheng.--Shortly after taking, drink about 1 sheng of warm thin congee to assist the medicinal effect.-Cover warmly for about one hour, until slight sweating appears all over the body—this is optimal.-Do not allow profuse sweating, otherwise the illness will not be cured.--If sweating occurs and the illness resolves after one dose, stop the remaining doses;-there is no need to finish the entire preparation.-If no sweating occurs, take another dose following the same method.-If still no sweating, shorten the interval between doses;-finish three doses within about half a day.--For severe cases, administer day and night, observing around the clock.-If symptoms remain after one full preparation, prepare another.-If sweating still does not occur, administer up to two or three preparations.--### Functions and Indications-Relieves the exterior and promotes muscle relaxation, regulates Ying and Wei.-Indicated for Taiyang wind-strike: Yang floating and Yin weak.-Yang floating leads to spontaneous fever; Yin weakness leads to spontaneous sweating.-Chills, aversion to wind, mild fever, nasal congestion, and nausea.--### Sovereign-Minister-Assistant-Envoy Analysis-- Sovereign: Guizhi (Cinnamon Twig), pungent-warm, relieves the exterior, warms and unblocks the channels.-- Minister: Shaoyao (Peony Root), sour-bitter slightly cold, nourishes Yin and astringes Ying.-- Assistant: Shengjiang (Fresh Ginger), pungent-warm, assists Guizhi in releasing the exterior;- Dazao (Jujube), sweet-warm, tonifies Qi and fortifies the spleen.-- Envoy: Gancao (Licorice), sweet-warm, harmonizes all medicinals.-------## Mahuang Decoction (Ephedra Decoction)--### Ingredients-Mahuang (Ephedra) 3 liang (nodes removed), Guizhi (Cinnamon Twig) 2 liang (peeled),-Gancao (Licorice) 1 liang (roasted), Xingren (Apricot Kernel) 70 pieces (skin and tip removed).--### Decoction and Administration-Take the four ingredients. Add 9 sheng of water.-First decoct Mahuang until 2 sheng evaporates; remove the froth.-Add the other medicinals and decoct until 2.5 sheng remains.-Strain out the dregs. Take 8 he warm, cover to induce slight sweating.-No need for warm congee. For the rest, follow the same instructions as Guizhi Decoction.--### Functions and Indications-Induces sweating to release the exterior, diffuses the lung and relieves asthma.-Indicated for Taiyang disease: headache, fever, body pain, lumbar pain, joint pain,-aversion to wind, absence of sweating, and wheezing.--### Sovereign-Minister-Assistant-Envoy Analysis-- Sovereign: Mahuang (Ephedra), pungent-warm, induces sweating to release the exterior, diffuses the lung and relieves asthma.-- Minister: Guizhi (Cinnamon Twig), pungent-warm, relieves the exterior, warms and unblocks the channels.-- Assistant: Xingren (Apricot Kernel), bitter-warm, descends lung Qi, relieves asthma and cough.-- Envoy: Gancao (Licorice), sweet-warm, harmonizes all medicinals.-------## Xiaochaihu Decoction (Minor Bupleurum Decoction)--### Ingredients-Chaihu (Bupleurum) 8 liang, Huangqin (Scutellaria) 3 liang,-Renshen (Ginseng) 3 liang, Gancao (Licorice) 3 liang (roasted),-Shengjiang (Fresh Ginger) 3 liang (sliced), Dazao (Jujube) 12 pieces (pitted),-Banxia (Pinellia) 0.5 sheng (washed).--### Decoction and Administration-Take the seven ingredients. Add 12 sheng of water, decoct until 6 sheng remains.-Strain out the dregs, then decoct again until 3 sheng remains.-Take 1 sheng warm, three times a day.--### Functions and Indications-Harmonizes Shaoyang.-Indicated for cold damage (Shanghan) for five or six days with wind-strike:-alternating chills and fever, fullness in the chest and hypochondria,-depressed appetite, vexation and frequent vomiting.-Other possible presentations:-chest vexation without vomiting, thirst, abdominal pain,-hardness below the hypochondria, palpitations, dysuria,-absence of thirst with mild fever, or cough.--### Sovereign-Minister-Assistant-Envoy Analysis-- Sovereign: Chaihu (Bupleurum), bitter-neutral, harmonizes Shaoyang, courses the liver and gallbladder.-- Minister: Huangqin (Scutellaria), bitter-cold, clears and drains Shaoyang heat.-- Assistant: Renshen (Ginseng) and Dazao (Jujube), tonify Qi and fortify the spleen;- Banxia (Pinellia) and Shengjiang (Fresh Ginger), harmonize the stomach and direct rebellious Qi downward.-- Envoy: Gancao (Licorice), harmonizes all medicinals.\ No newline at end of filediff --git a/tests/fixtures/test_samples/en/tcm/prescription_modification_sample.md b/tests/fixtures/test_samples/en/tcm/prescription_modification_sample.mddeleted file mode 100644index 43fe3c9..0000000--- a/tests/fixtures/test_samples/en/tcm/prescription_modification_sample.md+++ /dev/null@@ -1,59 +0,0 @@-# Prescription Modification Sample--## Modified Gui Zhi Tang (Cinnamon Decoction)--### Original Formula-Gui Zhi Tang: Gui Zhi (Cinnamon Twig) 3 liang (peeled), Shao Yao (White Peony) 3 liang, Gan Cao (Licorice) 2 liang (honey-fried), Sheng Jiang (Fresh Ginger) 3 liang (sliced), Da Zao (Jujube) 12 pieces (broken).--### Modification 1: For Neck and Back Stiffness-If (the condition) involves neck and back stiffness, **add Ge Gen (Kudzu Root) 4 liang**.--### Modification 2: For Asthma-If (the condition) involves asthma, **add Hou Po (Magnolia Bark) 2 liang, Xing Ren (Apricot Kernel) 50 pieces**.--### Modification 3: For Abdominal Fullness and Pain-If (the condition) involves abdominal fullness and pain, **remove Shao Yao (White Peony), add Fu Zi (Aconite) 1 piece**.--### Modification 4: For Yang Deficiency with Sweating-If (the condition) involves yang deficiency with profuse sweating, **remove Shao Yao (White Peony), add Fu Zi (Aconite) 1 piece**.-------## Modified Ma Huang Tang (Ephedra Decoction)--### Original Formula-Ma Huang Tang: Ma Huang (Ephedra) 3 liang (removed nodes), Gui Zhi (Cinnamon Twig) 2 liang (peeled), Gan Cao (Licorice) 1 liang (honey-fried), Xing Ren (Apricot Kernel) 70 pieces (peeled tip).--### Modification 1: For Internal Heat-If (the condition) involves internal heat, **remove Gui Zhi (Cinnamon Twig), add Shi Gao (Gypsum) half jin**.--### Modification 2: For Dampness-If (the condition) involves dampness, **add Cang Zhu (Atractylodes) 2 liang**.-------## Modified Xiao Chai Hu Tang (Minor Bupleurum Decoction)--### Original Formula-Xiao Chai Hu Tang: Chai Hu (Bupleurum) half jin, Huang Qin (Scutellaria) 3 liang, Ren Shen (Ginseng) 3 liang, Gan Cao (Licorice) 3 liang (honey-fried), Sheng Jiang (Fresh Ginger) 3 liang (sliced), Da Zao (Jujube) 12 pieces (broken), Ban Xia (Pinellia) half Sheng (washed).--### Modification 1: For Chest Distress without Vomiting-If (the condition) involves chest distress without vomiting, **remove Ban Xia (Pinellia) and Ren Shen (Ginseng), add Gua Lou Shi (Trichosanthes Fruit) 1 piece**.--### Modification 2: For Thirst-If (the condition) involves thirst, **remove Ban Xia (Pinellia), add Ren Shen (Ginseng) to make 4.5 liang total, add Tian Hua Fen (Trichosanthes Root) 4 liang**.--### Modification 3: For Abdominal Pain-If (the condition) involves abdominal pain, **remove Huang Qin (Scutellaria), add Shao Yao (White Peony) 3 liang**.--### Modification 4: For Subcostal Fullness and Hardness-If (the condition) involves subcostal fullness and hardness, **remove Da Zao (Jujube), add Mu Li (Oyster Shell) 4 liang**.--### Modification 5: For Palpitation-If (the condition) involves palpitation, **remove Huang Qin (Scutellaria), add Fu Ling (Poria) 4 liang**.--### Modification 6: For No Thirst with Mild Fever-If (the condition) involves no thirst with mild fever, **remove Ren Shen (Ginseng), add Gui Zhi (Cinnamon Twig) 3 liang, cover with blanket to induce mild sweating**.--### Modification 7: For Cough-If (the condition) involves cough, **remove Ren Shen (Ginseng), Da Zao (Jujube), Sheng Jiang (Fresh Ginger), add Wu Wei Zi (Schisandra) half Sheng, Gan Jiang (Dried Ginger) 2 liang**.diff --git a/tests/fixtures/test_samples/zh/agriculture/crop_technical_manual.md b/tests/fixtures/test_samples/legacy/agriculture/crop_technical_manual.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/agriculture/crop_technical_manual.mdrename to tests/fixtures/test_samples/legacy/agriculture/crop_technical_manual.mddiff --git a/tests/fixtures/test_samples/zh/agriculture/field_scouting_report.md b/tests/fixtures/test_samples/legacy/agriculture/field_scouting_report.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/agriculture/field_scouting_report.mdrename to tests/fixtures/test_samples/legacy/agriculture/field_scouting_report.mddiff --git a/tests/fixtures/test_samples/zh/agriculture/soil_analysis_report.md b/tests/fixtures/test_samples/legacy/agriculture/soil_analysis_report.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/agriculture/soil_analysis_report.mdrename to tests/fixtures/test_samples/legacy/agriculture/soil_analysis_report.mddiff --git a/tests/fixtures/test_samples/zh/biology/glycolysis_pathway.md b/tests/fixtures/test_samples/legacy/biology/glycolysis_pathway.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/biology/glycolysis_pathway.mdrename to tests/fixtures/test_samples/legacy/biology/glycolysis_pathway.mddiff --git a/tests/fixtures/test_samples/zh/biology/lake_ecosystem.md b/tests/fixtures/test_samples/legacy/biology/lake_ecosystem.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/biology/lake_ecosystem.mdrename to tests/fixtures/test_samples/legacy/biology/lake_ecosystem.mddiff --git a/tests/fixtures/test_samples/zh/biology/protein_signal_complex.md b/tests/fixtures/test_samples/legacy/biology/protein_signal_complex.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/biology/protein_signal_complex.mdrename to tests/fixtures/test_samples/legacy/biology/protein_signal_complex.mddiff --git a/tests/fixtures/test_samples/zh/biology/wetland_survey.md b/tests/fixtures/test_samples/legacy/biology/wetland_survey.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/biology/wetland_survey.mdrename to tests/fixtures/test_samples/legacy/biology/wetland_survey.mddiff --git a/tests/fixtures/test_samples/zh/food/food_review_article.md b/tests/fixtures/test_samples/legacy/food/food_review_article.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/food/food_review_article.mdrename to tests/fixtures/test_samples/legacy/food/food_review_article.mddiff --git a/tests/fixtures/test_samples/zh/food/multi_recipe_card.md b/tests/fixtures/test_samples/legacy/food/multi_recipe_card.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/food/multi_recipe_card.mdrename to tests/fixtures/test_samples/legacy/food/multi_recipe_card.mddiff --git a/tests/fixtures/test_samples/zh/food/recipe_standard_card.md b/tests/fixtures/test_samples/legacy/food/recipe_standard_card.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/food/recipe_standard_card.mdrename to tests/fixtures/test_samples/legacy/food/recipe_standard_card.mddiff --git a/tests/fixtures/test_samples/zh/food/restaurant_menu.md b/tests/fixtures/test_samples/legacy/food/restaurant_menu.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/food/restaurant_menu.mdrename to tests/fixtures/test_samples/legacy/food/restaurant_menu.mddiff --git a/tests/fixtures/test_samples/zh/history/battle_of_chibi.md b/tests/fixtures/test_samples/legacy/history/battle_of_chibi.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/history/battle_of_chibi.mdrename to tests/fixtures/test_samples/legacy/history/battle_of_chibi.mddiff --git a/tests/fixtures/test_samples/zh/history/sushi_life_letters.md b/tests/fixtures/test_samples/legacy/history/sushi_life_letters.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/history/sushi_life_letters.mdrename to tests/fixtures/test_samples/legacy/history/sushi_life_letters.mddiff --git a/tests/fixtures/test_samples/zh/literature/critique_zhenhuan.md b/tests/fixtures/test_samples/legacy/literature/critique_zhenhuan.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/literature/critique_zhenhuan.mdrename to tests/fixtures/test_samples/legacy/literature/critique_zhenhuan.mddiff --git a/tests/fixtures/test_samples/zh/literature/novel_langya.md b/tests/fixtures/test_samples/legacy/literature/novel_langya.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/literature/novel_langya.mdrename to tests/fixtures/test_samples/legacy/literature/novel_langya.mddiff --git a/tests/fixtures/test_samples/zh/literature/screenplay_zhenhuan.md b/tests/fixtures/test_samples/legacy/literature/screenplay_zhenhuan.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/literature/screenplay_zhenhuan.mdrename to tests/fixtures/test_samples/legacy/literature/screenplay_zhenhuan.mddiff --git a/tests/fixtures/test_samples/zh/news/__init__.py b/tests/fixtures/test_samples/legacy/news/__init__.pysimilarity index 100%rename from tests/fixtures/test_samples/zh/news/__init__.pyrename to tests/fixtures/test_samples/legacy/news/__init__.pydiff --git a/tests/fixtures/test_samples/zh/news/breaking_news_brief.md b/tests/fixtures/test_samples/legacy/news/breaking_news_brief.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/news/breaking_news_brief.mdrename to tests/fixtures/test_samples/legacy/news/breaking_news_brief.mddiff --git a/tests/fixtures/test_samples/zh/news/investigative_report.md b/tests/fixtures/test_samples/legacy/news/investigative_report.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/news/investigative_report.mdrename to tests/fixtures/test_samples/legacy/news/investigative_report.mddiff --git a/tests/fixtures/test_samples/zh/news/live_event_updates.md b/tests/fixtures/test_samples/legacy/news/live_event_updates.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/news/live_event_updates.mdrename to tests/fixtures/test_samples/legacy/news/live_event_updates.mddiff --git a/tests/fixtures/test_samples/zh/news/policy_analysis.md b/tests/fixtures/test_samples/legacy/news/policy_analysis.mdsimilarity index 100%rename from tests/fixtures/test_samples/zh/news/policy_analysis.mdrename to tests/fixtures/test_samples/legacy/news/policy_analysis.mddiff --git a/uv.lock b/uv.lockindex 3c914a2..d86fa2d 100644--- a/uv.lock+++ b/uv.lock@@ -691,7 +691,7 @@ wheels = [[[package]]name = "hyperextract"version = "0.1.0"-source = { virtual = "." }+source = { editable = "." }dependencies = [{ name = "faiss-cpu" },{ name = "langchain" },@@ -701,7 +701,11 @@ dependencies = [{ name = "ontomem" },{ name = "ontosight" },{ name = "python-dotenv" },+ { name = "rich" },{ name = "semhash" },+ { name = "tomli" },+ { name = "tomli-w" },+ { name = "typer" },][package.dev-dependencies]@@ -722,7 +726,11 @@ requires-dist = [{ name = "ontomem", specifier = ">=0.2.0" },{ name = "ontosight", specifier = ">=0.1.4" },{ name = "python-dotenv", specifier = ">=1.2.1" },+ { name = "rich", specifier = ">=13.7.0" },{ name = "semhash", specifier = ">=0.3.2" },+ { name = "tomli", specifier = ">=2.0.1" },+ { name = "tomli-w", specifier = ">=1.0.0" },+ { name = "typer", specifier = ">=0.13.0" },][package.metadata.requires-dev]@@ -2287,6 +2295,15 @@ wheels = [{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e0/76/f963c61683a39084aa575f98089253e1e852a4417cb8a3a8a422923a5246/setuptools-80.10.1-py3-none-any.whl", hash = "sha256:fc30c51cbcb8199a219c12cc9c281b5925a4978d212f84229c909636d9f6984e", size = 1099859, upload-time = "2026-01-21T09:42:00.688Z" },]+[[package]]+name = "shellingham"+version = "1.5.4"+source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }+sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" }+wheels = [+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" },+]+[[package]]name = "simsimd"version = "6.5.12"@@ -2541,6 +2558,69 @@ wheels = [{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/72/f4/0de46cfa12cdcbcd464cc59fde36912af405696f687e53a091fb432f694c/tokenizers-0.22.2-cp39-abi3-win_arm64.whl", hash = "sha256:9ce725d22864a1e965217204946f830c37876eee3b2ba6fc6255e8e903d5fcbc", size = 2612133, upload-time = "2026-01-05T10:45:17.232Z" },]+[[package]]+name = "tomli"+version = "2.4.0"+source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }+sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" }+wheels = [+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" },+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" },+]++[[package]]+name = "tomli-w"+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/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021", size = 7184, upload-time = "2025-01-15T12:07:24.262Z" }+wheels = [+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", size = 6675, upload-time = "2025-01-15T12:07:22.074Z" },+]+[[package]]name = "tqdm"version = "4.67.1"@@ -2553,6 +2633,21 @@ wheels = [{ url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" },]+[[package]]+name = "typer"+version = "0.24.1"+source = { registry = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" }+dependencies = [+ { name = "annotated-doc" },+ { name = "click" },+ { name = "rich" },+ { name = "shellingham" },+]+sdist = { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/f5/24/cb09efec5cc954f7f9b930bf8279447d24618bb6758d4f6adf2574c41780/typer-0.24.1.tar.gz", hash = "sha256:e39b4732d65fbdcde189ae76cf7cd48aeae72919dea1fdfc16593be016256b45", size = 118613, upload-time = "2026-02-21T16:54:40.609Z" }+wheels = [+ { url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/4a/91/48db081e7a63bb37284f9fbcefda7c44c277b18b0e13fbc36ea2335b71e6/typer-0.24.1-py3-none-any.whl", hash = "sha256:112c1f0ce578bfb4cab9ffdabc68f031416ebcc216536611ba21f04e9aa84c9e", size = 56085, upload-time = "2026-02-21T16:54:41.616Z" },+]+[[package]]name = "typing-extensions"version = "4.15.0"