mirror of
https://github.com/joeseesun/subcast.git
synced 2026-12-06 01:40:26 +08:00
- subtitleText.ts (pure, tested with node): tidyLine drops punctuation at a line's start, ends lines only on ?!, turns ,。 inside a Chinese line into a space and drops unpaired quotes; splitCjk breaks only between words (Intl.Segmenter), preferring punctuation, never before a particle or 里, after a preposition, or between a numeral and its measure word. - Bilingual cues no longer split the translation by length: the model splits both languages together (kept only when both stay whole), else sentence pairs, else the whole segment wraps to two lines; only overlong pairs split by length, the CJK side leading and the other side cut between words in proportion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>