|
@@ -232,8 +232,9 @@ def predict(doc_id,text,title="",page_time="",web_source_no='',original_docchann
|
|
|
# predictor.getPredictor("product").predict(list_sentences, list_entitys)
|
|
|
log("get product done of doc_id%s"%(doc_id))
|
|
|
cost_time["product"] = round(time.time()-start_time,2)
|
|
|
+ prem[0].update(getAttributes.getOtherAttributes(list_entitys[0]))
|
|
|
|
|
|
- '''公告无表格格式时,采购意向预测''' #依赖 docchannel结果
|
|
|
+ '''公告无表格格式时,采购意向预测''' #依赖 docchannel结果 依赖产品及prem
|
|
|
if channel_dic['docchannel']['docchannel']=="采购意向" and len(product_attrs[1]['demand_info']['data']) == 0:
|
|
|
product_attrs = predictor.getPredictor("product_attrs").predict_without_table(product_attrs, list_sentences,
|
|
|
list_entitys,codeName,prem,text,page_time)
|
|
@@ -245,7 +246,7 @@ def predict(doc_id,text,title="",page_time="",web_source_no='',original_docchann
|
|
|
|
|
|
# data_res = Preprocessing.union_result(Preprocessing.union_result(codeName, prem),list_punish_dic)[0]
|
|
|
# data_res = Preprocessing.union_result(Preprocessing.union_result(Preprocessing.union_result(codeName, prem),list_punish_dic), list_channel_dic)[0]
|
|
|
- data_res = dict(codeName[0], **prem[0],**getAttributes.getOtherAttributes(list_entitys[0]), **channel_dic, **product_attrs[0], **product_attrs[1], **payment_way_dic, **fail_reason)
|
|
|
+ data_res = dict(codeName[0], **prem[0], **channel_dic, **product_attrs[0], **product_attrs[1], **payment_way_dic, **fail_reason)
|
|
|
data_res["doctitle_refine"] = doctitle_refine
|
|
|
data_res["nlp_enterprise"] = nlp_enterprise
|
|
|
# 要素的个数
|