Browse Source

Merge branch 'master' of http://192.168.2.103:3000/luojiehua/BIDI_ML_INFO_EXTRACTION

znj 6 months ago
parent
commit
ebc1a58ed7
1 changed files with 3 additions and 0 deletions
  1. 3 0
      BiddingKG/dl/interface/extract.py

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

@@ -285,6 +285,9 @@ def predict(doc_id,text,title="",page_time="",web_source_no='',web_source_name="
 
 
     start_time = time.time() # 项目编号、名称提取
     start_time = time.time() # 项目编号、名称提取
     codeName = predictor.getPredictor("codeName").predict(list_sentences,MAX_AREA=5000,list_entitys=list_entitys)
     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))
     log("get codename done of doc_id%s"%(doc_id))
     cost_time["codename"] = round(time.time()-start_time,2)
     cost_time["codename"] = round(time.time()-start_time,2)