File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 实现步骤
2+
3+ 目前看需要这么几步:
4+
5+ 1 . 编写脚本,根据原始数据生成候选名数据库
6+ 1 . 制定候选名字段
7+ 2 . 制定评分规则
8+ 2 . 编订筛选规则,根据规范生成筛选条件
9+ 3 . 编写脚本,根据筛选条件,给出候选名
10+ 4 . 精细筛选,例如猜你喜欢。根据评分,对候选名进行排序
11+
12+
13+ # 具体实现
14+
15+ ## 评分规则
16+
17+ > 先整理具体评分项,不看是否可实现
18+
19+ | 层级 | 类型 | 示例 |
20+ | -------- | -------- | ---------------------------- |
21+ | 基础规则 | 硬性过滤 | 生僻字、谐音歧义、重名率过高 |
22+ | 音律规则 | 发音 | 平仄、声母重复 |
23+ | 文化规则 | 来源质量 | 是否有典故 |
24+ | 语义规则 | 含义质量 | 是否正向含义 |
25+ | 结构规则 | 字形结构 | 左右对称、笔画均衡 |
26+
Original file line number Diff line number Diff line change 1+ export type char = {
2+ // 具体字
3+ "char" : "景" ,
4+ // 对应拼音+音调,可能有多个
5+ "pinyin" : [ "jing3" ] ,
6+ "tone" : 3 ,
7+ "radical" : "日" ,
8+ "strokes" : 12 ,
9+ "structure" : "上下" ,
10+ "isPolyphone" : false ,
11+ "frequency" : 38
12+ }
13+
14+
15+ export type name = {
16+ "name" : "景行" ,
17+ "id" : "a91f2c" ,
18+ "length" : 2 ,
19+
20+ "chars" : [
21+ {
22+ "char" : "景" ,
23+ "pinyin" : [ "jing3" ] ,
24+ "tone" : 3 ,
25+ "radical" : "日" ,
26+ "strokes" : 12 ,
27+ "structure" : "上下" ,
28+ "isPolyphone" : false ,
29+ "frequency" : 38
30+ } ,
31+ {
32+ "char" : "行" ,
33+ "pinyin" : [ "xing2" ] ,
34+ "tone" : 2 ,
35+ "radical" : "彳" ,
36+ "strokes" : 6 ,
37+ "structure" : "左右" ,
38+ "isPolyphone" : true ,
39+ "frequency" : 72
40+ }
41+ ] ,
42+
43+ "phonetic" : {
44+ "initials" : [ "j" , "x" ] ,
45+ "finals" : [ "ing" , "ing" ] ,
46+ "tones" : [ 3 , 2 ] ,
47+ "tonePattern" : "仄平" ,
48+ "doubleInitial" : false ,
49+ "doubleFinal" : true ,
50+ "smoothScore" : 82
51+ } ,
52+
53+ "semantic" : {
54+ "meaningScore" : 91 ,
55+ "sentiment" : "positive" ,
56+ "tags" : [ "光明" , "远志" ]
57+ } ,
58+
59+ "culture" : {
60+ "hasSource" : true ,
61+ "sourceType" : [ "诗经" ] ,
62+ "sourceScore" : 95
63+ } ,
64+
65+ "rarity" : {
66+ "charFreqAvg" : 55 ,
67+ "nameFreq" : 12 ,
68+ "rarityScore" : 88
69+ } ,
70+
71+ "visual" : {
72+ "symmetry" : false ,
73+ "balanceScore" : 76
74+ } ,
75+
76+ "score" : {
77+ "overall" : 89.4 ,
78+ "breakdown" : {
79+ "phonetic" : 82 ,
80+ "semantic" : 91 ,
81+ "culture" : 95 ,
82+ "rarity" : 88 ,
83+ "visual" : 76
84+ }
85+ } ,
86+
87+ "flags" : {
88+ "isCommon" : false ,
89+ "hasRareChar" : false ,
90+ "isHardPronounce" : false
91+ }
92+ }
Original file line number Diff line number Diff line change 1+ # 核心目标:
2+
3+ 用户能在 60 秒内得到一个满意的三字姓名
4+
15# 项目原理
26
371 . 生成候选人名库
You can’t perform that action at this time.
0 commit comments