fix: reduce_english_filter.lua 可识别含单引号的单词 close #519
This commit is contained in:
parent
649f4935b8
commit
a219451708
@ -108,7 +108,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -107,7 +107,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -108,7 +108,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -108,7 +108,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -108,7 +108,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -108,7 +108,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
@ -24,11 +24,11 @@ function M.func(input, env)
|
|||||||
local index = 0
|
local index = 0
|
||||||
for cand in input:iter() do
|
for cand in input:iter() do
|
||||||
index = index + 1
|
index = index + 1
|
||||||
-- 定位匹配的英文词
|
-- 找到要降低的英文词,加入 pending_cands
|
||||||
if not string.find(cand.preedit, " ") and not string.match(cand.text, "%A") then
|
if cand.preedit:find(" ") or not cand.text:match("^[%a']+$") then
|
||||||
table.insert(pending_cands, cand)
|
|
||||||
else
|
|
||||||
yield(cand)
|
yield(cand)
|
||||||
|
else
|
||||||
|
table.insert(pending_cands, cand)
|
||||||
end
|
end
|
||||||
if index >= M.idx + #pending_cands - 1 then
|
if index >= M.idx + #pending_cands - 1 then
|
||||||
for _, cand in ipairs(pending_cands) do
|
for _, cand in ipairs(pending_cands) do
|
||||||
|
@ -98,7 +98,7 @@ reduce_english_filter:
|
|||||||
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
lux, moc, mos, mot, mum, nad, nay, nib, nip, pak, pap, pax, rig, rum, sac, sal,
|
||||||
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
sax, sec, shin, sis, ska, slang, sus, tad, taj, tac, tic, yep, yum, fax, cain,
|
||||||
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
key, mob, buy, dam, wap, yes, but, put, lag, buf, lip, aid, aim, dig, dim, din,
|
||||||
dip, pail, cad, chap, bend, lid, gem, tin, tum, my]
|
dip, pail, cad, chap, bend, lid, gem, tin, tum, my, went, youd, hes]
|
||||||
|
|
||||||
|
|
||||||
# 主翻译器,拼音
|
# 主翻译器,拼音
|
||||||
|
Loading…
x
Reference in New Issue
Block a user