word-aligner

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

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
100%
命名品質
100%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,432Token(工具定義)
~11.3 KB典型回應大小
中等的注意力影響(128k 上下文的 1.12%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "word-aligner": {
      "url": "https://aligner.tinygods.dev/mcp"
    }
  }
}

遠端端點

https://aligner.tinygods.dev/mcpstreamable-http

它能做什麼

工具清單

工具(1)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢create_word_alignment(lines, alignments, settings, pairs)

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 does before assigning indices: - Whitespace always splits ("I have been going" -> I[0] have[1] been[2] going[3]). - The characters in settings.tokenSplitChars (default ".-|") also split and are then removed from the rendered text, so "go.PST.IPFV" becomes three tokens (go, PST, IPFV) and the dots disappear. For Leipzig glosses set tokenSplitChars to "-|" to keep the dots. - Punctuation stays attached by default ("Hello, world!" -> Hello,[0] world![1]). - In RTL lines, word 0 is the logically first word (rightmost on screen); index in reading order. - Japanese and Chinese are written without spaces and nothing is segmented for you: put spaces where the alignment units should be. For a vertically written script set settings.axis to "columns". Every line then becomes a vertical column and the connectors run sideways. Set orientation per line: "vertical" stacks the characters (Japanese, Chinese), "sideways" rotates the line a quarter turn (traditional Mongolian, and Latin runs inside vertical text), "upright" leaves a translation as horizontal word boxes. The first line is the leftmost column, so for Japanese and Chinese, whose columns read right to left, list the translation first and the script second. Each alignment is [lineA, wordA, lineB, wordB]; the two lines must be neighbours in the stack (|lineA - lineB| = 1), which means one above the other in rows and side by side in columns. To express many-to-one, list each target word as its own tuple. Tokens that share a connection group get the same color automatically.

輸入結構描述

{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "items": {
        "oneOf": [
          {
            "type": "string",
            "description": "Plain line text (shorthand)."
          },
          {
            "type": "object",
            "required": [
              "text"
            ],
            "additionalProperties": false,
            "properties": {
              "text": {
                "type": "string",
                "description": "Line text."
              },
              "font": {
                "type": "string",
                "description": "Google Fonts family name (e.g. \"Noto Sans Hebrew\"). Defaults to Inter."
              },
              "sizePx": {
                "type": "integer",
                "minimum": 12,
                "maximum": 64,
                "description": "Text size in px. Default 36."
              },
              "gapPx": {
                "type": "integer",
                "minimum": 0,
                "maximum": 56,
                "description": "Horizontal gap between word tokens in px. Default 14."
              },
              "rtl": {
                "type": "boolean",
                "description": "Right-to-left layout (Hebrew, Arabic, ...). Default false."
              },
              "orientation": {
                "type": "string",
                "enum": [
                  "upright",
                  "vertical",
                  "sideways"
                ],
                "description": "How this line's glyphs are set, visible with settings.axis \"columns\". \"vertical\" stacks characters (Japanese, Chinese), \"sideways\" rotates the line (Mongolian). Default \"upright\"."
              }
            }
          }
        ]
      },
      "description": "Text lines, top to bottom. Each entry is a plain string or an object with per-line visual options."
    },
    "alignments": {
      "type": "array",
      "description": "Word-alignment links as [lineA, wordA, lineB, wordB] (0-based indices, lines must be adjacent).",
      "items": {
        "type": "array",
        "minItems": 4,
        "maxItems": 4,
        "items": {
          "type": "integer"
        }
      }
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "description": "Global visual overrides. Unset fields inherit defaults.",
      "properties": {
        "axis": {
          "type": "string",
          "enum": [
            "rows",
            "columns"
          ],
          "description": "Flow direction of the diagram. \"rows\" (default) stacks lines downward with vertical connectors. \"columns\" stands each line up as a vertical column with sideways connectors, for Japanese, Chinese, and Mongolian; the first line is the leftmost column."
        },
        "palette": {
          "type": "string",
          "enum": [
            "pastel",
            "vivid"
          ],
          "description": "Connection color palette. Default pastel."
        },
        "lineStyle": {
          "type": "string",
          "enum": [
            "straight",
            "curved"
          ],
          "description": "Connection line shape. Default curved."
        },
        "lineThickness": {
          "type": "number",
          "minimum": 1,
          "maximum": 8,
          "description": "Connection line thickness. Default 3."
        },
        "lineOpacity": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 1,
          "description": "Connection line opacity. Default 1."
        },
        "background": {
          "type": "string",
          "enum": [
            "light",
            "dark"
          ],
          "description": "Preview background. Default light."
        },
        "theme": {
          "type": "string",
          "enum": [
            "light",
            "dark"
          ],
          "description": "UI theme (token chip color). Default light."
        },
        "showNumbers": {
          "type": "boolean",
          "description": "Show line numbers. Default false."
        },
        "colorTokensByLink": {
          "type": "boolean",
          "description": "Tint word tokens in their connection color. Default true."
        },
        "tokenSplitChars": {
          "type": "string",
          "description": "Characters (besides whitespace) that split text into tokens and are then removed. Default \".-|\". Set \"-|\" to keep periods in Leipzig glosses."
        },
        "tokenMergeChar": {
          "type": "string",
          "maxLength": 1,
          "description": "Single char that joins parts into one token rendered with a space (e.g. \"is+playing\"). Default \"+\"."
        }
      }
    },
    "pairs": {
      "type": "array",
      "description": "Per-pair controls for a specific adjacent line pair.",
      "items": {
        "type": "object",
        "required": [
          "upper",
          "lower"
        ],
        "additionalProperties": false,
        "properties": {
          "upper": {
            "type": "integer",
            "description": "0-based index of the upper line."
          },
          "lower": {
            "type": "integer",
            "description": "0-based index of the lower line (must equal upper + 1)."
          },
          "gapPx": {
            "type": "integer",
            "minimum": 12,
            "maximum": 156,
            "description": "Vertical gap between the two lines in px. Default 120."
          },
          "showConnectors": {
            "type": "boolean",
            "description": "Draw connectors between this pair. Default true."
          }
        }
      }
    }
  },
  "required": [
    "lines"
  ],
  "additionalProperties": false
}

輸出結構描述

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The shareable diagram URL. Return this to the user exactly as received, character for character."
    }
  },
  "required": [
    "url"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本1 個工具
已驗證未記錄版本1 個工具