Skip to content

C 批:评测尺子 + 一级简码入表 + 有界位次上移(1.1.0) - #223

Merged
wangzhizhou merged 2 commits into
mainfrom
dev
Nov 5, 2026
Merged

wangzhizhou merged 2 commits into
mainfrom
dev

Conversation

@wangzhizhou

@wangzhizhou wangzhizhou commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

C 批的两步:先造尺子(B 基线),再按尺子改。docs/MVP后执行计划.md §3。

1. 评测尺子(报告 227)

  • crates/ime-cli/src/bin/ime-eval.rs:真实 Session + 真实码表评候选位次,4 条单测
  • tools/eval/gen-samples.py → samples.tsv(200 条,意图来源与排序权重不同源)
  • make eval-candidates、tools/eval/baselines/1.0.2-build37.json(绑定提交/样本/码表 SHA)
  • 基线读数:同码内排序本就健康;缺口在一级简码(32% 首选、44% 争不到)

2. 一级简码入表(P0,数据)

  • data/sources/wubi86-level1-codes.tsv(D17,自建清单,CC-BY-SA-4.0,25 条)
  • generate_core.rs 追加 25 行,tools/check-level1-codes.py 校验 25/唯一/全码一致
  • 核心零改动:靠既有"精确优先于补全";自动上屏仍要求 4 码

3. 有界位次上移(P1,核心)

  • 删 bonus = learned.min(32) 与"单字 bonus = 0"
  • ≥1 次升 1 位、≥4 次升 2 位;首选位保护;不跨精确/补全/模糊分块

评测结果

类别 命中率 首选率 平均位次 按键/条
jianma1 56% → 100% 32% → 100% 1.14 → 0.00 2.24 → 2.00
其余 5 类 不变 不变 不变 不变
ALL 92.0% → 97.5% 85.5% → 94.0% 0.11 → 0.04 4.47 → 4.44

验证

make verify PASS;离线 56 文件 / 303 例 PASS;新增 1 个简码用例 + 重写 3 个钉旧语义的用例。

未做

二级 625 条需先登记 D17-bis;jianma2 现状不变(93.3% 首选),评测里单列便于将来对比。

发布前仍需:装包自用 3 天 + IT-25 + IT-22 受影响行 + 升级闭环(一次换包做四项)→ 全绿才 tag v1.1.0。

Subjective complaints about candidate order cannot be verified, so this
adds a ruler before touching ranking: a reproducible sample set derived
from already-registered data (intent from jieba frequencies, codes from
the WindInput-derived table, so the two are not the same source), an
evaluator that drives the real Session, a make target, and the frozen
baseline bound to commit plus table hashes. The baseline shows ranking
within a code is healthy and the real gap is the first-level codes.

Signed-off-by: wangzhizhou <824219521@qq.com>
Wubi users type one letter for the twenty-five most common characters, but
the table had no codes shorter than three letters, so that key fell back to
a prefix list where the intended character was usually neither first nor
even present. The level-one table is now generated into the code table from
a registered project-compiled list, which makes the key an exact hit without
touching the ranking code. Personalization no longer adds a bonus to the
static weight; it moves a learned candidate up one or two places, never past
the current first choice and never across the exact/completion/fuzzy blocks.
The evaluation set shows the first-level hit rate going from 56 to 100
percent with no other category changing.

Signed-off-by: wangzhizhou <824219521@qq.com>
@wangzhizhou wangzhizhou changed the title B 批:候选排序评测尺子 + 1.0.2 基线 C 批:评测尺子 + 一级简码入表 + 有界位次上移(1.1.0) Nov 5, 2026
@wangzhizhou
wangzhizhou merged commit 393318c into main Nov 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant