Token导航 LogoToken导航TokenDH.com
Product Name Normalizer logo
运维云端stdio官方级别未说明来源级核验

Product Name Normalizer

MCP Server

一个基于字典驱动的产品/工具名称规范化工具,用于修正AI生成文本中的错误拼写。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude文本处理ClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

serejaris

提供方

serejaris

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run pytest

详细介绍

product-name-normalizer

Коротко: Рабочий репозиторий: Dictionary-driven product/tool name normalization for AI text (Python + MCP server).

Что здесь

  • Назначение: Рабочий репозиторий: Dictionary-driven product/tool name normalization for AI text (Python + MCP server).
  • Основной стек: Python.
  • Видимость: публичный репозиторий.
  • Статус: активный репозиторий; актуальность проверять по issues и последним коммитам.

Где смотреть работу

  • Задачи и текущие решения: GitHub Issues этого репозитория.
  • Код и материалы: файлы в корне и профильные папки проекта.
  • Связь с HQ: если проект влияет на продукт, контент или воронку, сверяйте канон в 0_hq и репозитории-владельце.

Для агентов

  • Сначала прочитайте этот README и открытые issues.
  • Не переносите сюда канон соседних проектов без ссылки на источник.
  • Перед правками проверьте существующие scripts, package.json/pyproject и локальные инструкции.

Исходный README

product-name-normalizer

Local (user-scope) normalization of product/tool names for AI-generated text.

This exists because LLMs (and chat participants) routinely misspell tool names and the mistakes propagate into digests/posts: Cloudcode -> Claude Code, Antygravity -> Antigravity, Wisprflow -> Wispr Flow, etc.

The goal is to make this a single, reusable component:

  • as a Python module (stdlib-only at import time)
  • as a user-scope MCP server (for Claude Code / skills / other MCP clients)

Context / Why

In tg-digest-opus the digest for 2026-02-08 was produced with incorrect product names. Fixing this *inside prompts* is fragile; it keeps leaking in from:

  • raw chat messages (people write names wrong)
  • LLM completions (the model "learns" the wrong spelling from context)

So the fix is centralized and deterministic: a dictionary-driven normalizer that any consumer can call.

Python usage (zero deps)

from term_fixer import fix_terms

text = fix_terms("Cloudcode vs Cursor")

Dictionary is stored in data/product-terms.json (override with TERM_FIXER_TERMS_PATH).

Dictionary format

product-terms.json is a JSON map:

{
  "Claude Code": ["Cloudcode", "ClaudeCode"],
  "Antigravity": ["Antygravity", "Anti-gravity"]
}

Add / extend a term

from term_fixer import add_term

add_term("Claude Code", ["Cloudcode", "ClaudeCode"])

Or edit data/product-terms.json manually (it is a simple JSON map).

How It Works

  • Dictionary format: { "Correct Name": ["wrong1", "wrong2"] }
  • Replacements: case-insensitive regex with word boundaries (\\b...\\b)
  • HTML safety: it avoids touching tag/attribute content by only rewriting *text segments* outside ``
  • It applies longest variants first to reduce partial-overlap issues.
  • Compiled regex rules are cached and invalidated automatically when product-terms.json changes (mtime-based).

Files In This Repo

  • term_fixer.py: stdlib-only core + MCP entrypoint
  • data/product-terms.json: the dictionary used by default
  • scripts/smoke_mcp.py: end-to-end MCP smoke test

Non-goals (for now):

  • fuzzy matching / spelling suggestions
  • language-aware morphology

MCP server (Claude Code)

Run locally via stdio:

uv -q --directory ~/Documents/GitHub/product-name-normalizer run term_fixer.py

Add to Claude Code (user scope):

claude mcp add product-name-normalizer -s user -- uv -q --directory ~/Documents/GitHub/product-name-normalizer run term_fixer.py

Tools:

  • fix_terms(text: str) -> str
  • add_term(correct: str, wrong_variants: list[str]) -> str

Integration (tg-digest-opus)

tg-digest-opus loads this repo in best-effort mode (no hard dependency).

  • Default lookup path: ~/Documents/GitHub/product-name-normalizer
  • Override: set TERM_FIXER_REPO=/path/to/product-name-normalizer

Development

Run tests:

uv run pytest

Smoke test MCP (spawns the server and calls tools over stdio):

uv run python scripts/smoke_mcp.py

目录标签

目录标签

PythonClaude文本处理名称规范化本地部署AI辅助工具拼写修正

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP