Find link/formatting mark boundaries in translations by fuzzy word alignment.
Weight-ratio mapping alone was routinely off by a word and could glue a mark to its neighbor (losing the space between). Now each mark's source words are aligned to the translation's words by form similarity (sequence ratio + shared prefix, case-folded, capitalization bonus) with cheap skip penalties, so inflection, dropped articles/prepositions and reordering don't break the match; slices are cut exactly at word boundaries. Alignments without an anchor pair fall back to the weight ratio (still the CJK path).
This commit is contained in:
+17
-8
@@ -415,14 +415,23 @@ formatting syntax into the translated block. The boundaries are found by
|
||||
**text processing alone** —
|
||||
markers on the wire are hopeless (an earlier sentinel-masking design let
|
||||
the model see and mangle exactly that punctuation: Seed-X renumbered the
|
||||
tokens and turned `` or `**`. Blocks mixing in any other inline
|
||||
|
||||
Reference in New Issue
Block a user