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:
sgp
2026-11-05 17:24:42 +08:00
parent 5c18bf864c
commit 409cc766a1
9 changed files with 839 additions and 35 deletions
+10 -3
View File
@@ -4,8 +4,9 @@
- 线上地址:`https://drawlogo.zhuig.com/api/v1`
- 鉴权:API Key(`X-API-Key` 请求头)
- 数据规模:图标 **371,504** 个 / 224 源;海报 **1,582** 个 / 25 源;技能元数据 130 个
- 数据规模:图标 **444,754** 个 / 263 源;海报 **2,362** 个 / 67 源;技能元数据 130 个
- 特性:支持**中文语义检索**(搜「学校」命中 school / graduation-cap / book…)、按协议过滤商用可用素材、默认排除 `-off`/`-error` 等负面变体
- 含 **3D 位图图标**(微软 Fluent Emoji 3D,1,586 个):`svg` 字段内是 `<image>` 引用的 256×256 PNG,服务端已自动内联为 data URI,调用方无需再取静态资源
> 本服务只提供**素材与技能元数据**,不提供 AI 生成 LOGO(当前 AI 生成质量不足以对外提供)。
@@ -24,6 +25,10 @@ curl -H "X-API-Key: <你的Key>" \
# 3. 查看有哪些源(免鉴权)
curl "https://drawlogo.zhuig.com/api/v1/sources"
# 4. 3D 位图图标(中文也能搜到英文命名的 3D 表情)
curl -H "X-API-Key: <你的Key>" \
"https://drawlogo.zhuig.com/api/v1/icons/search?q=爱心&source=fluent-emoji-3d&limit=5"
```
---
@@ -137,6 +142,7 @@ SVG 直链返回:
- 单色图标(`type=icon`)带 `fill="currentColor"`,颜色由 CSS 的 `color` 控制
- 多色图标(`type=emoji/brand`)保留原色,不加 `fill`
- 建议在 `<img>` 中用时手动加 `style="color:#1B4F72"`
- **3D 位图图标**(源 `fluent-emoji-3d`)的 `svg` 是一层 `<image>`,`href` 已由服务端内联为 `data:image/png;base64,...`(原图 256×256),`/icons/fluent-emoji-3d/red-heart.svg` 可直接当图片用;JSON 与 `.svg` 两种响应都是自包含的
### 6. 随机图标
@@ -167,14 +173,15 @@ GET /api/v1/skills/{id}
## 四、中文检索说明
图标名是英文(`graduation-cap`),分类是中文宽类目(`教育学习`)。为了支持「学校」「医院」「餐厅」这类词,服务内置了一张**中文语义别名表**(约 240 个高频词 → 英文词根),构建索引时为每个图标预计算别名。
图标名是英文(`graduation-cap`),分类是中文宽类目(`教育学习`)。为了支持「学校」「医院」「餐厅」这类词,服务内置了一张**中文语义别名表**(425 个高频词 → 英文词根,含表情/3D 图标场景词),构建索引时为每个图标预计算别名。
- 搜「学校」→ school / graduation-cap / book / backpack…
- 搜「医院」→ hospital / ambulance / stethoscope / pill…
- 搜「工厂」→ factory / building-factory…
- 搜「飞机」→ plane / plane-landing / plane-takeoff…
- 搜「爱心」→ heart / red-heart / two-hearts…(3D 表情等英文命名素材同样命中)
词表在 [build-index.js](./build-index.js) 的 `CN_ALIAS`,新增行业词直接加进去并重建索引即可。
词表产物是 [js/data/cn-tags.js](../js/data/cn-tags.js),由 [scripts/gen-cn-tags.js](../scripts/gen-cn-tags.js) 生成(种子 = [build-index.js](./build-index.js) 的 `CN_ALIAS` + 生成器内 `EXTRA` / `EMOJI_EXTRA` 场景词)。加词请改生成器后重跑 `node scripts/gen-cn-tags.js`,再重建索引。
---
+1 -1
View File
@@ -34,7 +34,7 @@ h1{font-size:16px}h2{font-size:14px;margin:14px 0 6px}
<script src="js/sticker-skills/core.js?v=20260823e"></script>
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
<script src="js/data/builtin-icons.js?v=20261105d"></script>
<script src="js/data/cn-tags.js?v=20261104a"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/core/iconlib.js?v=20261105d"></script>
<script>
+1 -1
View File
@@ -335,7 +335,7 @@
<script src="js/skills/export.js?v=20260823d"></script>
<script src="js/ui/panels.js?v=20261105e"></script>
<script src="js/data/builtin-icons.js?v=20261105d"></script>
<script src="js/data/cn-tags.js?v=20261104a"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/core/iconlib.js?v=20261105d"></script>
<script src="js/app.js"></script>
</body>
+2 -2
View File
@@ -217,8 +217,8 @@
<script src="js/sticker-skills/core.js?v=20260823e"></script>
<script src="js/sticker-skills/skills.js?v=20260824a"></script>
<script src="js/data/builtin-icons.js?v=20261105d"></script>
<script src="js/data/cn-tags.js?v=20261104a"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/core/iconlib.js?v=20261105d"></script>
<script src="js/ui/emoji.js?v=20260824a"></script>
<script src="js/ui/emoji.js?v=20261105a"></script>
</body>
</html>
+1 -1
View File
@@ -337,7 +337,7 @@
<script src="js/skills/export.js?v=20260824a"></script>
<script src="js/ui/panels.js?v=20261105e"></script>
<script src="js/data/builtin-icons.js?v=20261105d"></script>
<script src="js/data/cn-tags.js?v=20261104a"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/core/iconlib.js?v=20261105d"></script>
<script src="js/app.js"></script>
</body>
+621 -24
View File
@@ -84,6 +84,9 @@
"logo",
"brand"
],
"OK手势": [
"ok-hand"
],
"互联网": [
"internet",
"web",
@@ -253,6 +256,86 @@
"六边形": [
"hexagon"
],
"外星人": [
"alien",
"ufo"
],
"爱心眼": [
"heart-eyes"
],
"吐舌头": [
"tongue"
],
"鸡尾酒": [
"cocktail"
],
"巧克力": [
"chocolate"
],
"冰淇淋": [
"ice-cream",
"ice"
],
"独角兽": [
"unicorn"
],
"宇航员": [
"astronaut"
],
"消防员": [
"firefighter",
"fire-engine"
],
"科学家": [
"scientist",
"microscope",
"test-tube"
],
"飞行员": [
"pilot",
"airplane"
],
"乒乓球": [
"ping-pong"
],
"羽毛球": [
"badminton"
],
"保龄球": [
"bowling"
],
"公文包": [
"briefcase"
],
"显微镜": [
"microscope"
],
"望远镜": [
"telescope"
],
"摩托车": [
"motorcycle"
],
"消防车": [
"fire-engine"
],
"红绿灯": [
"traffic-light"
],
"仙人掌": [
"cactus"
],
"圣诞树": [
"christmas-tree"
],
"万圣节": [
"jack-o-lantern",
"ghost",
"pumpkin"
],
"南瓜灯": [
"jack-o-lantern"
],
"学校": [
"school",
"graduation",
@@ -316,7 +399,10 @@
"cup",
"cafe",
"mug",
"tea"
"tea",
"hot-beverage",
"teacup",
"beverage"
],
"银行": [
"bank",
@@ -526,7 +612,9 @@
"truck",
"wheel",
"road",
"engine"
"engine",
"automobile",
"taxi"
],
"航空": [
"plane",
@@ -617,7 +705,8 @@
"headphone",
"speaker",
"audio",
"mic"
"mic",
"musical"
],
"摄影": [
"camera",
@@ -771,7 +860,9 @@
"star",
"sparkle",
"favorite",
"rating"
"rating",
"sparkles",
"glowing-star"
],
"箭头": [
"arrow",
@@ -801,7 +892,8 @@
"gift",
"present",
"box",
"ribbon"
"ribbon",
"wrapped-gift"
],
"旗帜": [
"flag",
@@ -820,7 +912,8 @@
"lightning",
"flash",
"bolt",
"power"
"power",
"high-voltage"
],
"火焰": [
"fire",
@@ -851,7 +944,8 @@
"moon",
"night",
"dark",
"sleep"
"sleep",
"crescent"
],
"相机": [
"camera",
@@ -875,13 +969,15 @@
"laptop",
"desktop",
"monitor",
"pc"
"pc",
"desktop-computer"
],
"手机": [
"phone",
"mobile",
"smartphone",
"device"
"device",
"mobile-phone"
],
"平板": [
"tablet",
@@ -917,7 +1013,8 @@
"bulb",
"idea",
"light",
"lamp"
"lamp",
"light-bulb"
],
"齿轮": [
"gear",
@@ -973,7 +1070,8 @@
"police",
"badge",
"security",
"law"
"law",
"cop"
],
"法庭": [
"court",
@@ -1041,7 +1139,8 @@
"train",
"railway",
"transport",
"travel"
"travel",
"bullet-train"
],
"公交": [
"bus",
@@ -1140,13 +1239,18 @@
"bread",
"food",
"bakery",
"bake"
"bake",
"baguette",
"croissant"
],
"蛋糕": [
"cake",
"dessert",
"birthday",
"food"
"food",
"birthday-cake",
"shortcake",
"cupcake"
],
"披萨": [
"pizza",
@@ -1158,7 +1262,8 @@
"burger",
"food",
"fastfood",
"restaurant"
"restaurant",
"hamburger"
],
"饮料": [
"drink",
@@ -1248,7 +1353,8 @@
"award",
"win",
"prize",
"achievement"
"achievement",
"medal"
],
"排名": [
"ranking",
@@ -1389,7 +1495,8 @@
"lock",
"security",
"access",
"password"
"password",
"locked"
],
"警报": [
"alert",
@@ -1576,7 +1683,8 @@
"clock",
"time",
"watch",
"timer"
"timer",
"alarm-clock"
],
"提醒": [
"bell",
@@ -1697,7 +1805,8 @@
"点赞": [
"like",
"thumbs-up",
"heart"
"heart",
"clap"
],
"评论": [
"comment",
@@ -1794,6 +1903,415 @@
"三角": [
"triangle"
],
"爱心": [
"red-heart",
"heart",
"love",
"two-hearts",
"heart-with-ribbon"
],
"心碎": [
"broken-heart"
],
"奖牌": [
"medal",
"sports-medal",
"trophy"
],
"派对": [
"party",
"confetti",
"partying",
"balloon"
],
"庆祝": [
"party",
"confetti",
"partying",
"sparkles"
],
"生日": [
"birthday",
"birthday-cake",
"balloon"
],
"笑脸": [
"smiling",
"grinning",
"smile"
],
"大笑": [
"laughing",
"grinning",
"joy"
],
"生气": [
"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"
],
"小丑": [
"clown"
],
"恶魔": [
"ogre",
"goblin",
"imp",
"devil"
],
"握手": [
"handshake"
],
"墨镜": [
"sunglasses"
],
"疲惫": [
"tired",
"sleepy",
"yawning"
],
"生病": [
"nauseated",
"vomiting",
"thermometer"
],
"头晕": [
"dizzy",
"woozy"
],
"啤酒": [
"beer",
"mug",
"clinking-beer-mugs"
],
"干杯": [
"clinking",
"clinking-beer-mugs",
"clinking-glasses"
],
"香槟": [
"bottle-with-popping-cork",
"clinking-glasses"
],
"红酒": [
"wine-glass",
"wine"
],
"薯条": [
"fries"
],
"寿司": [
"sushi"
],
"饺子": [
"dumpling"
],
"面条": [
"spaghetti",
"steaming-bowl"
],
"米饭": [
"rice",
"rice-ball",
"cooked-rice"
],
"火锅": [
"pot-of-food"
],
"便当": [
"bento-box"
],
"奶酪": [
"cheese"
],
"糖果": [
"candy",
"lollipop"
],
"饼干": [
"cookie"
],
"水果": [
"apple",
"banana",
"orange",
"grapes",
"melon",
"peach",
"pear",
"pineapple",
"strawberry",
"cherries",
"lemon",
"watermelon",
"kiwi"
],
"牛奶": [
"glass-of-milk",
"milk"
],
"鸡蛋": [
"egg",
"cooking"
],
"猴子": [
"monkey"
],
"兔子": [
"rabbit"
],
"老虎": [
"tiger"
],
"狮子": [
"lion"
],
"大象": [
"elephant"
],
"熊猫": [
"panda"
],
"狐狸": [
"fox"
],
"青蛙": [
"frog"
],
"蝴蝶": [
"butterfly"
],
"蜜蜂": [
"honeybee",
"bee"
],
"乌龟": [
"turtle"
],
"鲸鱼": [
"whale"
],
"海豚": [
"dolphin"
],
"螃蟹": [
"crab"
],
"章鱼": [
"octopus"
],
"恐龙": [
"dinosaur",
"t-rex",
"sauropod"
],
"医生": [
"health-worker",
"stethoscope",
"hospital"
],
"护士": [
"health-worker",
"nurse"
],
"老师": [
"teacher",
"student",
"school"
],
"学生": [
"student",
"graduation"
],
"厨师": [
"cook",
"chef"
],
"农民": [
"farmer"
],
"歌手": [
"singer",
"microphone"
],
"画家": [
"artist",
"palette"
],
"情侣": [
"couple",
"two-hearts"
],
"皇冠": [
"crown"
],
"钻石": [
"gem-stone",
"diamond"
],
"戒指": [
"ring"
],
"红包": [
"red-envelope"
],
"信封": [
"envelope",
"mail"
],
"彩虹": [
"rainbow"
],
"下雨": [
"rain",
"umbrella-with-rain-drops"
],
"运动": [
"sport",
"sports",
"sports-medal"
],
"足球": [
"soccer",
"football"
],
"篮球": [
"basketball"
],
"排球": [
"volleyball"
],
"棒球": [
"baseball"
],
"网球": [
"tennis"
],
"游泳": [
"swimmer",
"swimming"
],
"跑步": [
"runner",
"running"
],
"滑雪": [
"skier",
"ski"
],
"吉他": [
"guitar"
],
"钢琴": [
"musical-keyboard",
"piano"
],
"轮船": [
"ship",
"boat",
"sailboat"
],
"帐篷": [
"tent",
"camping"
],
"蘑菇": [
"mushroom"
],
"落叶": [
"fallen-leaf",
"maple-leaf"
],
"圣诞": [
"christmas",
"santa-claus",
"christmas-tree"
],
"南瓜": [
"jack-o-lantern",
"pumpkin"
],
"蔬菜": [
"broccoli",
"carrot",
"cucumber",
"tomato",
"leafy-green",
"vegetable"
],
"春节": [
"red-envelope",
"firecracker",
"dumpling",
"lantern"
],
"云": [
"cloud",
"server",
@@ -1806,7 +2324,8 @@
"unlock",
"key",
"shield",
"password"
"password",
"locked"
],
"心": [
"heart",
@@ -1825,7 +2344,8 @@
"medicine",
"drug",
"health",
"pharmacy"
"pharmacy",
"syringe"
],
"船": [
"ship",
@@ -1853,20 +2373,29 @@
"nature",
"forest",
"eco",
"plant"
"plant",
"evergreen",
"deciduous",
"palm-tree"
],
"花": [
"flower",
"nature",
"beauty",
"plant",
"bloom"
"bloom",
"blossom",
"tulip",
"bouquet",
"rose",
"sunflower"
],
"狗": [
"dog",
"pet",
"animal",
"paw"
"paw",
"puppy"
],
"猫": [
"cat",
@@ -1880,6 +2409,74 @@
"drink",
"bar",
"alcohol"
],
"哭": [
"crying-face",
"crying",
"sad",
"sob"
],
"茶": [
"teacup",
"hot-beverage",
"beverage"
],
"马": [
"horse"
],
"猪": [
"pig"
],
"鸡": [
"chicken",
"rooster",
"hatching-chick"
],
"熊": [
"bear"
],
"狼": [
"wolf"
],
"鱼": [
"fish",
"tropical-fish"
],
"鸟": [
"bird",
"hatching-chick"
],
"蛇": [
"snake"
],
"虾": [
"shrimp"
],
"钱": [
"money",
"dollar",
"coin",
"banknote",
"yen",
"euro",
"pound",
"credit-card"
],
"书": [
"book",
"notebook"
],
"雪": [
"snow",
"snowflake",
"snowman"
],
"鼓": [
"drum"
],
"山": [
"mountain",
"volcano"
]
};
});
+3 -1
View File
@@ -417,7 +417,9 @@ const HGB_EmojiUI = (function () {
// 预载表情主力单色源,保证搜索可用
const core = (typeof HGB_AvatarGen !== 'undefined' && HGB_AvatarGen.AVATAR_CORE_SOURCES) ||
['lucide', 'tabler', 'feather', 'mdi', 'fluent', 'solar'];
await HGB_IconLib.preload(core);
// 3D 位图表情不在轻量搜索索引内(iconIndex 仅 1200 条采样),表情工作区直接预载,
// 否则中文「爱心 / 奖牌 / 派对」搜不到 Fluent Emoji 3D
await HGB_IconLib.preload(core.concat(['fluent-emoji-3d']));
await searchBuiltin();
}
async function searchBuiltin(append) {
+199 -1
View File
@@ -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];
+1 -1
View File
@@ -186,7 +186,7 @@
<script src="js/core/ai.js?v=20260927a"></script>
<script src="js/core/aiDesigner.js?v=20260812h"></script>
<script src="js/data/builtin-icons.js?v=20261105d"></script>
<script src="js/data/cn-tags.js?v=20261104a"></script>
<script src="js/data/cn-tags.js?v=20261105a"></script>
<script src="js/core/iconlib.js?v=20261105d"></script>
<script src="js/skills/core.js?v=20260824a"></script>
<script src="js/skills/layout.js?v=20260823d"></script>