基于文本挖掘的新闻网站的设计与实现

 2022-11-27 01:11

论文总字数:24921字

摘 要

随着互联网的快速发展,每分每秒都会产生大量的数据,是分析工具不能够承担的。伴随着互联网发展的还有传统媒体,使用网络浏览新闻正在一步步取代纸媒,Web新闻因为内容多样,实时更新,一直是人们浏览新闻比较常用的方式,也会是以后人们获取新闻资料的来源。但由于数据量的巨大,想要从千万篇新闻中找出期望看到的,关注度很高的新闻不是一件简单事。

本文尝试在保留使用Web新闻的同时,采用Django框架实现了基于文本挖掘的新闻网站。首先利用网络爬虫技术在特定网站定时爬取一定量的新闻资料,再对爬取的新闻资料进行文本分析,即使用文本挖掘预处理技术,统计出词频,绘制爬取到的新闻资料的词云,根据词云中词语的大小找出热词,并将热词作为新闻分类的关键词进行筛选分类,然后将分类好的新闻存储在Navicat For Mysql数据库中。最后使用Django框架搭建一个全新的新闻网站,将数据库中的内容调取到网站中,只做热点新闻,满足快生活时代人们对热点新闻的获取的速度要求。

关键词:新闻网站;Web新闻;Django框架;网络爬虫;文本分析

Design and Implementation of News Website Based on Text Mining

Abstract

With the rapid development of the Internet, a large amount of data will be generated every minute and every second, which is beyond the capacity of analysis tools. Along with the development of the Internet, there are also traditional media, and the use of the Internet to browse news is gradually replacing the paper media. Web news has always been a common way for people to browse news because of its diverse content and real-time update, and it will also be the source for people to obtain news materials in the future. However, due to the huge amount of data, it is not easy to find out the expected and highly watched news from the tens of millions of news articles.

This paper tries to implement a news website based on text mining using Django framework while retaining the use of Web news. First using the web crawler technology in particular site regularly climb take a certain amount of news information, again to crawl news information for text analysis, which USES text mining pretreatment technology, the word frequency statistics, drawing up of the news information word cloud, according to the size of the word cloud words to find words, and words as filtered keyword classification of news classification, The categorized news is then stored in the Navicat For MySQL database. Finally, Django framework is used to build a new news website, and the contents of the database are retrieved into the website. Only hot news is produced, so as to meet the speed requirements of people in the era of fast living.

Key words: news sites; Web news. The Django framework; Web crawler; The text analysis

目录

摘要 I

Abstract II

第一章 绪论 1

1.1背景与意义 1

1.2相关研究现状 1

1.3主要工作内容 2

1.4论文组织结构 2

第二章 相关技术基础 3

2.1爬虫技术 3

2.2数据预处理技术 3

2.3词云 4

2.4Django框架 4

2.5本章小结 5

第三章 系统需求分析 6

3.1系统功能需求分析 6

3.2 系统非功能需求分析 7

3.2.1系统性能需求描述 7

3.2.2系统并发访问需求描述 8

3.2.3系统环境需求描述 8

3.3本章小结 8

第四章 系统设计 9

4.1系统总体设计 9

4.1.1 系统分层结构设计 9

4.1.2 系统功能模块结构设计 10

4.1.3 系统总体工作流程设计 10

4.1.4 系统数据库设计 11

4.2系统详细设计 12

4.2.1新闻资料获取模块 12

4.2.2新闻资料分类模块 13

4.2.3新闻资料存储模块 14

4.2.4用户进入主页模块 15

4.2.5分类新闻展示模块 16

4.2.6热点词云展示模块 16

4.3 核心算法设计 17

4.3.1爬虫技术 17

4.3.2文本挖掘预处理 17

4.3.3新闻分类 18

4.4 本章小结 18

第五章 系统实现与测试 19

5.1系统实现工具与环境 19

5.2核心代码分析 19

5.2.1新闻资料获取模块 19

5.2.2新闻资料分类模块 22

5.2.3新闻资料存储模块 23

5.2.4用户进入主页模块 24

5.2.5分类新闻展示模块 24

5.2.6热点词云展示模块 26

5.3系统主要运行界面 26

5.4系统测试 29

5.4.1系统测试环境与工具 29

5.4.2系统功能测试 29

5.5本章小结 30

第六章 总结与展望 31

6.1总结 31

6.2展望 31

致谢 32

参考文献 33

第一章 绪论

1.1背景与意义

随着计算机网络技术的快速发展,互联网所生产的数据正以前所未有的速度增长,信息社会步入了大数据时代。互联网的发展同时也使传统媒体正在向网络媒体转变,新闻出版业逐渐迈入网络时代,由此产生了网络新闻[1]。网络每分每秒都会产生大量的行业数据,数据量之大几乎超出了现有的处理及分析工具的能力。Web新闻作为一种非常具代表性的数据,以其多种多样的内容,实时发生且不断更新的性质,一直以来都是人们获取知识,了解时事的必要渠道[2]。面对爆炸式出现的新闻内容时,如何快速直接的找到个人想要了解的新闻内容,并且能适应人们不断进步的认知,这是值得研究的内容。

基于爬虫的网络文本挖掘是指通过编写网络爬虫程序抓取某些指定网站的文本数据,利用模式识别、数据挖掘、统计学习等技术分析出隐含的、深层的、有价值的信息。需要设计的新闻网站就是可以自动对特定网站的文章进行定时爬虫,借助文本挖掘和文本分类技术,实现对新闻资料的自动分类,帮助用户更快地找到自己需要查阅的新闻信息,提高获取新闻信息的效率。

1.2相关研究现状

本文研究的核心是使用爬虫技术爬取新闻资料,借助文本挖掘和文本分类技术实现对新闻的分类,最后就是使用Django框架和数据库将分类好的新闻展示在网站上。

剩余内容已隐藏,请支付后下载全文,论文总字数:24921字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;