def processs_content(post):
text = words_wo_stopwords(strip_tags(post.content))
#TODO this is duplicated job, should be improved
words = word_tokenize(strip_tags(text))
taggged = pos_tag(words)
cleaned = filter_insignificant(taggged)
text = " ".join(cleaned)
wc = WordCloudMod().generate(text)
result = list(wc.keys())[:10]
if len(result) > 0:
post = await save_tags(tags=result, entry=post)
post.save()
评论列表
文章目录