Skip to content

Commit 4321819

Browse files
Rime: 重新生成 lua 腳本
1 parent 167330e commit 4321819

22 files changed

Lines changed: 27 additions & 41 deletions

lua/bp_filter.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,11 +8654,8 @@ local function filter(translation, env)
86548654
cand.comment = hw
86558655
if latin_first then
86568656
if has_digits and cand._end - cand.start >= #input then
8657-
local code_count = 0
8658-
for _ in comment:gmatch("[%w]+") do
8659-
code_count = code_count + 1
8660-
end
8661-
if code_count == input_syl_count then
8657+
local han_syl_count = utf8.len(cand.text) or 0
8658+
if han_syl_count == input_syl_count then
86628659
table.insert(han_items, cand)
86638660
else
86648661
table.insert(han_partial, cand)

lua/dp_filter.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,11 +8654,8 @@ local function filter(translation, env)
86548654
cand.comment = hw
86558655
if latin_first then
86568656
if has_digits and cand._end - cand.start >= #input then
8657-
local code_count = 0
8658-
for _ in comment:gmatch("[%w]+") do
8659-
code_count = code_count + 1
8660-
end
8661-
if code_count == input_syl_count then
8657+
local han_syl_count = utf8.len(cand.text) or 0
8658+
if han_syl_count == input_syl_count then
86628659
table.insert(han_items, cand)
86638660
else
86648661
table.insert(han_partial, cand)

lua/poj_filter.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,11 +8654,8 @@ local function filter(translation, env)
86548654
cand.comment = hw
86558655
if latin_first then
86568656
if has_digits and cand._end - cand.start >= #input then
8657-
local code_count = 0
8658-
for _ in comment:gmatch("[%w]+") do
8659-
code_count = code_count + 1
8660-
end
8661-
if code_count == input_syl_count then
8657+
local han_syl_count = utf8.len(cand.text) or 0
8658+
if han_syl_count == input_syl_count then
86628659
table.insert(han_items, cand)
86638660
else
86648661
table.insert(han_partial, cand)

lua/puj_filter.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,11 +8654,8 @@ local function filter(translation, env)
86548654
cand.comment = hw
86558655
if latin_first then
86568656
if has_digits and cand._end - cand.start >= #input then
8657-
local code_count = 0
8658-
for _ in comment:gmatch("[%w]+") do
8659-
code_count = code_count + 1
8660-
end
8661-
if code_count == input_syl_count then
8657+
local han_syl_count = utf8.len(cand.text) or 0
8658+
if han_syl_count == input_syl_count then
86628659
table.insert(han_items, cand)
86638660
else
86648661
table.insert(han_partial, cand)

lua/tl_filter.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,11 +8654,8 @@ local function filter(translation, env)
86548654
cand.comment = hw
86558655
if latin_first then
86568656
if has_digits and cand._end - cand.start >= #input then
8657-
local code_count = 0
8658-
for _ in comment:gmatch("[%w]+") do
8659-
code_count = code_count + 1
8660-
end
8661-
if code_count == input_syl_count then
8657+
local han_syl_count = utf8.len(cand.text) or 0
8658+
if han_syl_count == input_syl_count then
86628659
table.insert(han_items, cand)
86638660
else
86648661
table.insert(han_partial, cand)

sync.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ rsync -av --delete \
1515
--exclude='.git' \
1616
--exclude='build.sh' \
1717
--exclude='sync.sh' \
18+
--exclude='release.sh' \
1819
--exclude='LICENSE' \
1920
--exclude='README.md' \
2021
--exclude='.gitignore' \

teochew.dict.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Generated from merged.csv - do not edit manually
33
---
44
name: teochew
5-
version: "20260503.114623"
5+
version: "20260504.141335"
66
sort: by_weight
77
...
88

teochew_chars.dict.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Generated from merged.csv - decomposed character table
33
---
44
name: teochew_chars
5-
version: "20260503.114623"
5+
version: "20260504.141335"
66
sort: by_weight
77
...
88

teochew_dp.dict.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Generated from merged.csv - do not edit manually
33
---
44
name: teochew_dp
5-
version: "20260503.114623"
5+
version: "20260504.141335"
66
sort: by_weight
77
use_preset_vocabulary: true
88
min_phrase_weight: 100 # 僅導入八股文中詞頻 >= 100 个詞

teochew_dp.schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
schema:
55
schema_id: teochew_dp
66
name: 潮州話·拼音
7-
version: "20260503.114623"
7+
version: "20260504.141335"
88
author:
99
- Hokkien Writing Project(https://github.com/hokkien-writing)
1010
dependencies:

0 commit comments

Comments
 (0)