Jia Suiandfanlusky fc90cb1f2c fix(engine): 纯简拼读法否决权,纠错不再劫持 nbn 等简拼候选 (#881)
* fix(engine): 纯简拼读法否决权,纠错不再劫持 nbn 等简拼候选

纯简拼形输入(切分全是单字母声母)若词库 jp 列有该输入读法,纠错不得接管:
nbn 是「能不能」、nqn 是「女青年」、bqng 是「并且能够」,纠错却把它们改写成
字母更近的错串候选(难/帮),顶掉真实命中的简拼词。

输入形状分不干净——sahng 也全是合法声母却必须保留乱序纠错;唯一分得开的是
词库有没有这个简拼读法,故判定落在同时持有 DB 与纠错掩码的查询层。

- 新增 quanpin::has_pure_jianpin_reading(jp 列 LIMIT 1 查询)
- QuanpinDictionary::effective_autocorrect_types 统一 query_exact 与
  insert_word_to_series_cache 的有效掩码,避免 series 缓存键分歧
- 非纯简拼(shng=[sh,n,g]、shbng、sahng/shangg/sjhang)纠错不变

* fix(engine): 纯简拼整词改为排在纠错前面,不再整个关掉纠错

原方案在词库有纯简拼读法时把纠错掩码置 0,漏了元音的真手误(bng 想打 bang)
也随之纠不了,而且只有词库层知道纠错被关,预编辑与选词消耗仍按原掩码判断。

改为不动掩码:纠错照常进行,纠错分支里字面结果中的纯简拼整词
(literal_jianpin_pinyin_match:两个及以上单字母声母盖住整串,逐个是正读首字母,
a/e/o 不算)和混合简拼一样放进领衔组。纠错读法排在后面,仍可选、仍带纠错标记。
判定直接看已查回的字面结果,不新增 SQL;掩码不变,缓存键也不变,
因此删掉 has_pure_jianpin_reading 与 effective_autocorrect_types。

测试补上预编辑(n'b'n)、选前缀单字只消耗自己的声母、bng 仍保留「帮」。

---------

Co-authored-by: fanlusky <1730976608@qq.com>
2026-10-12 17:23:30 +08:00
2026-09-09 04:05:24 +09:00
2025-11-10 21:10:23 +08:00

Metasequoia IME for Windows

中文 README · Website · Docs · Privacy · Code signing policy

CI CodeQL Release Downloads License Stars

A free and open-source Chinese and Japanese input method for Windows 10 and 11, built on TSF with no legacy IMM32 path.

This repository is the whole Windows product: the TSF text service DLL, the resident server, the conversion engine, a self-written native GUI framework, the HTML surfaces and the installer. The engine was imported from MSIME-Engine and specialized for Windows; it now lives in engine/ as a first-party component, so a plain clone builds the product. See engine/UPSTREAM.md.

This is a public beta. Expect rough edges and read the release notes before upgrading.

Install

Download the installer from Releases or the download page, run it, then switch with Win + Space.

Current builds are not code signed. SmartScreen will block them and uiAccess is unavailable, which means the candidate window cannot float above elevated applications. Verify the download with the SHA256 published on the download page.

You need the Microsoft Visual C++ 2015–2022 Redistributable (x64). The server and settings app are 64-bit; the x86 redistributable is a separate package and does not substitute for it. If you cannot switch to the IME, the server keeps exiting, or the settings window closes immediately, install that first.

What it does

  • Chinese input: full pinyin, double pinyin (Xiaohe / Ziranma / Shoudao / Microsoft / Sogou / Ziguang / Zhineng ABC / Guobiao / Pinyin Jiajia), Wubi 86
  • Japanese input: romaji, with hiragana, katakana and dictionary candidates; also available as a temporary mode from Chinese
  • Helpcode (形码) filtering on pinyin schemes: six tables, single- and double-code
  • Optional cloud candidates, and AI suggestions via DeepSeek / OpenAI / SiliconFlow / Groq
  • English-Chinese glosses in the vertical candidate window
  • Mixed Chinese-English input, emoji and kaomoji, a dedicated English candidate mode
  • Local input statistics (off by default): character counts and active time stay on this machine; view and clean them under Settings → Statistics
  • Voice input with streaming recognition and optional cleanup
  • Handwriting, on-screen keyboard, floating toolbar, clipboard history
  • User dictionary management, candidate frequency tuning, skins with light and dark variants

Privacy

An input method sees every keystroke, so the boundaries are stated explicitly in PRIVACY.md: which features reach the network, what each one sends, what the defaults are, and how to turn each off.

Two things worth knowing up front. Cloud candidates are on by default — the composition spelling goes to Google's input-tools service, and it is the only network feature that works without you supplying a credential. API tokens are stored in plain text in config.toml, unlike macOS and Linux which use the Keychain and Secret Service.

There is no telemetry, analytics or crash reporting of any kind.

Building and contributing

CONTRIBUTING.md has the environment, the build order and what to run before opening a pull request. Contributions do not have to be code — dictionary entries, documentation, icons and compatibility testing all count, and the recruiting page lists them by area.

Note that most issues, documentation and code comments are in Chinese. English pull requests and issues are welcome.

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

What is signed, who the committers, reviewers and approvers are, the build and release process and the current status are in the code signing policy. The privacy policy is PRIVACY.md.

Licence

GPL-3.0. See LICENSE and THIRD_PARTY_NOTICES.txt.

S
Description
水杉输入法 Windows 产品:TSF、Server、GUI、设置页与安装器。内测:tg: https://t.me/msimegroup QQ Group: 829919142
https://msime.app
Readme GPL-3.0
24 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 93.5%
Python 2.4%
PowerShell 2%
CMake 0.9%
Inno Setup 0.7%
Other 0.5%