瀏覽代碼

切词工具修改

rengb 5 年之前
父節點
當前提交
e45e6d531d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      trans/src/main/java/com/lantone/qc/trans/comsis/Preproc.java

+ 4 - 1
trans/src/main/java/com/lantone/qc/trans/comsis/Preproc.java

@@ -1,6 +1,7 @@
 package com.lantone.qc.trans.comsis;
 
 import com.google.common.collect.Maps;
+import com.lantone.qc.pub.util.StringUtil;
 
 import java.util.HashMap;
 import java.util.LinkedHashMap;
@@ -101,7 +102,9 @@ public class Preproc {
 
         Map<String, String> sectionsNew = Maps.newHashMap();
         sections.keySet().forEach(key -> {
-            sectionsNew.put(key.replaceAll("[\\s\\p{Zs}]", ""), sections.get(key));
+            if (StringUtil.isNotBlank(key)) {
+                sectionsNew.put(key.replaceAll("[\\s\\p{Zs}]", ""), sections.get(key));
+            }
         });
 
         return sectionsNew;