19 Commits
Author SHA1 Message Date
Jia Sui 9e46ccb427 feat(server): HandleImeKey 分段计时埋点,定位提交超时类吞字卡顿
诊断日志新增 handle-read-packet / handle-engine / handle-selection /
handle-worker-push / handle-async-query / handle-candidates 六类分段
(>=8ms 才输出),用于定位 server 按键处理偶发数百毫秒卡顿——昨晚
request=628 卡 344ms 导致空格排队超 TSF 300ms 提交预算、整会话重置
吞掉 "juede"。纯观测改动,零行为变化;.gitignore 忽略本地测试暂存
目录 .tmp-test/。
2026-10-07 09:00:47 +08:00
Jia Sui 69092b9d9a feat(server): 万象模型的配置链路、模型包解析与按需下载
- [association] 新增五键:sentence_collocation_additive/rerank(设置页开关,默认
  关)、sentence_collocation_model(模型包 id,下载器写回)、两个权重(配置文件
  高级项,不进设置页);出厂模板与工作配置同步更新,通过五件套映射下发
- 模型包确定性布局 <DataDir>/models/<id>/<id>.gram,解析只是一次 stat;开关开
  着但文件缺席即视为关闭,词格静默降级
- collocation_model.{h,cpp}:WinHTTP 按需下载(重定向放行、进度回报)+ BCrypt
  SHA256 校验 + 同卷原子落位 + CC-BY-4.0 NOTICE。SHA256/字节数在常量里钉死:
  上游 LTS release 会被原地重传,换字节必须显式更新并复跑离线评测
- CandidateSource::Collocation 落库/学习判定与神经整句同类,候选徽标〔万象〕
- 下载器编译进 Server 与独立设置进程两个宿主,状态以磁盘为准
2026-10-02 20:15:39 +08:00
fanlusky e7f7addd4f feat(engine): 神经网络整句联想与词格 n-best 重排
- 新增 engine/neural:移植 chinese-ime-lm 的字符级 Transformer 推理,在词格解出的最多 12 条
  n-best 里重排挑选整句,desktop / keyboard 两档模型各出一条首选,后台 worker 异步打分
- 词格支持 n-best 输出与重排(quanpin/lattice_rerank),全拼、双拼共用
- 新增 SentenceAssociationOptions,经 QueryRequest 传给各 provider;四个来源默认全关
- 资源契约登记两个 safetensors 与 NOTICE;模型二进制不进仓库,由
  scripts/fetch-neural-model.ps1 按 neural-model/lock.json 下载并校验 SHA256
- 新增 neural_sentence 测试
2026-09-24 14:03:39 +08:00
fanlusky d30d2946e4 feat(installer): 打包时生成并安装词格语言模型 sc.lm
sc.lm 此前只能手工投放,重装即失效,发布包里也没有它。这里把它变成一个被钉住、
可复现、自动参与打包的产品输入。

它不走词库那条路:词库 release 由本仓库之外的构建器产出,资产集合和摘要在产品锁
里逐一钉死,加一项要对方先发新版。改为独立钉住上游语料,与 libime 自己的做法一致。

- language-model/lock.json 钉住上游 URL、语料摘要、转换参数和产物摘要。转换是
  确定性的(已在 MSVC 14.44 与 14.50 两套工具链上验证产物摘要一致),所以产物
  摘要可以像下载摘要一样钉死。
- scripts/build-language-model.ps1 下载、校验、转换、再校验,写临时文件后改名,
  中途失败不会留下摘要对不上的 sc.lm。幂等,摘要对得上直接返回。
- 它只 configure engine/ngram 一个目录,不拉 vcpkg 和 SQLite:转换工具只依赖
  kenlm 自己,而打包机上未必装得起引擎的全部依赖。
- Invoke-LocalTest.ps1 打完整包前自动调用它,轻量包本就不带数据文件,不调。
- 打包脚本只断言文件存在,摘要由构建脚本负责,与词库交给 product_lock.py 校验
  的分工一致。缺模型让打包失败而不是跳过:引擎对缺模型是静默降级的,运行期不会
  暴露,打包是唯一拦得住的地方,package-files.ps1 为此加了反向用例。

模型是 LGPL-2.1-or-later 的第三方数据,声明随之安装为 libime-lm-NOTICE.md。
安装脚本无需改动,它已按通配收集资源目录。产物与语料不进仓库,只进锁与声明。
2026-09-19 10:08:39 +08:00
Jia Sui 2fcd57c88d style(server): 全拼纠错相关代码过 scripts/format.sh
- 生成脚本 Count 行模板改为单行,与 clang-format 输出一致,
  生成器 --check 与 format.sh --check 从此不再互斥
