def delstopwords(content):
result = ''
words = pseg.lcut("".join(content.split()))
for word, flag in words:
if word not in stopwords and flag not in ["/x", "/zg", "/uj", "/ul", "/e", "/d", "/uz",
"/y"]: # ??????????????????
result += word.encode('utf-8') # +"/"+str(w.flag)+" " #????
return result
评论列表
文章目录