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 个工具