diff --git a/lua/reduce_english_filter.lua b/lua/reduce_english_filter.lua index d945807..22e2651 100644 --- a/lua/reduce_english_filter.lua +++ b/lua/reduce_english_filter.lua @@ -42,7 +42,10 @@ function M.init(env) "tan", "tang", "tank", "tap", "tar", "tax", "tec", "ted", "tel", "ten", "ter", "tex", "tic", "tied", "tier", "ties", "tim", "tin", "tip", "tit", "tour", "tout", "tum", "wag", "wait", "wail", "wan", "wand", "womens", "want", "wap", "war", "was", "wax", "way", "weir", "went", "won", "wow", "yan", "yang", "yen", "yep", "yes", - "yet", "yin", "your", "yum", "zen", "zip" } + "yet", "yin", "your", "yum", "zen", "zip", + -- 下面是大于 4 位的 + "quanx", + } M.all = {} for _, v in ipairs(all) do M.all[v] = true @@ -76,7 +79,7 @@ function M.func(input, env) for cand in input:iter() do index = index + 1 -- 找到要降低的英文词,加入 pending_cands - if cand.preedit:find(" ") or not cand.text:match("^[%a' ]+$") then + if cand.preedit:find(" ") or not cand.text:match("[a-zA-Z]") then yield(cand) else table.insert(pending_cands, cand)