Lexaudit

io.github.nareyko由 GitHub 账号 nareyko 发布v0.3.1更新于 Nov 7, 2026

Locale vocabulary audit (calques, inventeds, foreign slips). Local CLI via stdio — no hosted API.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

本地 stdio MCP 服务器,封装 lexaudit 多语言用词审计工具,标记仿译词、假朋友和生造词,并排出优先修改的页面。

可以做什么
  • 审计单个文件或整个项目,在七种语言中找出怪异、错误或从其他语言照搬的词汇,并给出按优先级排序的页面清单
  • 解释某个词为何被标记,包括状态、原因和编辑建议
  • 按权重或来源重新排序页面,并把某个已知问题词扩展成受影响页面的待办清单
  • 对比两次审计结果,可选地通过你自己的端点让语言模型给出第二意见
  • 只做报告,不会修改你的文本
适用场景
适合用英语、德语、西班牙语、波兰语、俄语、瑞典语或乌克兰语撰写或翻译文章、课程、文档的人,希望得到一份简短的优先排查词表,而不是被普通拼写检查的大量误报淹没。
运行要求
通过 uvx(或 pipx)从 PyPI 包 lexaudit 以本地进程运行。仅需 CPU,无需账号、API 密钥或配置文件。拼写词典会自动下载到用户缓存,因此该步骤需要网络访问。
安装前请注意
它只报告、不修改文本,但部分命令会写文件:报告写入输出目录,expand-needle 可在你指定的路径写入队列文件。可选的 label 命令会把文本发送到你提供的语言模型端点。干净页面上被标记的词数量可能不少。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Lexaudit,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

lexaudit

Finds odd, wrong or copied-from-another-language words in your texts, and tells you which pages to fix first.

In plain words

You write or translate articles, courses or documentation. A normal spellchecker shouts about every brand name, abbreviation and long German word, and still misses the words that really hurt: a word copied from another language ("calque"), a real word used with the wrong meaning ("false friend"), or a word someone invented.

lexaudit reads your files, ignores the harmless things, and gives you a short ranked list: "look at this page first." It runs on an ordinary laptop in about a second. No graphics card, no internet, no account.

It only reports. It never changes your texts.

Unknown terms? See the glossary.
0.3.0 prep and publish path: docs/p1-INDEX.md.

  • Languages: English (en), German (de), Spanish (es), Polish (pl), Russian (ru), Swedish (sv), Ukrainian (uk)
  • Hardware: CPU only
  • Author: Vadim Nareyko (github.com/nareyko, Founder at Arviser Sp. z o.o.)
  • License: dual MIT package and AGPL-3.0-or-later hosted SaaS (details)

[How lexaudit works]


Try it in 30 seconds

bash
pipx run lexaudit audit --path . --locale en --check# or: uvx lexaudit audit --path . --locale en --check

Missing spelling dictionaries download automatically into your user cache. No GPU. No config file required. Exit code 1 means confirmed calques or invented words remain.

Optional helpers: lexaudit doctor, lexaudit fetch-dicts, lexaudit init.

Check a file or a whole project

bash
# One file or folder, no settings file neededuv run lexaudit audit --path ./README.md --locale en
# Or create starter settings first, then check everythinguv run lexaudit inituv run lexaudit audit --locale en

Open the report

The reports are in the output folder, one subfolder per language. Start with queue.md:

markdown
| score | unique_suspects | path | top_words ||---|---|---|---|| 12.0 | 2 | docs/en/en-04-defect-known-calques.md | orientir surveyness || 6.0 | 1 | docs/en/en-05-defect-false-friend.md | denseness || 1.6 | 2 | docs/en/en-03-clean-unseen-jargon.md | vinylester haulout |

A higher score means "look here first". top_words shows the words behind the score.

Ask why a word was flagged

bash
uv run lexaudit explain orientir --locale en
text
word: orientir (normalized: orientir, locale: en)status: calque (tier: confirmed)reason: loan-calque-orientir | detectors: calque, hunspelleditorial hint: working rule / ballpark / figures - not orientir

Reproduce our test results

bash
uv run lexaudit audit --config examples/synthetic-demo/lexaudit.config.yaml

