跳到主要内容

宝玉文章翻译与精校

收藏0

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

让 AI 安装

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

references/config/extend-schema.md

3.5 KB查看源码

EXTEND.md Schema for baoyu-translate#

Format#

EXTEND.md uses YAML format:

# Default target language (ISO code or common name)

target_language: zh-CN



# Default translation mode

default_mode: normal  # quick | normal | refined



# Target audience (affects annotation depth and register)

audience: general  # general | technical | academic | business | or custom string



# Translation style preference

style: storytelling  # storytelling | formal | technical | literal | academic | business | humorous | conversational | elegant | or custom string



# Word count threshold to trigger chunked translation

chunk_threshold: 4000



# Max words per chunk

chunk_max_words: 5000



# Custom glossary (merged with built-in glossary)

# CLI --glossary flag overrides these

# Supports inline entries and/or file paths

glossary:

  - from: "Reinforcement Learning"

    to: "强化学习"

  - from: "Transformer"

    to: "Transformer"

    note: "Keep English"



# Load glossary from external file(s)

# Supports absolute path or relative to EXTEND.md location

# File format: markdown table with | from | to | note | columns,

# or YAML list of {from, to, note} entries

glossary_files:

  - ./my-glossary.md

  - /path/to/shared-glossary.yaml



# Language-pair specific glossaries

glossaries:

  en-zh:

    - from: "AI Agent"

      to: "AI 智能体"

  ja-zh:

    - from: "人工知能"

      to: "人工智能"

Fields#

FieldTypeDefaultDescription
target_languagestringzh-CNDefault target language code
default_modestringnormalDefault translation mode (quick / normal / refined)
audiencestringgeneralTarget reader profile (general / technical / academic / business / custom)
stylestringstorytellingTranslation style (storytelling / formal / technical / literal / academic / business / humorous / conversational / elegant / custom)
chunk_thresholdnumber4000Word count threshold to trigger chunked translation
chunk_max_wordsnumber5000Max words per chunk
glossaryarray[]Universal glossary entries (inline)
glossary_filesarray[]External glossary file paths (absolute or relative to EXTEND.md)
glossariesobject{}Language-pair specific glossary entries

Glossary Entry#

FieldRequiredDescription
fromyesSource term
toyesTarget translation
notenoUsage note (e.g., "Keep English", "Only in tech context")

Glossary File Format#

External glossary files (glossary_files) support two formats:

Markdown table (.md):

| from | to | note |

|------|----|------|

| Reinforcement Learning | 强化学习 | |

| Transformer | Transformer | Keep English |

YAML list (.yaml / .yml):

- from: "Reinforcement Learning"

  to: "强化学习"

- from: "Transformer"

  to: "Transformer"

  note: "Keep English"

Paths can be absolute or relative to the EXTEND.md file location.

Priority#

  1. CLI --glossary file entries
  2. EXTEND.md glossaries[pair] entries
  3. EXTEND.md glossary entries (inline)
  4. EXTEND.md glossary_files entries (in listed order, later files override earlier)
  5. Built-in glossary (e.g., references/glossary-en-zh.md)

Later entries override earlier ones for the same source term.

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