mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
日常更新; fix #319
This commit is contained in:
@@ -173,7 +173,7 @@ func Check(dictPath string, _type int) {
|
||||
func checkLine(dictPath string, _type int, line string, lineNumber int, wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
|
||||
// 忽略注释,base 中有很多被注视了词汇,暂时没有删除
|
||||
// 忽略注释,base 中有很多被注释了的词汇,暂时没有删除
|
||||
if strings.HasPrefix(line, "#") {
|
||||
// 注释以 '#' 开头,但不是以 '# '开头(强迫症晚期)
|
||||
if !strings.HasPrefix(line, "# ") {
|
||||
@@ -187,10 +187,6 @@ func checkLine(dictPath string, _type int, line string, lineNumber int, wg *sync
|
||||
fmt.Println("empty line", line)
|
||||
}
|
||||
|
||||
// 开头结尾有空格
|
||||
if strings.HasPrefix(line, " ") || strings.HasSuffix(line, " ") {
|
||||
fmt.Println()
|
||||
}
|
||||
// +---------------------------------------------------------------
|
||||
// | 开始检查分割后的内容,分割为: 词汇text 编码code 权重weight
|
||||
// +---------------------------------------------------------------
|
||||
@@ -201,7 +197,7 @@ func checkLine(dictPath string, _type int, line string, lineNumber int, wg *sync
|
||||
text = parts[0]
|
||||
case _type == 2 && len(parts) == 2: // 两列,【汉字+注音】
|
||||
text, code = parts[0], parts[1]
|
||||
case _type == 3 && len(parts) == 3: // 散列,【汉字+注音+权重】
|
||||
case _type == 3 && len(parts) == 3: // 三列,【汉字+注音+权重】
|
||||
text, code, weight = parts[0], parts[1], parts[2]
|
||||
case _type == 4 && len(parts) == 2: // 两列,【汉字+权重】
|
||||
text, weight = parts[0], parts[1]
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
package rime
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// 一些临时用的函数
|
||||
|
||||
func Temp() {
|
||||
// defer os.Exit(11)
|
||||
|
||||
}
|
||||
|
||||
// 列出 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)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
一踏糊涂
|
||||
一蹋糊涂
|
||||
一榻糊涂
|
||||
一塌胡涂
|
||||
地一卷
|
||||
国产零零漆
|
||||
世外桃园
|
||||
全材
|
||||
人心慌慌
|
||||
知道拉
|
||||
费劲了心思
|
||||
费劲千辛万苦
|
||||
@@ -3231,3 +3240,4 @@
|
||||
金石南里
|
||||
新石南路
|
||||
石南镇
|
||||
安全材料
|
||||
|
||||
@@ -176,7 +176,6 @@
|
||||
龟裂
|
||||
般若
|
||||
酢浆草
|
||||
的一部分
|
||||
不省心
|
||||
不省油
|
||||
不省钱
|
||||
@@ -186,7 +185,9 @@
|
||||
的弟弟
|
||||
唵嘛呢嘛呢叭咪吽
|
||||
乐府
|
||||
的一天
|
||||
的一
|
||||
地一
|
||||
得一
|
||||
兰若
|
||||
琅邪
|
||||
给予
|
||||
@@ -230,3 +231,8 @@
|
||||
奥米伽
|
||||
茄
|
||||
亲家
|
||||
都统
|
||||
传给
|
||||
还小
|
||||
还要
|
||||
一圈
|
||||
|
||||
Reference in New Issue
Block a user