Skip to content

Improve the context for names and genders #7

Closed

Description

@kafeg

Hi! First of all, your skill is awesome! I translated a required book and read it full.

But there a few problems what I found, both related to the independent chunks:

  • from chunk to chunk the names of the people could be different, like Tai, Taig, Taighi, Taiger etc. If in original the name is Taighi then for e.g. in russian translation it will have not stable translation
  • gender in some chunks can be male/female randomly, because of from the context of one chunk is not clear to Claude how to translate correctly.

May I ask you please to somehow fix those problems in new versions of the skill? Maybe it could be solved by creating shared short context of the original book which could be used for all chunks. Or maybe it could be solved on validation step.

Would be nice for e.g. to check the final result to be more organic. Thanks!

Activity

  1. neoOpus commented on Apr 20, 2026

    @neoOpus

    That's the first thing that came to my mind, as it is obvious that this is going to be a problem the way this project does things... The sub-agents must share some kind of information, and the whole project must have a shared knowledge base; otherwise, the translation quality will suffer. It shouldn't be doing this in a sort of batch processing that every simple script can do, but by doing things intelligently and having an oversight AI that orchestrates the operations between agents by providing them with the proper instructions on how to proceed, while it gathers the most relevant data from the chunks to put in a .md or DB, that distills some of the important information, like characters, events, locations, etc. but since it is not just about literature, then it must be versatile enough to extract other relevant information too and have it shared between all the agents for them to use and do their job properly. And it keeps enriching the database over time and altering, correcting, and improving its contents, and when something that was mis-translated earlier, it must be acknowledged and assigned to another agent so they could fix it.

  2. deusyu commented on Apr 21, 2026

    @deusyu
    Owner

    Thanks, this is a valid issue.

    You are right that the current chunk-by-chunk translation can cause:

    • inconsistent name translation
    • wrong gender/pronoun decisions when local context is not enough

    I am currently working on the first part with a glossary-based consistency pass. The second part will likely need a small shared context layer for each chunk.

    If you are OK sharing it, could you tell me which book this happened on, and the source language -> target language pair? That would help me reproduce and test the fix on a real example.

    If you prefer not to share the book publicly, a small excerpt with the problematic cases would also be useful.

  3. deusyu commented on Apr 23, 2026

    @deusyu
    Owner

    Quick update — Phase 1 (cross-chunk term consistency, addressing the "Tai / Taig / Taighi / Taiger" drift) is now on main. Sub-agents emit per-chunk meta files; scripts/merge_meta.py merges them per batch with conservative alias/confidence rules, and the next batch translates against the updated glossary.

    I added a regression baseline (tests/baselines/diligent-dick, commit ccf3330) where Dick / Richard / Stuart co-occur across ~9 chunks — same shape as your case. If you can re-translate your original book on main at ccf3330+ and tell me whether the names converge by batch 2, that would be very useful.

    The pronoun/gender half of your report is not yet fixed — it's Phase 2 (inject neighbor-chunk excerpts as read-only context). If you have one chunk-pair where it bounced, sharing it would directly inform the design.

  4. neoOpus commented on Apr 25, 2026

    @neoOpus

    maybe opting to translate them to Phonetics then from Phonetics to any language, this will ensure better quality and higher consistency than relying one whatever the model decides to translate names to... Just a thought!

  5. deusyu commented on Apr 27, 2026

    @deusyu
    Owner

    Thanks for sticking with this.

    The instinct behind the IPA idea — wanting a deterministic mapping so the model can't invent new spellings on its own — is the right instinct. But I don't think IPA itself delivers on that:

    • Source → IPA is itself ambiguous. Read is /riːd/ or /rɛd/, Worcester is /ˈwʊstər/. Disambiguating pronunciation needs context, so it just moves the failure to a new place.
    • IPA → target has no canonical table. Whether /ʃ/ becomes "夏" or "舍" in Chinese is a translator judgment, not a lookup.
    • Convention beats phonetics. Holmes is /hoʊmz/, but Chinese has long settled on "福尔摩斯" (a 19th-century Fujianese transliteration). A phonetics-first pipeline would lose all such established renderings.
    • Latin → Latin doesn't transliterate at all. Sherlock Holmes stays Sherlock Holmes in French/German/Spanish translations — no conversion step exists to standardize.

    And the drift you originally reported isn't really caused by transliteration quality — it's caused by sub-agents making independent naming decisions in isolation. Phase 1's shared glossary addresses that directly.

    That said, your first comment is still very much on point. The "oversight AI gathering shared knowledge into a DB" framing is exactly where Phase 2 is heading. Two variants I'm weighing:

    1. Read-through cache (lighter) — inject neighbor-chunk excerpts + current glossary into each sub-agent's prompt. Fixes pronoun/gender ambiguity by surfacing local context.
    2. Pre-translation NER pass (stronger) — an oversight pass scans the whole book first, extracts characters/places/recurring terms, and freezes the glossary. Sub-agents then translate against read-only shared state. Drift dies at the source, but it costs one extra full-book pass.

    If you have a preference based on your use case — or that pronoun-bouncing chunk-pair from your original book — it would directly shape which path is worth the engineering cost.

  6. neoOpus commented on Apr 28, 2026

    @neoOpus

    Convention beats phonetics

    You're absolutely right about everything you just said. And it applies to every language that I know about. I couldn't have said it better.

  7. deusyu commented on May 23, 2026

    @deusyu
    Owner

    Update: the main parts of this issue are now implemented on main.

    What shipped:

    • Phase 1: shared glossary + per-chunk sub-agent meta feedback for cross-chunk name/term consistency.
    • Phase 2: scripts/chunk_context.py injects read-only previous/next chunk excerpts into each translator prompt for pronoun, gender, and entity-resolution context.
    • Phase 3: scripts/run_state.py tracks which glossary/entity state each chunk used, so glossary changes can selectively re-translate only affected chunks instead of redoing the whole book.

    I also tested this with the checked-in Sleepy Hollow baseline and the full unit suite (205 tests OK, skipped=3).

    I am keeping this issue open for now because the remaining part is real-book validation: whether the final translated result feels more organic on books that previously showed name or gender drift. If you can re-run your original book on current main (52fb0fd or later) and share whether the drift is gone, that would be the best signal for whether this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions