github-actions[bot] commited on
Commit
ffee483
Β·
1 Parent(s): 5b7cd5f

deploy: switch to chatterbox requirements @ c80cad4

Browse files
Files changed (1) hide show
  1. steps/s3_translate.py +12 -10
steps/s3_translate.py CHANGED
@@ -29,8 +29,9 @@ def _translate_batch(segments: list[dict], target_language: str) -> list[dict]:
29
  f"Numbered lines with a spoken duration in brackets, e.g.: 1. [4.6s] Hello there\n\n"
30
 
31
  f"OUTPUT FORMAT:\n"
32
- f"A JSON array of strings β€” one per input line, in order. No numbering, no brackets, no extra text.\n"
33
- f'Example: ["ΒΏQuΓ© tal?", "AdiΓ³s"]\n\n'
 
34
 
35
  f"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"
36
  f"SCORING RUBRIC β€” evaluate every line against these before outputting:\n"
@@ -61,17 +62,18 @@ def _translate_batch(segments: list[dict], target_language: str) -> list[dict]:
61
  f" βœ“ Pass: the emotional texture is preserved even if the words are completely different\n\n"
62
 
63
  f"[5] TRANSLATION PURITY β€” weight: MEDIUM\n"
64
- f" Zero English words in the output. None.\n"
65
- f" This includes: filler words (Oh, Hmm, Well, So, Right), names used as exclamations, "
66
- f"brand-style interjections. Find the {target_language} equivalent every time.\n"
67
- f" βœ— Fail: 'Oh, lo siento' / 'Hmm, je ne sais pas'\n"
68
- f" βœ“ Pass: 'Ay, lo siento' / 'Eh bien, je ne sais pas'\n\n"
69
 
70
  f"[6] WORD-FOR-WORD TRAP β€” weight: HIGH (avoid this)\n"
71
  f" Do NOT translate word by word. No one speaks that way.\n"
72
- f" βœ— Fail (Spanish): 'Ella encontrΓ³ a su esposo verdadero en su tercer matrimonio a los 40 aΓ±os'\n"
73
- f" βœ“ Pass (Spanish): 'A los 40, en su tercer intento, encontrΓ³ al amor de su vida'\n"
74
- f" Restructure freely. The target language has its own natural word order β€” use it.\n\n"
 
75
 
76
  f"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"
77
  f"BEFORE RETURNING OUTPUT:\n"
 
29
  f"Numbered lines with a spoken duration in brackets, e.g.: 1. [4.6s] Hello there\n\n"
30
 
31
  f"OUTPUT FORMAT:\n"
32
+ f"A JSON array of {target_language} strings β€” one per input line, in order. "
33
+ f"No numbering, no brackets, no extra text.\n"
34
+ f'Shape: ["<first line translated into {target_language}>", "<second line translated into {target_language}>"]\n\n'
35
 
36
  f"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"
37
  f"SCORING RUBRIC β€” evaluate every line against these before outputting:\n"
 
62
  f" βœ“ Pass: the emotional texture is preserved even if the words are completely different\n\n"
63
 
64
  f"[5] TRANSLATION PURITY β€” weight: MEDIUM\n"
65
+ f" Every word in the output must be {target_language}. No words from the original "
66
+ f"language should leak through.\n"
67
+ f" This includes: filler words (Oh, Hmm, Well, So, Right when not native to "
68
+ f"{target_language}), names used as exclamations, brand-style interjections. "
69
+ f"Find the {target_language} equivalent every time.\n\n"
70
 
71
  f"[6] WORD-FOR-WORD TRAP β€” weight: HIGH (avoid this)\n"
72
  f" Do NOT translate word by word. No one speaks that way.\n"
73
+ f" βœ— Fail: a literal one-to-one rendering that preserves the source word order\n"
74
+ f" βœ“ Pass: a restructured line that reads naturally in {target_language} "
75
+ f"while keeping the same meaning\n"
76
+ f" Restructure freely. {target_language} has its own natural word order β€” use it.\n\n"
77
 
78
  f"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n"
79
  f"BEFORE RETURNING OUTPUT:\n"