- test_quanpin_scheme 格式化
2026-09-10 17:32:17 +08:00
Evan Hu c3fcc4a515 refactor(product): consume the consolidated Engine data and shared voice capture
Ports metasequoiaime/MSIME-Windows#153 onto the consolidated repository. That pull request was written against the six-repository layout: it edited product-ci.yml, which no longer exists, and re-pinned Server, UiHtml and Installer, which are directories now.

Three of its pinned commits had not reached this repository at all. The consolidation took each source repository at its main, and Server, UiHtml and Installer each landed two more commits afterwards, so dropping the pins as merely obsolete would have silently dropped the work the pull request exists to consume. The two substantive ones are ported here: Server drops its vendored miniaudio.h and builds against the engine's MetasequoiaIme::VoiceCapture, and the installer collects helpcodes from the engine. UiHtml's was an engine gitlink bump, which one submodule resolves on its own.

The engine is pinned to d0dc0c2b rather than to the b7c799ef that pull request named. b7c799ef predates 403b4a4d, which is what this repository pins today and is the commit that added pagination to the settings dictionary contract, so taking the pull request's pin verbatim would have reverted a contract main already depends on and stripped offset, limit and hasMore back out of the generated web bindings. d0dc0c2b is the engine's main and is the same commit the dictionary release declares as its source, so the code and the data now name one commit.

The helpcodes moved into the engine, so MSIME-HelpCode stops being a product input: the gitlink that pins the contracts pins the tables too. product-lock.json is down to the engine and the dictionary release, and the dictionary itself now ships from MSIME-Engine. Its manifest states which commit built the data and whether that tree was clean, and the lock verifies both, so matching digests can no longer stand in for a source nobody can rebuild from. The retired MSIME-Dict repository stays valid for the one tag that shipped from it and nothing else.

The release job that packages now checks out submodules, because the helpcodes it collects live in one.
2026-09-06 04:13:04 +09:00
Evan Hu 32e722c176 ci: build every component from the one checkout
The product lock existed because five repositories had to be pinned to reproduce one product. Four of them are directories now, so a commit of this repository already pins them and there is nothing left for the lock to say about them. What it still records is what the product consumes from outside: the engine submodule, the helpcodes and the dictionary release.

CI gains a job per component instead of a reusable workflow that checked out locked commits and rebuilt them. The release workflow no longer stages five sibling checkouts under historical names and no longer carries a second sparse checkout for its own scripts; Prepare-PackageFiles.ps1 already took the source directory names as parameters, so it is told the new ones, plus where the product-wide notice now lives.

Two checks the removed cross-repository pins used to provide are replaced in kind: the pages are verified against the engine submodule's web contract in CI rather than by locking UiHtml and Engine together, and the engine bump triage that Server carried moves here and now also says so when a bump leaves the lock behind.
2026-09-06 02:35:49 +09:00
sk 0ca1e0a4b0 [docs]: Add installation.md and updata .gitignore 2026-09-03 23:30:31 +08:00
fanlusky a36fd5e13b add compile release scripts 2026-04-02 18:24:39 +08:00
fanlumaster eb104a9616 [config]: Update to VS2026 2025-12-29 21:55:53 +08:00
fanlumaster 5066857c50 [ver]: Roll back => ignore config files again 2025-08-19 18:54:54 +08:00
fanlumaster c3c9bfe5c1 [config]: Do not ignore project configs 2025-07-20 15:44:32 +08:00
fanlumaster f76632a451 [env]: Remove hard-code settings and generate them by py scripts 2025-06-01 00:53:55 +08:00
fanlumaster 547c24815a [feat]: Add spdlog 2025-04-14 16:02:43 +08:00
fanlumaster 307209608d [feat]: commit pure keystroke string when VK_RETURN is pressed 2025-03-13 04:12:11 +08:00
fanlumaster 38df063cec add log function 2024-10-07 00:19:03 +08:00
fanlumaster 5cb9c17e49 add some pwsh scripts 2024-02-18 22:55:26 +08:00
fanlumaster 6e53ef7404 update readme 2023-10-14 13:32:10 +08:00
fanlumaster 7b83802bb2 First commit. 2023-10-12 23:53:17 +08:00