rime-ice/others/script/rime/others.go

26 lines
404 B
Go
Raw Normal View History

2023-04-19 14:20:07 +02:00
package rime
2023-06-03 10:21:25 +02:00
import (
"fmt"
)
2023-04-19 14:20:07 +02:00
// 一些临时用的函数
func Temp() {
2023-04-28 17:57:40 +02:00
// defer os.Exit(11)
2023-06-03 10:21:25 +02:00
}
2023-04-19 14:20:07 +02:00
2023-06-03 10:21:25 +02:00
// 列出 ext 和 tencent 词库中有多少行包含多音字的词汇
func listPolyphone() {
count := 0
for _, line := range ExtSet.Union(TencentSet).ToSlice() {
for _, char := range line {
if len(hanPinyin[string(char)]) > 1 {
count++
break
}
}
}
fmt.Println("count:", count)
2023-04-19 14:20:07 +02:00
}