|
@@ -3,6 +3,7 @@ Created on 2019年1月4日
|
|
|
|
|
|
@author: User
|
|
|
'''
|
|
|
+import os
|
|
|
|
|
|
from bs4 import BeautifulSoup, Comment
|
|
|
import copy
|
|
@@ -15,6 +16,7 @@ import time
|
|
|
|
|
|
_time1 = time.time()
|
|
|
sys.path.append(os.path.abspath("../.."))
|
|
|
+
|
|
|
from BiddingKG.dl.common.Utils import *
|
|
|
import BiddingKG.dl.entityLink.entityLink as entityLink
|
|
|
import BiddingKG.dl.interface.predictor as predictor
|
|
@@ -128,12 +130,17 @@ def test(name,content):
|
|
|
|
|
|
if __name__=="__main__":
|
|
|
import pandas as pd
|
|
|
+
|
|
|
df = pd.read_excel('G:\公告金额/170角色金额原模型预测错误数据_new3为新预测中标金额_predict0812.xlsx')
|
|
|
- # for i in range(50):
|
|
|
- i = 246
|
|
|
- doc_id = df.loc[i, 'docid']
|
|
|
- text = df.loc[i, 'dochtmlcon']
|
|
|
- title = df.loc[i, 'doctitle']
|
|
|
- rs = predict(doc_id,text,title)
|
|
|
- print(rs)
|
|
|
+ new_prem = []
|
|
|
+ for i in range(len(df)):
|
|
|
+ # i = 246
|
|
|
+ doc_id = df.loc[i, 'docid']
|
|
|
+ text = df.loc[i, 'dochtmlcon']
|
|
|
+ title = df.loc[i, 'doctitle']
|
|
|
+ rs = predict(doc_id,text,title)
|
|
|
+ # print(rs)
|
|
|
+ new_prem.append(rs)
|
|
|
+ df['new_prem'] = pd.Series(new_prem)
|
|
|
+ df.to_excel('G:\公告金额/170角色金额原模型预测错误数据_new3为新预测中标金额_predict0813.xlsx')
|
|
|
pass
|