Skip to content

Commit d0d0666

Browse files
committed
增加条件:中文文献一般不用到的区块
1 parent 31fe997 commit d0d0666

File tree

2 files changed

+71
-35
lines changed

2 files changed

+71
-35
lines changed

index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,32 @@ <h1 style="text-align: center;">汉字 关联及变体 文本 全文 可视化
196196
(简体)头发由湿变干
197197
(日式)頭髪由濕変幹
198198
(其他)頭髮由濕變⼲
199+
200+
英文标点:~!@#$%^*()_+`=-,./?[]{}|\
201+
202+
中文标点:~!¥……()——·「」、,。《》?“”『』
203+
204+
单位:°′″$£¥‰%℃¤
205+
206+
全角符号:qwAS12!@#¥
207+
208+
㈠㈡ ⅠⅡⅢ⒈⒉⒊⒖⒗⒘①②⑺⑹⒄⒃
209+
210+
数学:≡≠=±+∧∨
211+
212+
拼音:ɑāáǎàüêzhùyīnzìmǔguóyīn
213+
214+
注音:ㄡㄗㄚㄠㄝㄓㄔㄕㄖㄒㄏㄐㄍㄇㄈ
215+
216+
特殊:■△▲§№☆★○●◎
217+
218+
日文假名:さしすせそづサニヌネノハ
219+
220+
制表符:┑┒┓┝┣┲┿╃
221+
222+
希腊:αβξκΑΒΞΚ
223+
224+
俄文:ячсмЯЧСМ
199225
</textarea>
200226
</div>
201227
<button id="btn_checkessay">全文检视</button>

unusual_conditions.js

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ const unusual_cond = {
6767
// },
6868

6969

70-
// "blk_others": {
71-
// full_desc: "既不属于基本西文ASCII也非汉字",
72-
// short_desc: "其",
73-
// default_checked: true,
74-
// },
70+
"blk_others": {
71+
full_desc: "属于中文文献一般不会用到的区块",
72+
short_desc: "其",
73+
default_checked: true,
74+
},
7575
"blk_nobelong": {
7676
full_desc: "不属于任何区块",
7777
short_desc: "非",
@@ -266,33 +266,43 @@ unusual_cond['blk_nobelong'].func = function(c, mapObj, cInfo) {
266266

267267

268268

269-
// unusual_cond['is_cjk'].func = function(c) {
270-
// const blks = [
271-
// "CJK Radicals Supplement",
272-
// "CJK Symbols and Punctuation",
273-
// "CJK Strokes",
274-
// "Enclosed CJK Letters and Months",
275-
// "CJK Compatibility",
276-
// "CJK Unified Ideographs Extension A",
277-
// "CJK Unified Ideographs",
278-
// "CJK Compatibility Ideographs",
279-
// "CJK Compatibility Forms",
280-
// "CJK Unified Ideographs Extension B",
281-
// "CJK Unified Ideographs Extension C",
282-
// "CJK Unified Ideographs Extension D",
283-
// "CJK Unified Ideographs Extension E",
284-
// "CJK Unified Ideographs Extension F",
285-
// "CJK Compatibility Ideographs Supplement",
286-
// "CJK Unified Ideographs Extension G",
287-
// "CJK Unified Ideographs Extension H",
288-
// "Kangxi Radicals",
289-
// // TODO 其他区
290-
//
291-
// // TODO 中文标点特殊处理
292-
// ];
293-
//
294-
// var blk = getCpBlock( c2utf16(c).hex );
295-
//
296-
// if ( blks.includes(blk) )
297-
// return true;
298-
// };
269+
unusual_cond['blk_others'].func = function(c, mapObj, cInfo) {
270+
const blks = [
271+
"CJK Radicals Supplement",
272+
"CJK Symbols and Punctuation",
273+
"CJK Strokes",
274+
"Enclosed CJK Letters and Months",
275+
"CJK Compatibility",
276+
"CJK Unified Ideographs Extension A",
277+
"CJK Unified Ideographs",
278+
"CJK Compatibility Ideographs",
279+
"CJK Compatibility Forms",
280+
"CJK Unified Ideographs Extension B",
281+
"CJK Unified Ideographs Extension C",
282+
"CJK Unified Ideographs Extension D",
283+
"CJK Unified Ideographs Extension E",
284+
"CJK Unified Ideographs Extension F",
285+
"CJK Compatibility Ideographs Supplement",
286+
"CJK Unified Ideographs Extension G",
287+
"CJK Unified Ideographs Extension H",
288+
"Kangxi Radicals",
289+
290+
"Halfwidth and Fullwidth Forms",
291+
"General Punctuation",
292+
// "Latin-1 Supplement",
293+
"Basic Latin",
294+
"Enclosed Alphanumerics",
295+
296+
];
297+
298+
var blk ;
299+
if (cInfo)
300+
blk = cInfo.blk;
301+
else
302+
blk = getCpBlock( c2utf16(c).hex );
303+
304+
if ( ! blk )
305+
return false;
306+
if ( ! blks.includes(blk) )
307+
return true;
308+
};

0 commit comments

Comments
 (0)