首页 > TAG信息列表 > 聊斋

聊斋-河间生

    人的善恶在转瞬之间就可以改变,发现错误时往往已经差之千里了,但是发现错误及时改正这不也是很美好的一件事情么?河间生就是讲了这么一件事情。   主角简介:河间某生,家里比较富裕,烧火用的麦秆在麦场堆成了小山   反派简介:狐狸先生,善于借(读书人不叫偷)东西   第一次产生

聊斋

import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) counts = {} for word in words: if len(word) == 1: continue elif word == "小倩" or word == &

聊斋文本统计

import jiebaimport os,codecsfrom collections import Counterfile=open('liaozhai.txt','r',encoding='utf-8')a=file.read()#file.close()b=jieba.lcut(a)d=Counter()for i in b: if b!=',' and b!='。'and b!='

聊斋jieba

import jieba txt = open("聊斋志异白话简写版.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt) # 使用精确模式对文本进行分词counts = {} # 通过键值对的形式存储词语及其出现的次数 for word in words: if len(word) == 1: continue elif