浏览代码

html解析切词修改

huj 4 年之前
父节点
当前提交
2a68691ba3
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      trans/src/main/java/com/lantone/qc/trans/beilun/util/CommonAnalysisUtil.java

+ 3 - 0
trans/src/main/java/com/lantone/qc/trans/beilun/util/CommonAnalysisUtil.java

@@ -134,6 +134,9 @@ public class CommonAnalysisUtil {
         beforeTitle = titles.get(Math.max(depth - 1, 0));
         beforeTitle = titles.get(Math.max(depth - 1, 0));
         title = titles.get(Math.min(depth, titles.size() - 1));
         title = titles.get(Math.min(depth, titles.size() - 1));
         if (depth == titles.size()) {
         if (depth == titles.size()) {
+            if (line.contains("\n")) {
+                line = line.split("\n")[0];
+            }
             value = line;
             value = line;
             structureMap.put(beforeTitle, value.trim());
             structureMap.put(beforeTitle, value.trim());
             return;
             return;