Browse Source

补齐常见需要过滤的符号

neko 5 years ago
parent
commit
a6b7163d92
1 changed files with 3 additions and 2 deletions
  1. 3 2
      hutool-dfa/src/main/java/cn/hutool/dfa/StopChar.java

+ 3 - 2
hutool-dfa/src/main/java/cn/hutool/dfa/StopChar.java

@@ -11,7 +11,7 @@ import cn.hutool.core.collection.CollUtil;
  */
 public class StopChar {
 	/** 不需要处理的词,如标点符号、空格等 */
-	public static final Set<Character> STOP_WORD = CollUtil.newHashSet(new Character[] { ' ', '\'', '、', '。', //
+	public static final Set<Character> STOP_WORD = CollUtil.newHashSet(' ', '\'', '、', '。', //
 			'·', 'ˉ', 'ˇ', '々', '—', '~', '‖', '…', '‘', '’', '“', '”', '〔', '〕', '〈', '〉', '《', '》', '「', '」', '『', //
 			'』', '〖', '〗', '【', '】', '±', '+', '-', '×', '÷', '∧', '∨', '∑', '∏', '∪', '∩', '∈', '√', '⊥', '⊙', '∫', //
 			'∮', '≡', '≌', '≈', '∽', '∝', '≠', '≮', '≯', '≤', '≥', '∞', '∶', '∵', '∴', '∷', '♂', '♀', '°', '′', '〃', //
@@ -26,7 +26,8 @@ public class StopChar {
 			'Υ', 'Φ', 'Χ', 'Ψ', 'Ω', 'α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', //
 			'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω', '(', ')', '〔', '〕', '^', '﹊', '﹍', '╭', '╮', '╰', '╯', '', '_', //
 			'', '^', '(', '^', ':', '!', '/', '\\', '\"', '<', '>', '`', '·', '。', '{', '}', '~', '~', '(', ')', '-', //
-			'√', '$', '@', '*', '&', '#', '卐', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄', '㏎', '㏑', '㏒', '㏕' });
+			'√', '$', '@', '*', '&', '#', '卐', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄', '㏎', '㏑', '㏒', '㏕', '+', '=', '?',
+	                ':', '.', '!', ';', ']','|','%');
 
 	/**
 	 * 判断指定的词是否是不处理的词。 如果参数为空,则返回true,因为空也属于不处理的字符。