word-aligner

v1.0.0
io.github.tinygodsdev/word-aligner Checked 2 days ago Published 5 months ago

Turn a phrase and its translation into a shareable word-alignment diagram.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_word_alignment Create word alignment diagram

Create a shareable Word Aligner diagram that shows which words match across two or more stacked lines of text (a translation and its source, an interlinear gloss, IPA, etc.). Returns a URL that opens the interactive diagram, plus a preview image. Use this when the user wants to translate a phrase and show word correspondences, align a translation with its source (including RTL scripts like Hebrew or Arabic, or vertically written ones like Japanese and Mongolian), or build a Leipzig-style interlinear gloss. Word indices are 0-based token positions. Tokenize each line the same way the tool doe…

ParameterTypeDescription
lines *arrayText lines, top to bottom. Each entry is a plain string or an object with per-line visual options.
alignmentsarrayWord-alignment links as [lineA, wordA, lineB, wordB] (0-based indices, lines must be adjacent).
pairsarrayPer-pair controls for a specific adjacent line pair.
settingsobjectGlobal visual overrides. Unset fields inherit defaults.