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 分