python——快速計算詞頻

這幾天看到一位同事的代碼,方法以下:python def cut_word(body): temp_dict={} if body is not None: temp=jieba.cut(body) for t in temp: temp_dict[t]=1 else: pass return
相關文章
相關標籤/搜索