diff --git a/lua/auto_phrase.lua b/lua/auto_phrase.lua index 7cf7dd1..d1cef4c 100644 --- a/lua/auto_phrase.lua +++ b/lua/auto_phrase.lua @@ -66,7 +66,7 @@ function AP.init(env) end -- 英文:enuser(不受 add_* 开关影响,始终尝试启用) - env.en_memory = Memory(env.engine, env.engine.schema, "wanxiang_mixedcode") + env.en_memory = Memory(env.engine, env.engine.schema, "wanxiang_english") -- 只要有一边需要,就挂上 commit/delete 通知 if env.en_memory or env.memory then diff --git a/lua/super_lookup.lua b/lua/super_lookup.lua index 3f6cbff..842a964 100644 --- a/lua/super_lookup.lua +++ b/lua/super_lookup.lua @@ -74,12 +74,17 @@ local function expand_code_variant(main_projection, xlit_projection, part) end -- 3. 遍历所有种子(原始编码 + 缩写编码),统一进行规则投影 for _, code in ipairs(seeds) do - -- 应用 main_projection (非大写) + -- A. 应用 main_projection if main_projection then local p = main_projection:apply(code, true) - if p and #p > 0 then add(p) end + if p and #p > 0 then + add(p) + if #p == 4 then + add(p:sub(1,1) .. p:sub(3,3)) + end + end end - -- 应用 xlit_projection (大写笔画,不参与前面重复计算) + -- B. 应用 xlit_projection if code:match('^%u+$') and xlit_projection then local xlit_result = xlit_projection:apply(code, true) if xlit_result and #xlit_result > 0 then add(xlit_result) end