Commit 5f51724f authored by 赵威's avatar 赵威

try get item2vec

parent 4241dc50
import multiprocessing
import os
import sys
import time
import traceback
sys.path.append(os.path.realpath("."))
......@@ -89,8 +88,10 @@ def projects_item2vec(score_limit=5):
def clicked_tractate_ids_item2vec_model(id, n=5):
try:
return TRACTATE_CLICK_IDS_MODEL.wv.most_similar(id, topn=n)
except KeyError as e:
send_msg_to_dingtalk("tractate_item2vec: " + str(e))
except Exception as e:
# send_msg_to_dingtalk(str(traceback.format_exc()))
send_msg_to_dingtalk(str(traceback.format_exc()))
return []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment