标签:pen jieba分词 join 分词 line coding div encoding with
1 import jieba 2 with open(‘lagoujobdatails.txt‘,encoding=‘utf-8‘) as f: 3 tmp_line=f.read() 4 jieba_cut=jieba.cut(tmp_line) 5 ans=‘ ‘.join(jieba_cut) 6 with open(‘jieba5.txt‘,‘w‘,encoding=‘utf-8‘) as f2: 7 f2.write(ans)
标签:pen jieba分词 join 分词 line coding div encoding with
原文地址:http://www.cnblogs.com/realmonkeykingsun/p/7992850.html