红楼jieba

jieba分词《聊斋》

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

jieba 分词

import jieba txt = open("西游记.txt", "r", encoding='utf-8').read() words = jieba.lcut(txt) # 使用精确模式对文本进行分词 counts = {} # 通过键值对的形式存储词语及其出现的次数 for word in ......
jieba

jieba库的运用:聊斋志异

# -*- coding: utf-8 -*- """ Created on Wed Dec 20 00:02:07 2023 @author: chen """ import jieba # 读取文本文件 path = "聊斋志异.txt" file = open(path, "r", encod ......
jieba

jieba库 聊斋志异

import jiebatxt = open("D:\python课本内容\聊斋志异.txt","r",encoding = 'utf-8').read()words = jieba.lcut(txt)counts = {}for word in words: if len(word) == 1: ......
jieba

jieba库西游记分词(13号)

import jieba def merge_synonyms(words, synonyms): merged_words = [] for word in words: for synonym_list in synonyms: if word in synonym_list: merged_w ......
游记 jieba

jieba分词——西游记相关的分词,出现次数最高的20个

1 import jieba 2 3 txt = open("D:\Python project\Python123作业\西游记.txt", "r", encoding='utf-8').read() 4 words = jieba.lcut(txt) # 使用精确模式对文本进行分词 5 count ......
次数 jieba

jieba 分词

西游记相关的分词,出现次数最高的20个 输入: 1 import jieba 2 excludes = {"一个", "我们", "怎么", "那里", "不知", "不是", "只见", "两个", "不敢", "这个", "如何", "原来", "甚么", "不曾", "闻言", "正 ......
jieba

红楼梦相关的 jieba 分词

尾号为4,5,6的同学做,红楼梦相关的分词,出现次数最高的20个。 以下为代码及运行结果: import jiebatxt = open("D:\红楼梦.txt","r",encoding = 'ansi').read()words = jieba.lcut(txt) #精确模式进行分词count ......
红楼 jieba

jieba分词

import jieba#读取文本path = "聊斋志异.txt"file = open(path, "r", encoding="utf-8")text = file.read()file.close()#使用jieba分词words = jieba.lcut(text)#统计词语频率count ......
jieba

红楼梦人物出场统计

代码: import jiebaexcludes = {'什么', '一个', '我们', '你们', '如今', '说道', '知道', '起来', '这里','奶奶', '姑娘', '出来', '众人', '那里', '自己', '他们', '一面', '只见', '怎么','老太太 ......
红楼 人物

jieba分词

尾号为1,2,3的同学做,西游记相关的分词,出现次数最高的20个。 ```import jieba # 读取文本文件 path = "西游记.txt" file = open(path, "r", encoding="utf-8") text = file.read() file.close() # ......
jieba

jieba 分词

描述 尾号为1,2,3的同学做,西游记相关的分词,出现次数最高的20个。‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‭‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‮‬ 尾 ......
jieba

jieba 分词红楼梦相关的分词,出现次数最高的20个

点击查看代码 import jieba import wordcloud def takeSecond(elem): return elem[1] def createWordCloud(text): #生成词云函数 w=wordcloud.WordCloud(font_path="STZHONGS ......
红楼 次数 jieba

jieba分词

import jieba import collections with open('journey_to_the_west.txt', 'r', encoding='utf-8') as f: text = f.read() words = jieba.cut(text) word_counts ......
jieba

jieba分词

import jiebapath = "all.txt" # 读取文本文件file = open(path, "r", encoding="utf-8")text = file.read()file.close()words = jieba.lcut(text) # 使用jieba分词counts ......
jieba

jieba分词

jieba分词,聊斋29 代码: import jiebatxt = open("D:\python-learning\liaozhai.txt", "r", encoding='utf-8').read()words = jieba.lcut(txt) counts = {}for word in ......
jieba

jieba分词

......
jieba

作业五:jieba分词——西游记相关的分词,出现次数最高的20个。

1 import jieba 2 ''' 3 f = open("D:/学习/个人/pythonwork/西游记.txt", 'r', encoding='utf-8') 4 txt =f.read() 5 if txt.startswith(u'\ufeff'): 6 content = txt. ......
次数 jieba

jieba分词之聊斋

import jiebaexcludes = {"不知","不可","一日","不敢","数日","以为","不能","可以","不得","如此"," ","三日","而已","明日","其中","未几","二人","一人"}txt = o ......
jieba

jieba分词

jieba 分词 ‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‭‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬描述‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮ ......
jieba

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 eli ......
jieba

jieba分词--西游记

import jiebaexcludes={"一个","那里","怎么","我们","不知","两个","甚么","不是","只见","原来","如何","这个","不曾","不敢","闻言","正是","只是","那怪","出来 ......
jieba

jieba分词

import jiebapath = "all.txt" # 读取文本文件file = open(path, "r", encoding="utf-8")text = file.read()file.close()words = jieba.lcut(text) # 使用jieba分词counts ......
jieba

jieba-聊斋

import jiebatxt=open("聊斋.txt","r",encoding='utf-8').read()words=jieba.lcut(txt)counts={}for word in words: if len(word)==1: continue else: counts[word ......
jieba

jieba分词

import jieba with open('红楼梦.txt','r',encoding='utf-8')as f: # 打开文件 txt = f.read() # 读取为txt words = jieba.lcut(txt) # 利用jieba库的lcut分词 counts={} # 创建字典 ......
jieba

python博客作业5(jieba 分词)

尾号为7,8,9,0的同学做,聊斋相关的分词,出现次数最高的20个。 ```import jieba # 读取文本文件 path = "聊斋志异.txt" file = open(path, "r", encoding="utf-8") text = file.read() file.close() ......
python jieba 博客

最后一次大作业——jieba 分词

import jieba txt = open("聊斋志异.txt", "r", encoding="utf-8").read() excludes = {"不知", "不可", "一日", "不敢", "数日", "家人", "以为"} words = jieba.lcut(txt) counts ......
jieba

《红楼梦》是明亡清兴血泪史 - 知乎

title: 《红楼梦》是明亡清兴血泪史 - 知乎 updated: 2023-06-27 07:23:26Z created: 2023-06-27 07:22:52Z source: https://zhuanlan.zhihu.com/p/426564627 tags: - book 三年前在 ......
血泪史 血泪 红楼

R语言《红楼梦》文本挖掘:词频统计、词云可视化及前后对比分析

全文链接:https://tecdat.cn/?p=34319 原文出处:拓端数据部落公众号 作为中国古典文学的瑰宝,《红楼梦》具有极高的文学价值和丰富的主题内涵。近年来,随着大数据和文本挖掘技术的发展,对《红楼梦》等古典文学作品的深度分析成为可能。本研究采用R语言作为分析工具,对《红楼梦》全文进行 ......
词频 红楼 文本 语言

2023NOIP A层联测32 T4 红楼 ~ Eastern Dream

2023NOIP A层联测32 T4 红楼 ~ Eastern Dream 根号分治加分块。 Ps:分块后面真的用的多。 思路 考虑根号分治,将 \(x\) 分为 \(x \leq \sqrt n\) 的情况和 \(x>\sqrt n\) 的情况。 \(x \leq \sqrt n\) 由于这一部分 ......
红楼 Eastern Dream 2023 NOIP