Commit cbddee7
authored
Add consistency report and project glossary (#82)
A real-world deployment study [1] reported mainland-Chinese terms
slipping past the linter in published zh-TW articles, blockquote
citation contexts producing ~50 false positives across a 72-article
corpus, and ASCII quotes auto-converted to 「」 inside YAML
frontmatter breaking downstream parsers.
User-facing additions:
- '--consistency' reports mixed regional usage of one concept (both
線程 and 執行緒 in the same document). Groups by the rule's "english"
anchor; skips TM-suppressed terms.
- '--exempt-blockquotes' (CLI + '[markdown]' config) excludes
pulldown-cmark 'Tag::BlockQuote' ranges from scanning. Off by default:
adopted blockquote prose is real content.
- YAML frontmatter preserves ASCII '"' / ''' scalar delimiters.
Body prose still converts to 「」.
- '[glossary]' section in '.zhtw-mcp.toml': banned / preferred /
proper_nouns lists. Banned terms inject synthetic Errors that TM
cannot downgrade; proper_nouns suppress matching issues; both honor
exclusion zones.
- Per-rule 'editorial_confidence' (low / medium / high) flows through
issue inflation into MCP explain output. Low forces
auto_fix_safe = false and needs_review = true. 優化, 算法, 場景
tagged low because both regional forms are valid zh-TW.
Calque-audit refinements:
- 消息 gains positional_clues; 好消息 / 壞消息 / 消息來源 no longer
fire.
- Symmetric 元資料 rule mirrors 元數據 — both use to: [] plus english:
"metadata", surfacing the English original as the preferred form.
詮釋資料 and 後設資料 (NAER terminology bank) remain unflagged as
acceptable zh-TW alternatives.
- Real-world regression fixture pins the 14 documented blind-spot terms.
[1] https://ai-muninn.com/zh-TW/blog/zhtw-mcp-calque-blindspot-sweep30 files changed
Lines changed: 2384 additions & 72 deletions
File tree
- assets
- benches
- scripts
- src
- engine
- scan
- mcp
- rules
- tests
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
| 1270 | + | |
| 1271 | + | |
1271 | 1272 | | |
1272 | 1273 | | |
1273 | 1274 | | |
| |||
1302 | 1303 | | |
1303 | 1304 | | |
1304 | 1305 | | |
1305 | | - | |
| 1306 | + | |
1306 | 1307 | | |
1307 | 1308 | | |
1308 | 1309 | | |
| |||
1319 | 1320 | | |
1320 | 1321 | | |
1321 | 1322 | | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1322 | 1330 | | |
1323 | 1331 | | |
1324 | 1332 | | |
| |||
3489 | 3497 | | |
3490 | 3498 | | |
3491 | 3499 | | |
3492 | | - | |
| 3500 | + | |
| 3501 | + | |
3493 | 3502 | | |
3494 | 3503 | | |
3495 | 3504 | | |
| |||
7416 | 7425 | | |
7417 | 7426 | | |
7418 | 7427 | | |
7419 | | - | |
7420 | | - | |
| 7428 | + | |
| 7429 | + | |
| 7430 | + | |
7421 | 7431 | | |
7422 | 7432 | | |
7423 | 7433 | | |
| |||
9097 | 9107 | | |
9098 | 9108 | | |
9099 | 9109 | | |
9100 | | - | |
| 9110 | + | |
| 9111 | + | |
9101 | 9112 | | |
9102 | 9113 | | |
9103 | 9114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
420 | 424 | | |
421 | 425 | | |
422 | 426 | | |
| 427 | + | |
423 | 428 | | |
424 | 429 | | |
425 | 430 | | |
| |||
433 | 438 | | |
434 | 439 | | |
435 | 440 | | |
| 441 | + | |
436 | 442 | | |
437 | 443 | | |
438 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
29 | 61 | | |
30 | 62 | | |
31 | 63 | | |
| |||
0 commit comments