Then open tmp/synthetic-demo-out/<language>/queue.md.


How good is it? An honest answer

We built a 42-page test set in all 7 languages: 21 clean technical pages and 21 pages with planted problems. Some problems are known to the rules, some are brand new words the rules have never seen. Details: docs/synthetic-benchmark.md.

[Benchmark results]

SetupBad page in top 2Bad page in top 3Recall@2Recall@3MAP (0 to 1, higher is better)Known problems foundBrand-new neologisms foundCombined planted problemsClean-page FP / 1k tokensTime
A. Plain spellchecker0.0%23.8%0.0%23.8%0.3890.0% (0/26)0.0% (0/7)0.0% (0/33)81.20.48 s
B. Plus your word lists7.1%23.8%4.8%23.8%0.4210.0% (0/26)0.0% (0/7)0.0% (0/33)47.10.56 s
C. Full lexaudit100.0%100.0%66.7%100.0%1.000100.0% (26/26)100.0% (7/7)100.0% (33/33)47.12.97 s

What this means:

  • Pages with known problems come first in every language. The plain spellchecker puts clean pages first.
  • Known-rule problems: 100.0% (26/26). Unseen single-occurrence neologisms (Zipf + char n-gram / affix-glue): 100.0% (7/7). Combined planted problems (honest fraction): 100.0% (33/33).
  • With exactly 3 defective pages per locale, Recall@2 is 66.7% when the top-2 slots are both bad (Precision@2 = 100.0%). Precision@3 / Recall@3 are 100.0% (singleton inventeds outrank repeated domain jargon).
  • Clean-page false positives: 47.1 unique flagged words per 1000 tokens (36 unique FP / 764 tokens).
  • Domain terms that recur on a page (or sit in H1/title) are tagged domain-term-candidate, nearly zero-weighted in ranking, and listed under Suggested glossary additions.

Documentation

Start with docs/README.md.

GuideWhat you learn
GlossaryEvery term in plain words
BenchmarkThe 42-page test, step by step
ArchitectureWhat goes in, what comes out
PipelineThe gates every word passes
CLI referenceAll commands
Agent workflowFrom report to fixed page
Scores and metricsHow pages are scored

[Word classification ladder]


More commands

bash
# Re-rank pages, filter by source (docs, academy, model_pack)uv run lexaudit rank --locale ru --mode weighted --sources=docs
# Add every page that contains a known bad word to your to-do listuv run lexaudit expand-needle --needle orientir --locale all \  --write-queue /abs/path/to/rewrite-queue.md
# Optional: ask a language model for a second opinion (your own endpoint)uv run lexaudit label --locale ru --top-pages 20 --top-words 50 --tiers likely,weak --profile cpu
# Compare two runsuv run lexaudit diff --baseline .../report.json --current .../report.json --out /tmp/diff.json

For contributors

Setup and checks:

bash
uv sync --extra devuv run ruff check . && uv run ruff format --check .uv run mypy --strict src/uv run pytestuv run python scripts/crap_report.pyuv run mutmut run && uv run python scripts/check_mutation_score.py --min-percent 80uv build

Test layers: unit and integration tests (branch coverage 80% or more), the 7-language benchmark, property-based fuzzing (Hypothesis), golden regression with a read-only check of your files, JSON Schema contract, complexity gate (CRAP), mutation testing (kill rate 80% or more).

Pictures in docs/images are generated from code: run python scripts/render_diagrams.py (needs Inkscape and Pillow). Never edit the JPG files by hand.

License

WhatLicense
PyPI / this repo’s code (CLI, library, YAML rules, packs)MIT — use in products and private SaaS is fine under MIT
Intended future hosted multi-tenant network service (not shipped here)Policy text: AGPL-3.0-or-later — not a second license on the MIT wheel
Benchmark corpora & fetched spelling dictionariesLICENSE-THIRD-PARTY.md + upstream *.license.txt

Full wording: docs/licensing.md. Adding rules: docs/contributing-rules.md.

Origin and author

Created and maintained by Vadim Nareyko (github.com/nareyko). It grew out of auditing multilingual courses and encyclopedias at FairHelm.

来源:README.md,提交 86a0130

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

1
  1. v0.3.1最新Oct 30, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分