File tree Expand file tree Collapse file tree
src/main/java/com/hankcs/hanlp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ public class CharType
6060 */
6161 public static final byte CT_INDEX = CT_SINGLE + 5 ;
6262
63+ /**
64+ * 中文数字
65+ */
66+ public static final byte CT_CNUM = CT_SINGLE + 6 ;
67+
6368 /**
6469 * 其他
6570 */
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ public class TextUtility
4040 */
4141 public static final int CT_INDEX = CT_SINGLE + 5 ;// HanYu Pinyin
4242
43+ /**
44+ * 中文数字
45+ */
46+ public static final int CT_CNUM = CT_SINGLE + 6 ;
47+
4348 /**
4449 * 其他
4550 */
@@ -59,7 +64,8 @@ public static int charType(String str)
5964 {
6065 if (str != null && str .length () > 0 )
6166 {
62- if ("零○〇一二两三四五六七八九十廿百千万亿壹贰叁肆伍陆柒捌玖拾佰仟" .contains (str )) return CT_NUM ;
67+ if ("零○〇一二两三四五六七八九十廿百千万亿壹贰叁肆伍陆柒捌玖拾佰仟" .contains (str )) return CT_CNUM ;
68+ System .out .println ("lijian" );
6369 byte [] b ;
6470 try
6571 {
You can’t perform that action at this time.
0 commit comments