Commit 77d6b6ad authored by 赵威's avatar 赵威

get all tags

parent 632f759f
......@@ -111,15 +111,17 @@ if __name__ == "__main__":
words = f.readlines()
for word in words:
word = word.rstrip("\n")
all_keywords_set.add(word)
if word:
all_keywords_set.add(word)
print("keyword: " + str(len(all_keywords_set)))
print(list(all_keywords_set)[:5])
for word in all_keywords_set:
jieba.add_word(word, freq=1000, tag="user_defined")
# save_tractate_vector_to_redis(all_keywords_set, model)
all_tags_lst = get_all_business_tags()
all_tags_lst = [i.encode("utf-8") for i in get_all_business_tags()]
print("all tags: " + str(len(all_tags_lst)))
print(all_tags_lst[:5])
# save_tag_vector_to_redis(all_tags_lst, model)
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