Просмотр исходного кода

破产清算案项目名称修改

lsm 6 месяцев назад
Родитель
Сommit
74d33a7509
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      BiddingKG/dl/interface/extract.py

+ 3 - 0
BiddingKG/dl/interface/extract.py

@@ -284,6 +284,9 @@ def predict(doc_id,text,title="",page_time="",web_source_no='',web_source_name="
 
     start_time = time.time() # 项目编号、名称提取
     codeName = predictor.getPredictor("codeName").predict(list_sentences,MAX_AREA=5000,list_entitys=list_entitys)
+    if re.search('破产清算案', title):
+        end = re.search('破产清算案', title).end()
+        codeName[0]['name'] = title[:end]
     log("get codename done of doc_id%s"%(doc_id))
     cost_time["codename"] = round(time.time()-start_time,2)