update: 重新整理 Emoji

This commit is contained in:
Dvel 2023-02-07 03:32:24 +08:00
parent bc1287d430
commit 431eec0ed0
6 changed files with 2723 additions and 2675 deletions

View File

@ -18,7 +18,7 @@
# - 以前的一些搜狗流行词,新更新的单独放在了 sogou.dict.yaml 中
---
name: ext
version: "2023-02-06"
version: "2023-02-07"
sort: by_weight
columns:
- text
@ -71906,6 +71906,7 @@ columns:
强对流天气 100
强巴阿擦佛 100
强干弱枝 100
强很多 100
强得一逼 100
强得令人发指 100
强忍了好久 100
@ -74458,6 +74459,9 @@ columns:
快餐部 100
快马赶往 100
快高长大 100
快鸡巴 100
快鸡巴别 100
快鸡巴别说了 100
快鹿集团 100
快鹿集团案 100
念一些 100
@ -103424,6 +103428,7 @@ columns:
滑雪术 100
滑雪的人 100
滑雪索道 100
滑雪装备 100
滑雪跳 100
滑鼠垫 100
滑鼠蛇 100
@ -105875,6 +105880,7 @@ columns:
特别赞助播出 100
特别那啥 100
特别那啥了 100
特别酷 100
特别门诊 100
特别饿 100
特制住 100
@ -117796,6 +117802,7 @@ columns:
统一使用 100
统一党 100
统一博客 100
统一处理 100
统一大市场 100
统一安排行事 100
统一战线工作部 100
@ -120368,6 +120375,7 @@ columns:
胡姬花 100
胡婷婷 100
胡子哥 100
胡子女 100
胡子昂 100
胡子渣 100
胡子阿姨 100
@ -125548,6 +125556,7 @@ columns:
袅袅炊烟 100
袋中爱 100
袋子包 100
袋棍球 100
袋鼠国 100
袍泽之义 100
袍泽之情 100
@ -139848,6 +139857,7 @@ columns:
长耳兔 100
长耳族 100
长肉肉 100
长胡子的女人 100
长脑子 100
长脑子没有 100
长脚跑 100

View File

@ -12,7 +12,7 @@
# 与 base sogou ext 没有重复
---
name: tencent
version: "2023-02-06"
version: "2023-02-07"
sort: by_weight
columns:
- text
@ -742719,7 +742719,6 @@ columns:
滑雪的乐趣 100
滑雪票 100
滑雪节 100
滑雪装备 100
滑雪训练 100
滑雪赛事 100
滑雪运动员 100
@ -765984,7 +765983,6 @@ columns:
特别配 100
特别配合 100
特别配置 100
特别酷 100
特别醒目 100
特别重大 100
特别重大事故 100
@ -885364,7 +885362,6 @@ columns:
统一回收 100
统一国家 100
统一培训 100
统一处理 100
统一处置 100
统一备货 100
统一多民族国家 100

View File

@ -7,7 +7,7 @@
#
---
name: en_ext
version: "2023-02-06"
version: "2023-02-07"
sort: by_weight
...
# 一些杂项
@ -1890,3 +1890,4 @@ WebRTC WebRTC
WebDAV WebDAV
SwiftUI SwiftUI
watermarking watermarking
jellyfish jellyfish

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@ package rime
import (
"bufio"
"fmt"
mapset "github.com/deckarep/golang-set/v2"
"log"
"os"
@ -38,28 +39,32 @@ func CheckEmoji() {
sc := bufio.NewScanner(file)
for sc.Scan() {
line := sc.Text()
// 过滤空行
if line == "" {
continue
}
// 过滤注释
if strings.Contains(line, "#") {
continue
}
// 检查是否包含 Tab
if strings.Contains(line, "\t") {
log.Fatal("❌ 此行包含 Tab", line)
fmt.Println("❌ 此行包含 Tab", line)
}
// 开头结尾无效的空格
if strings.HasPrefix(line, " ") || strings.HasSuffix(line, " ") {
log.Fatal("❌ unexpected space:", line)
fmt.Println("❌ unexpected space:", line)
}
parts := strings.Split(line, " ")
if len(parts) < 2 {
log.Fatal("❌ invalid line:", line)
fmt.Println("❌ invalid line:", line)
}
// 加入 emojiSet顺便用一个 tempSet 查重
tempSet := mapset.NewSet[string]()
for _, word := range parts[1:] {
emojiSet.Add(word)
if tempSet.Contains(word) {
log.Fatal("❌ 此行有重复映射:", line)
fmt.Println("❌ 此行有重复映射:", line)
} else {
tempSet.Add(word)
}
@ -76,7 +81,7 @@ func CheckEmoji() {
if utf8.RuneCountInString(word) == 1 {
continue
}
log.Fatal("❌ Emoji 差集:", word)
fmt.Println("❌ Emoji 差集:", word)
}
}