txt-zh-bilingual
Translate English .txt files into Chinese and produce sentence-aligned bilingual JSON with merging of short English sentences. Use when asked to batch-convert text files into [{"en","zh"}] arrays, split/merge sentences, or generate JSON alongside original .txt files.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Txt Zh Bilingual
Overview
Convert English .txt files into bilingual JSON arrays, with sentence splitting, merging of short English sentences, and Chinese translation for each aligned segment.
Workflow
1. Translate the full text first (AI-guided)
Read the entire .txt file and produce a coherent, natural Chinese translation of the full content. Fix line breaks, captions, or fragmentary lines in Chinese so the narrative flows.
Guidelines:
- Preserve tone, pacing, and speaker intent.
- Keep technical terms and product names consistent.
- Do not force sentence-by-sentence alignment at this stage.
2. Build English sentence segments
Reconstruct complete English sentences from the raw lines. Merge broken fragments and normalize punctuation.
Guidelines:
- Merge fragments split by newlines into complete sentences when they belong together.
- Preserve intentional short lines only when they are standalone utterances (e.g., sound cues, one-word reactions, quoted asides).
- If a line is obviously a continuation (starts with conjunctions like "and", "but", "so", or lowercase), merge it into the previous segment.
- If punctuation is missing but the meaning clearly continues, merge until the thought completes.
- Keep each
ensegment concise; split long sentences if they become unwieldy for listening practice.
3. Align Chinese to English segments
Split the full Chinese translation from Step 1 into segments that align with the English sentences from Step 2. Each zh entry should map cleanly to the corresponding en entry for listen-then-translate practice.
Alignment rules:
- One
ensentence maps to onezhsentence/segment. - If one English sentence requires multiple Chinese clauses, keep them within the same
zhentry. - Avoid mixing content from different English sentences into one
zhentry. - Prefer natural Chinese phrasing over word-for-word mapping, but keep information coverage aligned.
4. Validate output format
Ensure the JSON is an array of objects like:
[
{"en": "Example sentence.", "zh": "示例句子。"}
]
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!