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

新增合同签订时间、合同起始时间、合同结束时间字段的提取

znj 1 год назад
Родитель
Сommit
0b070ea9c5
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      BiddingKG/dl_dev/test/test4.py

+ 4 - 3
BiddingKG/dl_dev/test/test4.py

@@ -54,6 +54,7 @@ def test(name,content,_url=None):
 
     # _url = "http://1255640119316927.cn-hangzhou.pai-eas.aliyuncs.com/api/predict/content_extract"
     _url = "http://127.0.0.1:15030/content_extract"
+    _url = "http://192.168.2.102:15030/content_extract"
     # _url = "http://192.168.2.102:15030/industry_extract"
     # _url = "http://192.168.2.102:15030/content_extract"
 
@@ -96,7 +97,7 @@ def run_one():
     from BiddingKG.dl.interface.extract import predict
     # filename = "比地_52_79929693.html"
     #text = codecs.open("C:\\Users\\User\\Desktop\\数据20191014\\"+filename,"r",encoding="utf8").read()
-    text = codecs.open("C:\\Users\\\Administrator\\Desktop\\2.html","r",encoding="utf8").read()
+    text = codecs.open("C:\\Users\\Administrator\\Desktop\\test12354.txt","r",encoding="utf8").read()
     # text = codecs.open("2.html","r",encoding="utf8").read()
     content = str(BeautifulSoup(text).find("div",id="pcontent"))
     a = time.time()
@@ -105,12 +106,12 @@ def run_one():
     # '''
     print("start")
     _time1 = time.time()
-    print(predict("12", text,""))
+    print(predict("12", text,"市属公立医院医用耗材及其他设备招标结果每两周公示(10.16-10.31) "))
     # test(12,content)
     # test(12,text)
     print("takes",time.time()-a)
     # a = time.time()
-    # print(predict("12", text,"打印机"))
+    # print(predict("12", text,""))
     # print("takes", time.time() - a)
     pass