读取txt文本内容并使用jieba进行分词。

import jieba
fR = open('gp.txt', 'r', encoding='UTF-8')
sent = fR.read()
sent_list = jieba.cut(sent)
fW = open('gp2.txt', 'w', encoding='UTF-8')
fW.write(' '.join(sent_list))
fR.close()
fW.close()

 

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案