lua: 修改 reduce_english_filter 英文词匹配条件; fix #349 (#350)

This commit is contained in:
Mirtle 2023-06-14 19:03:46 +08:00 committed by GitHub
parent e0a504af19
commit 67709ee7cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,8 @@ local function reduce_english_filter(input, env)
local index = 0
for cand in input:iter() do
index = index + 1
if string.lower(cand.text) == code then
-- 定位匹配的英文词
if not string.find(cand.preedit, " ") then
table.insert(pending_cands, cand)
else
yield(cand)