Explorar o código

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

rogel %!s(int64=4) %!d(string=hai) anos
pai
achega
c9afa77200
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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