@cloud411716/fancy-webnovel 4.30.12 → 4.30.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -457,11 +457,31 @@ export function chargingBarNameDiversityProblem(records, primaryStyleKey = '', o
|
|
|
457
457
|
|
|
458
458
|
/** 每种痕迹后缀必须能由名字里的载体产生;这里只拦明显不可能的搭配。 */
|
|
459
459
|
const CHARGING_BAR_TRACE_SEMANTICS = {
|
|
460
|
-
烬: {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
460
|
+
烬: {
|
|
461
|
+
allow: /(灯|烛|香|炉|炭|纸|烟|柴|煤|签|灶|火)/,
|
|
462
|
+
note: /(烬|灰|炭|烧完|烧尽|焦灰|余火|火星)/,
|
|
463
|
+
label: '可燃物或火源',
|
|
464
|
+
},
|
|
465
|
+
印: {
|
|
466
|
+
allow: /(印|章|戳|牌|票|锁|纸|墨|笔|漆|封|捕|掌|指|刻|烙|痕|契|图|炉|灶|台|门|墙|石|木|铁|盖|压|钳|铲|带|布|衣|绳|灰|炭|火|画)/,
|
|
467
|
+
note: /(印|章|戳|掌印|指印|刻痕|烙|痕|烫痕|蜡封|封痕)/,
|
|
468
|
+
label: '可留下印记的载体',
|
|
469
|
+
},
|
|
470
|
+
香: {
|
|
471
|
+
allow: /(香|花|汤|茶|饭|味|气|炉|供|包|蒸|煮)/,
|
|
472
|
+
note: /(香|气味|香火|余味|味道)/,
|
|
473
|
+
label: '有气味或香火的载体',
|
|
474
|
+
},
|
|
475
|
+
录: {
|
|
476
|
+
allow: /(谱|册|簿|档|榜|班|名|账|籍|录)/,
|
|
477
|
+
note: /(录|册|簿|档|登记簿|名单|账本|编号)/,
|
|
478
|
+
label: '册、档或名单类载体',
|
|
479
|
+
},
|
|
480
|
+
契: {
|
|
481
|
+
allow: /(锁|绳|谱|票|约|契|注|牌|封|愿|债|押|字据|合|筹)/,
|
|
482
|
+
note: /(契|约|欠条|承诺|立约|字据|合同|算清|薄契|契纸)/,
|
|
483
|
+
label: '契约或债约载体',
|
|
484
|
+
},
|
|
465
485
|
};
|
|
466
486
|
|
|
467
487
|
/** 名字里出现这些载体时,note 至少要提到其中一个,避免“炉印”写在公交车上。 */
|
|
@@ -497,7 +517,9 @@ export function chargingBarNameGroundingProblem(records, primaryStyleKey = '') {
|
|
|
497
517
|
const semantics = CHARGING_BAR_TRACE_SEMANTICS[ending];
|
|
498
518
|
if (semantics) {
|
|
499
519
|
const body = name.slice(0, -1);
|
|
500
|
-
|
|
520
|
+
const groundedInName = semantics.allow.test(body);
|
|
521
|
+
const groundedInNote = semantics.note ? semantics.note.test(note) : false;
|
|
522
|
+
if (!groundedInName && !groundedInNote) {
|
|
501
523
|
bad.push(`「${name}」的“${ending}”缺少${semantics.label}`);
|
|
502
524
|
continue;
|
|
503
525
|
}
|