浏览代码

调整channel输出,添加返回原来original_docchannel 值

lsm 3 年之前
父节点
当前提交
fd6094ca82
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      BiddingKG/dl/interface/predictor.py

+ 2 - 2
BiddingKG/dl/interface/predictor.py

@@ -2519,7 +2519,7 @@ class DocChannel():
         113: '业主采购'
     }
     if original_docchannel in not_extract_dic:
-        return {'docchannel': {'docchannel':'', 'doctype':not_extract_dic[original_docchannel]}}
+        return {'docchannel': {'docchannel':'', 'doctype':not_extract_dic[original_docchannel], "original_docchannel_id": str(original_docchannel)}}
     if web_source_no in ['02104-7']:
       return {'docchannel': {'docchannel':'', 'doctype':'采招数据'}}
 
@@ -2534,7 +2534,7 @@ class DocChannel():
     data_content, data_title = self.predict_process(docid='', doctitle=title[-50:], dochtmlcon=content) # 标题最多取50字
     text_len = len(data_content[0]) if len(data_content[0])<self.sequen_len else self.sequen_len
     title_len = len(data_title[0]) if len(data_title[0])<self.title_len else self.title_len
-    result = {'docchannel': {'docchannel':'', 'doctype':''}}
+    result = {'docchannel': {'docchannel':'', 'doctype':'', "original_docchannel_id": str(original_docchannel)}}
 
     array_content = embedding(data_content, shape=(len(data_content), self.sequen_len, 128))
     array_title = embedding(data_title, shape=(len(data_title), self.title_len, 128))