跳到主要内容

宝玉文章翻译与精校

收藏0

把文章翻译成自然中文或其他语言,支持快翻、标准、精校三种流程和术语表;长文可分块处理,保留 Markdown 结构。

让 AI 安装

github最新版本 0.1.0更新于 2026-10-24下载 1 次

references/config/extend-schema.md

3.5 KB查看排版效果
1# EXTEND.md Schema for baoyu-translate
2
3## Format
4
5EXTEND.md uses YAML format:
6
7```yaml
8# Default target language (ISO code or common name)
9target_language: zh-CN
10
11# Default translation mode
12default_mode: normal # quick | normal | refined
13
14# Target audience (affects annotation depth and register)
15audience: general # general | technical | academic | business | or custom string
16
17# Translation style preference
18style: storytelling # storytelling | formal | technical | literal | academic | business | humorous | conversational | elegant | or custom string
19
20# Word count threshold to trigger chunked translation
21chunk_threshold: 4000
22
23# Max words per chunk
24chunk_max_words: 5000
25
26# Custom glossary (merged with built-in glossary)
27# CLI --glossary flag overrides these
28# Supports inline entries and/or file paths
29glossary:
30 - from: "Reinforcement Learning"
31 to: "强化学习"
32 - from: "Transformer"
33 to: "Transformer"
34 note: "Keep English"
35
36# Load glossary from external file(s)
37# Supports absolute path or relative to EXTEND.md location
38# File format: markdown table with | from | to | note | columns,
39# or YAML list of {from, to, note} entries
40glossary_files:
41 - ./my-glossary.md
42 - /path/to/shared-glossary.yaml
43
44# Language-pair specific glossaries
45glossaries:
46 en-zh:
47 - from: "AI Agent"
48 to: "AI 智能体"
49 ja-zh:
50 - from: "人工知能"
51 to: "人工智能"
52```
53
54## Fields
55
56| Field | Type | Default | Description |
57|-------|------|---------|-------------|
58| `target_language` | string | `zh-CN` | Default target language code |
59| `default_mode` | string | `normal` | Default translation mode (`quick` / `normal` / `refined`) |
60| `audience` | string | `general` | Target reader profile (`general` / `technical` / `academic` / `business` / custom) |
61| `style` | string | `storytelling` | Translation style (`storytelling` / `formal` / `technical` / `literal` / `academic` / `business` / `humorous` / `conversational` / `elegant` / custom) |
62| `chunk_threshold` | number | `4000` | Word count threshold to trigger chunked translation |
63| `chunk_max_words` | number | `5000` | Max words per chunk |
64| `glossary` | array | `[]` | Universal glossary entries (inline) |
65| `glossary_files` | array | `[]` | External glossary file paths (absolute or relative to EXTEND.md) |
66| `glossaries` | object | `{}` | Language-pair specific glossary entries |
67
68## Glossary Entry
69
70| Field | Required | Description |
71|-------|----------|-------------|
72| `from` | yes | Source term |
73| `to` | yes | Target translation |
74| `note` | no | Usage note (e.g., "Keep English", "Only in tech context") |
75
76## Glossary File Format
77
78External glossary files (`glossary_files`) support two formats:
79
80**Markdown table** (`.md`):
81```markdown
82| from | to | note |
83|------|----|------|
84| Reinforcement Learning | 强化学习 | |
85| Transformer | Transformer | Keep English |
86```
87
88**YAML list** (`.yaml` / `.yml`):
89```yaml
90- from: "Reinforcement Learning"
91 to: "强化学习"
92- from: "Transformer"
93 to: "Transformer"
94 note: "Keep English"
95```
96
97Paths can be absolute or relative to the EXTEND.md file location.
98
99## Priority
100
1011. CLI `--glossary` file entries
1022. EXTEND.md `glossaries[pair]` entries
1033. EXTEND.md `glossary` entries (inline)
1044. EXTEND.md `glossary_files` entries (in listed order, later files override earlier)
1055. Built-in glossary (e.g., `references/glossary-en-zh.md`)
106
107Later entries override earlier ones for the same source term.

文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。