Commit 723d710f authored by 赵威's avatar 赵威

add count

parent 85282e62
...@@ -39,8 +39,11 @@ if __name__ == "__main__": ...@@ -39,8 +39,11 @@ if __name__ == "__main__":
# print(cos_sim(sen1_em, sen2_em)) # print(cos_sim(sen1_em, sen2_em))
level_dict = {"6": [], "5": [], "4": [], "3.5": [], "3": []} level_dict = {"6": [], "5": [], "4": [], "3.5": [], "3": []}
count = 0
embedding_dict = {} embedding_dict = {}
for item in get_answer_info_from_es(["id", "answer", "content_level"]): for item in get_answer_info_from_es(["id", "answer", "content_level"]):
count += 1
print(count)
id = int(item["_id"]) id = int(item["_id"])
content = item["_source"]["answer"] content = item["_source"]["answer"]
content_level = str(item["_source"]["content_level"]) content_level = str(item["_source"]["content_level"])
......
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