feat(search): 中文词表扩充至 425 条,3D 表情(Fluent Emoji 3D)支持中文检索
- gen-cn-tags.js 新增 EMOJI_EXTRA 场景词表(情绪/餐饮/动物/职业/物品/运动/交通/节日),词根按 Fluent 实际文件名校准 - 3D 库中文命中率 28/67 → 67/70(爱心→red-heart、奖牌→1st-place-medal、派对→party-popper 等) - emoji.html 内置库弹窗预载 fluent-emoji-3d(3D 源不在 1200 条轻量搜索索引内) - api/README.md 更正数据规模(444,754/263 图标、2,362/67 海报),补 3D 位图图标内联说明
This commit is contained in:
+199
-1
@@ -107,6 +107,204 @@ const EXTRA = {
|
||||
'星星': ['star', 'sparkle']
|
||||
};
|
||||
|
||||
/**
|
||||
* 补充:3D 位图表情 / 全彩 emoji 场景词(Fluent Emoji 3D 等英文文件名词汇)
|
||||
* 这些词根对应微软 Fluent 命名(pot-of-food / health-worker / hot-beverage 等),
|
||||
* 同时覆盖通用名词搜索,避免中文「爱心 / 奖牌 / 派对」查不到英文命名的 3D 图标。
|
||||
*/
|
||||
const EMOJI_EXTRA = {
|
||||
// —— 情绪与手势 ——
|
||||
'爱心': ['red-heart', 'heart', 'love', 'two-hearts', 'heart-with-ribbon'],
|
||||
'心碎': ['broken-heart'],
|
||||
'奖牌': ['medal', 'sports-medal', 'trophy'],
|
||||
'奖杯': ['trophy', 'medal'],
|
||||
'派对': ['party', 'confetti', 'partying', 'balloon'],
|
||||
'庆祝': ['party', 'confetti', 'partying', 'sparkles'],
|
||||
'生日': ['birthday', 'birthday-cake', 'balloon'],
|
||||
'蛋糕': ['cake', 'birthday-cake', 'shortcake', 'cupcake'],
|
||||
'笑脸': ['smiling', 'grinning', 'smile'],
|
||||
'大笑': ['laughing', 'grinning', 'joy'],
|
||||
'哭': ['crying-face', 'crying', 'sad', 'sob'],
|
||||
'生气': ['angry', 'pouting', 'rage'],
|
||||
'眨眼': ['winking', 'wink'],
|
||||
'挥手': ['waving'],
|
||||
'鼓掌': ['clapping-hands', 'clap'],
|
||||
'祈祷': ['folded-hands', 'pray'],
|
||||
'加油': ['flexed-biceps', 'muscle', 'strong'],
|
||||
'思考': ['thinking', 'pensive', 'brain'],
|
||||
'睡觉': ['sleeping', 'sleepy', 'zzz', 'bed'],
|
||||
'微笑': ['smiling', 'smile'],
|
||||
'亲亲': ['kissing', 'kiss'],
|
||||
'拥抱': ['hugging', 'hug'],
|
||||
'难过': ['sad', 'crying', 'pensive', 'worried'],
|
||||
'惊讶': ['astonished', 'screaming', 'flushed', 'exploding-head'],
|
||||
'害怕': ['screaming', 'fear', 'ghost'],
|
||||
'骷髅': ['skull', 'crossbones'],
|
||||
'幽灵': ['ghost'],
|
||||
'外星人': ['alien', 'ufo'],
|
||||
'机器人': ['robot'],
|
||||
'小丑': ['clown'],
|
||||
'恶魔': ['ogre', 'goblin', 'imp', 'devil'],
|
||||
'点赞': ['thumbs-up', 'like', 'clap'],
|
||||
'OK手势': ['ok-hand'],
|
||||
'握手': ['handshake'],
|
||||
'爱心眼': ['heart-eyes'],
|
||||
'墨镜': ['sunglasses'],
|
||||
'吐舌头': ['tongue'],
|
||||
'疲惫': ['tired', 'sleepy', 'yawning'],
|
||||
'生病': ['nauseated', 'vomiting', 'thermometer'],
|
||||
'头晕': ['dizzy', 'woozy'],
|
||||
// —— 餐饮 ——
|
||||
'咖啡': ['hot-beverage', 'coffee', 'teacup', 'beverage'],
|
||||
'茶': ['teacup', 'hot-beverage', 'beverage'],
|
||||
'啤酒': ['beer', 'mug', 'clinking-beer-mugs'],
|
||||
'干杯': ['clinking', 'clinking-beer-mugs', 'clinking-glasses'],
|
||||
'香槟': ['bottle-with-popping-cork', 'clinking-glasses'],
|
||||
'红酒': ['wine-glass', 'wine'],
|
||||
'鸡尾酒': ['cocktail'],
|
||||
'披萨': ['pizza'],
|
||||
'汉堡': ['hamburger'],
|
||||
'薯条': ['fries'],
|
||||
'寿司': ['sushi'],
|
||||
'饺子': ['dumpling'],
|
||||
'面条': ['spaghetti', 'steaming-bowl'],
|
||||
'米饭': ['rice', 'rice-ball', 'cooked-rice'],
|
||||
'火锅': ['pot-of-food'],
|
||||
'便当': ['bento-box'],
|
||||
'面包': ['bread', 'baguette', 'croissant'],
|
||||
'奶酪': ['cheese'],
|
||||
'糖果': ['candy', 'lollipop'],
|
||||
'巧克力': ['chocolate'],
|
||||
'饼干': ['cookie'],
|
||||
'冰淇淋': ['ice-cream', 'ice'],
|
||||
'水果': ['apple', 'banana', 'orange', 'grapes', 'melon', 'peach', 'pear', 'pineapple', 'strawberry', 'cherries', 'lemon', 'watermelon', 'kiwi'],
|
||||
'牛奶': ['glass-of-milk', 'milk'],
|
||||
'鸡蛋': ['egg', 'cooking'],
|
||||
// —— 动物 ——
|
||||
'马': ['horse'],
|
||||
'猪': ['pig'],
|
||||
'鸡': ['chicken', 'rooster', 'hatching-chick'],
|
||||
'猴子': ['monkey'],
|
||||
'猫': ['cat', 'kitten'],
|
||||
'狗': ['dog', 'puppy'],
|
||||
'兔子': ['rabbit'],
|
||||
'熊': ['bear'],
|
||||
'老虎': ['tiger'],
|
||||
'狮子': ['lion'],
|
||||
'大象': ['elephant'],
|
||||
'熊猫': ['panda'],
|
||||
'狐狸': ['fox'],
|
||||
'狼': ['wolf'],
|
||||
'青蛙': ['frog'],
|
||||
'鱼': ['fish', 'tropical-fish'],
|
||||
'鸟': ['bird', 'hatching-chick'],
|
||||
'蝴蝶': ['butterfly'],
|
||||
'蜜蜂': ['honeybee', 'bee'],
|
||||
'蛇': ['snake'],
|
||||
'乌龟': ['turtle'],
|
||||
'鲸鱼': ['whale'],
|
||||
'海豚': ['dolphin'],
|
||||
'螃蟹': ['crab'],
|
||||
'虾': ['shrimp'],
|
||||
'章鱼': ['octopus'],
|
||||
'恐龙': ['dinosaur', 't-rex', 'sauropod'],
|
||||
'独角兽': ['unicorn'],
|
||||
// —— 人物与职业 ——
|
||||
'宇航员': ['astronaut'],
|
||||
'医生': ['health-worker', 'stethoscope', 'hospital'],
|
||||
'护士': ['health-worker', 'nurse'],
|
||||
'警察': ['police', 'cop'],
|
||||
'消防员': ['firefighter', 'fire-engine'],
|
||||
'老师': ['teacher', 'student', 'school'],
|
||||
'学生': ['student', 'graduation'],
|
||||
'厨师': ['cook', 'chef'],
|
||||
'农民': ['farmer'],
|
||||
'歌手': ['singer', 'microphone'],
|
||||
'画家': ['artist', 'palette'],
|
||||
'科学家': ['scientist', 'microscope', 'test-tube'],
|
||||
'飞行员': ['pilot', 'airplane'],
|
||||
'情侣': ['couple', 'two-hearts'],
|
||||
// —— 物品与符号 ——
|
||||
'皇冠': ['crown'],
|
||||
'钻石': ['gem-stone', 'diamond'],
|
||||
'戒指': ['ring'],
|
||||
'钱': ['money', 'dollar', 'coin', 'banknote', 'yen', 'euro', 'pound', 'credit-card'],
|
||||
'红包': ['red-envelope'],
|
||||
'信封': ['envelope', 'mail'],
|
||||
'礼物': ['wrapped-gift', 'gift', 'ribbon'],
|
||||
'钥匙': ['key', 'locked'],
|
||||
'锁': ['locked', 'lock', 'unlock'],
|
||||
'书': ['book', 'notebook'],
|
||||
'灯泡': ['bulb', 'light-bulb', 'idea'],
|
||||
'火箭': ['rocket'],
|
||||
'地球': ['globe'],
|
||||
'闪电': ['high-voltage', 'lightning', 'zap'],
|
||||
'火焰': ['fire', 'flame'],
|
||||
'星星': ['star', 'sparkles', 'glowing-star'],
|
||||
'彩虹': ['rainbow'],
|
||||
'下雨': ['rain', 'umbrella-with-rain-drops'],
|
||||
'雪': ['snow', 'snowflake', 'snowman'],
|
||||
'云': ['cloud'],
|
||||
'太阳': ['sun', 'sunny'],
|
||||
'月亮': ['moon', 'crescent'],
|
||||
// —— 运动 ——
|
||||
'运动': ['sport', 'sports', 'sports-medal'],
|
||||
'足球': ['soccer', 'football'],
|
||||
'篮球': ['basketball'],
|
||||
'排球': ['volleyball'],
|
||||
'棒球': ['baseball'],
|
||||
'网球': ['tennis'],
|
||||
'乒乓球': ['ping-pong'],
|
||||
'羽毛球': ['badminton'],
|
||||
'保龄球': ['bowling'],
|
||||
'游泳': ['swimmer', 'swimming'],
|
||||
'跑步': ['runner', 'running'],
|
||||
'滑雪': ['skier', 'ski'],
|
||||
// —— 影音与数码 ——
|
||||
'音乐': ['musical', 'music', 'headphone'],
|
||||
'吉他': ['guitar'],
|
||||
'钢琴': ['musical-keyboard', 'piano'],
|
||||
'鼓': ['drum'],
|
||||
'相机': ['camera'],
|
||||
'电脑': ['laptop', 'desktop-computer', 'computer'],
|
||||
'手机': ['mobile-phone', 'phone'],
|
||||
'时钟': ['clock', 'alarm-clock', 'timer'],
|
||||
'日历': ['calendar'],
|
||||
'公文包': ['briefcase'],
|
||||
'文件夹': ['folder'],
|
||||
'药': ['pill', 'syringe', 'medicine'],
|
||||
'医院': ['hospital'],
|
||||
'显微镜': ['microscope'],
|
||||
'望远镜': ['telescope'],
|
||||
'卫星': ['satellite'],
|
||||
// —— 交通与自然 ——
|
||||
'飞机': ['airplane', 'flight'],
|
||||
'火车': ['train', 'bullet-train'],
|
||||
'汽车': ['automobile', 'car', 'taxi'],
|
||||
'公交': ['bus'],
|
||||
'自行车': ['bicycle', 'bike'],
|
||||
'摩托车': ['motorcycle'],
|
||||
'轮船': ['ship', 'boat', 'sailboat'],
|
||||
'救护车': ['ambulance'],
|
||||
'消防车': ['fire-engine'],
|
||||
'红绿灯': ['traffic-light'],
|
||||
'帐篷': ['tent', 'camping'],
|
||||
'山': ['mountain', 'volcano'],
|
||||
'仙人掌': ['cactus'],
|
||||
'树': ['tree', 'evergreen', 'deciduous', 'palm-tree'],
|
||||
'花': ['flower', 'blossom', 'tulip', 'bouquet', 'rose', 'sunflower'],
|
||||
'蘑菇': ['mushroom'],
|
||||
'落叶': ['fallen-leaf', 'maple-leaf'],
|
||||
// —— 节日 ——
|
||||
'圣诞': ['christmas', 'santa-claus', 'christmas-tree'],
|
||||
'圣诞树': ['christmas-tree'],
|
||||
'万圣节': ['jack-o-lantern', 'ghost', 'pumpkin'],
|
||||
'南瓜': ['jack-o-lantern', 'pumpkin'],
|
||||
'南瓜灯': ['jack-o-lantern'],
|
||||
'蔬菜': ['broccoli', 'carrot', 'cucumber', 'tomato', 'leafy-green', 'vegetable'],
|
||||
'春节': ['red-envelope', 'firecracker', 'dumpling', 'lantern']
|
||||
};
|
||||
|
||||
function merge(base, extra) {
|
||||
const out = {};
|
||||
for (const [k, v] of Object.entries(base)) out[k] = [...new Set(v)];
|
||||
@@ -117,7 +315,7 @@ function merge(base, extra) {
|
||||
}
|
||||
|
||||
function main() {
|
||||
const merged = merge(extractCnAlias(), EXTRA);
|
||||
const merged = merge(merge(extractCnAlias(), EXTRA), EMOJI_EXTRA);
|
||||
const words = Object.keys(merged).sort((a, b) => b.length - a.length); // 长词优先匹配
|
||||
const ordered = {};
|
||||
for (const w of words) ordered[w] = merged[w];
|
||||
|
||||
Reference in New Issue
Block a user