Files
csh bd25835d2d 🗑️ remove(test): drop skill regression suites
- delete the gitea-fix-ci credential suite (13 cases covering secret
  redaction, cross-origin redirect refusal and header injection); the
  script keeps those behaviours but nothing guards them now
- stop pointing at the tsl-syntax lookup recall suite from data/README.md:
  that suite was never committed and is now deleted, leaving --check as the
  only guard for lexicon/page correspondence
2026-07-29 15:45:49 +08:00

34 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 检索词表(lexicon.json
`lexicon.json``scripts/lookup.py` 的策展检索数据,与引擎逻辑分离维护。
两张表都只影响检索,不是事实正文。
## query_synonyms —— 口语同义词
中文口语词 → TSL 术语的展开(如「打印」→ 输出 / writeLn)。策展纪律:
- 同义词必须落在**目标章节已有的词面**上,否则不产生区分度。用户说的词在
参考页正文里出现 0 次时,页级 alias 只能把整页抬起来,页内仍需要词法
信号才能选中正确章节——节级词汇桥(如「交集」→ `intersect`)补的就是
这一层。
- 不要展开成泛化的中文概念词(如「集合运算」会命中别页交叉引用小节标题)。
## page_intent_aliases —— 页级意图短语
整句口语短语 → 参考页文件名的路由(命中一条 +80 分,是页级路由的唯一强
信号)。约束:
- 键必须与 `references/` 下的文件名完全一致;每个参考页至少一条短语。
键写错或参考页改名后 `_intent_score` 会静默返回 0 分,该页失去自然语言
入口——`lookup.py --check` 和回归测试会拦住这两种漂移。
## 改动后的校验
```bash
python scripts/lookup.py --check
```
`--check` 会校验 `page_intent_aliases` 的键与 `references/` 参考页一一对应:
键指向不存在的页、或某页没有自然语言入口都会报错。新增参考页时必须同时
在这里补一条页级意图短语。