瀏覽代碼

解决预处理中表格数据可能漏掉的问题以及标点符号没去干净的问题

rogel 4 年之前
父節點
當前提交
c9afa77200
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      BiddingKG/dl/interface/Preprocessing.py

+ 1 - 1
BiddingKG/dl/interface/Preprocessing.py

@@ -688,7 +688,7 @@ def tableToText(soup):
                                     key_values = [1]
                                 if table_occurence[i-loop_i][j]["type"] in key_values:
                                     if find_flag:
-                                        if table_occurence[i-loop_i]["text"]!=temp_head:
+                                        if table_occurence[i-loop_i][j]["text"]!=temp_head:
                                             top_head = table_occurence[i-loop_i][j]["text"]+":"+top_head
                                     else:
                                         top_head = table_occurence[i-loop_i][j]["text"]+":"+top_head