摘要:
0.可以新建一个用于练习的html文件,在浏览器中打开。 1.利用requests.get(url)获取网页页面的html文件 import requests newsurl='http://news.gzcc.cn/html/xiaoyuanxinwen/' res = requests.get( 阅读全文
摘要:
下载一长篇中文文章。 从文件读取待分析文本。 news = open('gzccnews.txt','r',encoding = 'utf-8') 安装与使用jieba进行中文分词。 pip install jieba import jieba list(jieba.lcut(news)) 生成词频 阅读全文