Commit 343999cd authored by 赵威's avatar 赵威

rewrite data to file

parent 0b2dfbc6
...@@ -33,7 +33,8 @@ if __name__ == "__main__": ...@@ -33,7 +33,8 @@ if __name__ == "__main__":
tractate_dict = {} tractate_dict = {}
for item in get_tractate_info_from_es(["id", "portrait_tag_name"]): for item in get_tractate_info_from_es(["id", "portrait_tag_name"]):
id = item["_id"] id = item["_id"]
tractate_dict[id] = ",".join(list(item["_source"]["portrait_tag_name"])) business_tags = item["_source"]["portrait_tag_name"]
tractate_dict[id] = ",".join(business_tags)
save_dict_to_csv(tractate_dict, "personas_tractate_tags.csv") save_dict_to_csv(tractate_dict, "personas_tractate_tags.csv")
print(len(tractate_dict)) print(len(tractate_dict))
print(random.choice(list(tractate_dict.items()))) print(random.choice(list(tractate_dict.items())))
......
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