python 文本单词提取和词频统计的实例
这些对文本的操作经常用到, 那我就总结一下。 陆续补充。。。 操作: strip_html(cls, text) 去除html标签 separate_words(cls, text, min_lenth=3) 文本提取 get_words_frequency(cls, words_list) 获取词频 源码: class DocProcess(object): @classmethod def strip_html(cls, text): """ Delete html tags in text. text is String """ new_text = " "
下载地址
用户评论