摘要: 1 def getText(): 2 txt = open('I:\Hamlet_-Prince-of-Denmark_哈姆雷特_.txt','r').read() 3 txt = txt.lower() 4 for ch in '!"#$%&()*+,-./:;<=>?@[\\]^_‘{|}~': 阅读全文
posted @ 2023-02-20 15:18 摆烂小T 阅读(57) 评论(0) 推荐(0)
摘要: 使用到的库:jieba 《三国演义》人物出场统计 上 1 #《三国演义》人物出场统计--上 2 import jieba 3 txt = open('I:\三国演义.txt', 'r', encoding = 'utf-8').read() 4 words = jieba.lcut(txt) 5 c 阅读全文
posted @ 2023-02-20 10:51 摆烂小T 阅读(480) 评论(0) 推荐(0)