冠状病毒疾病或COVID-19是一种新型的病毒疾病,开始在2019年的最后一年(
1]。世界卫生组织(世卫组织)于2020年3月11日,COVID-19作为流行病的爆发(
2]。病毒,出奇的快,现在已经在世界各地传播;和近28所有国家现在对抗它,努力阻止传播这无形的杀手一样可以达到
3]。开始从世界上人口最多的国家,中国,COVID-19蔓延并杀死了成千上万的人来自各个国家,包括意大利、西班牙、美国、伊朗和其他欧洲国家。最近,特别是在去年一半的可能,虽然这在世界范围内大流行一直继续影响数百万人的生命在几个国家,一些国家没有其他解决方案但诉诸完全封闭。Twitter,被认为是一个广泛使用的社交网络网站,是一个快速发展和侵袭性在线平台,通过它人们可以做各种活动,包括创建、发布、更新和阅读limited-length短信称为tweet。这些tweet形成一个简单的方法让用户共享和交换他们的意见,观点,对给定主题的想法。另一方面,情绪分析(SA)是识别和分类的方法一个特定的文本文档的极性,句子和短语(
4,
5]。情感分析是一种工具基于机器学习方法和自然语言处理中最重要的领域之一(
6,
7]。最近,世界战斗COVID-19过去六个月,和世界各地的大多数人正在封锁。许多人用Twitter等社交网络来表达他们的观点和态度COVID-19并分享他们的经验在面对这种病毒。因此,Twitter的重要性增加了比以往任何时候都和情绪分析Twitter数据数据科学研究已成为一个热点话题。因此,Twitter已经成为丰富的多的信息/数据,对人们的意见COVID-19,导致一些研究人员使用这些数据对COVID-19进行他们的研究和实验。一些研究者应用情感分析研究人们对COVID-19的意见。例如,塞缪尔et al。
8机器学习分类)用于分类冠状病毒的微博。同时,阿里et al。
9]使用机器学习算法在微博冠状病毒分类数据推到积极的和消极的。另一方面,数据流在社交网络的规模,比如Twitter,呈几何倍数增长
10]。流数据是有价值的来源,收集实时数据分析。然而,实时情绪分析被认为是一个最迫切的研究领域需要健壮的Apache火花等大数据分析的工具。处理流数据使用传统预处理方法是一个挑战;因此,研究人员和组织使用Apache火花等大数据平台(
11)和Apache卡夫卡(
12处理和存储流数据。此外,最近的研究已经使用机器学习与大数据技术,使他们的经验。例如,Das et al。
13)已经开发出一种实时情绪系统来预测股票价格从Twitter数据的情绪。Rath et al。
14]也开发了一种基于定向广告的实时情感分析系统。先前的研究应用情感分析技术来研究和分析的态度和看法冠状病毒从Twitter使用收集到的历史数据。没有研究面向实时情绪分析冠状病毒大流行期间我们所知。因此,这激励我们引入一个新的实时情绪预测系统,包括冠状病毒大流行的Twitter流数据。提出了系统(即结果。,classified predicted people’s opinions about coronavirus) could be emitted to any data source such as real-time reporting and dashboard, storage, and mobile apps. The predicted results will help healthcare organizations, medical industries, organizational psychology experts, and society monitor current and future studies.
拉其普特人et al。
18)使用两种技术,词频和情绪分析,分析微博关于冠状病毒爆发的消息。他们利用unigram、三元、三元模型来描述一个词的利率,两个字,三个字,分别。在情感分析,TextBlob,即。,Pythonpackage, was used to classify tweets into positive, negative, and neutral. Recently, Bhat et al. [
19收集了微博使用两个标签,# COVID-19和#冠状病毒。作者应用的情绪分析Twitter数据分类成正的,负的,中性的。同时,Dubey [
20.)收集了报复性的tweet COVID-19 11/03/2020 31/03/2020。他已经确定了来自不同国家的人们对COVID-19的情感世界。他用NRC词汇分析和分类推到八种情绪。此外,Manguri et al。
21)收集了微博数据七天冠状病毒09/04/2020 15/04/2020。同时,他们利用TextBlob分类推到积极、消极、中立。结果表明,中性比例最高的。此外,梅德福et al。
22)提取微博相关COVID-19感染和测量关键字的频率约束行为,治疗和系统发育的偏见。
数据预处理是非常重要的在任何社会网络分析系统(即。,sentiment analysis of streaming Twitter data) as it directly impacts the effectiveness of the sentiment analysis due to the data’s complexity. According to our work, although Twitter is considered a gold mine of data, it is regarded as one of the noisiest data because it consists of many links, hashtags, special symbols, emojis, and so on. Therefore, the collected Twitter data have been preprocessed using the following steps: noise removal, tokenization, normalization, and stems, which are described as follows:
阻止。标记步骤后,下一步是阻止。阻止一步是改变单词到他们原始的形式(即。,root form to decrease the number of word types or classes in the data). For example, the terms “Walking,” “Walked,” and “Walker” will be reduced to the word “walk”.
3.1.3。Pretrained推
情绪分析识别作者持有(即情感或态度。,推特handle/user), whether these emotions/attitudes can be positive, negative, or neutral. Therefore, we used a TextBlob [
24),一个Python库,对收集的数据进行情感分析Twitter。由TextBlob, TextBlob采用朴素贝叶斯分类(NB)模型,然后返回两个属性作为输出,即极性和主体性。TextBlob矛盾意味着识别情绪取向(正面、中性、负面),而主体性意味着表达一些个人情绪,感情,意见,或信仰。我们使用的输出极性微博标签收集到的数据集是安装在机器学习模型在评价步骤关于这项工作。
n元建模是一个流行的特征选择和分析方法广泛应用于文本挖掘和自然语言处理。根据文本数据分析,语法是用来计算一个连续的序列单词长度
n在一个给定的窗口。在这项工作中,我们使用了
n克的方法,包括
n= 1,
n= 4(即。,unigram, bigram, trigram, and four-gram) to represent the context the Twitter data.
从获得的结果在我们的实验中,数据
4和
5描述实证结果在大局交叉验证性能和测试结果,分别。他们显示的性能最好的模型为每个特征提取方法。总结模型相比的性能,我们探索每个模型的平均交叉验证和测试结果使用不同大小的特征提取方法,语法
n= 1,
n= 4,1000年和3000年两个尺寸的矩阵。再次,它可以注意到所有模型利用大的矩阵大小的数据集的数据集使用3000矩阵尺寸来改善他们的结果。平均而言,射频模型取得了最高的平均交叉验证和测试性能平均相对于其他常规机器学习模型。交叉验证结果,射频模型的准确性达到89.56%,精度为90.05%,召回89.62%,F1-score 89.3%使用unigram特征提取方法。性能测试、射频取得了84.71%的精度,精度为85.8%,召回84.71%,F1-score 84.06%使用unigram方法。LR取得第二好的交叉验证的结果性能使用unigram方法超过3000矩阵数据集的大小(82.94%的精度,精度83.01%,82.94%的回忆,和F1-score 82.61%)。此外,据报道的次优结果使用unigram方法性能测试(82.94%的精度,精度83.01%,82.94%的回忆,和F1-score 82.61%)。支持向量机实现第三等级平均unigram交叉验证的性能和测试结果。交叉验证结果记录的准确性88.8%,精度为89.52%,88.8%的回忆,和F1-score 88.54%,测试结果,81.17%的精度,精度为83.33%,召回81.17%,F1-score 80.35%的记录。DT和资讯报道最低的交叉验证和测试的结果,在DT实现第四等级和资讯取得第五等级。 For cross-validation results, DT has reported the accuracy of 87.09%, precision of 87.14%, recall of 87.15%, and F1-score of 86.4% using the unigram method.
本文提出了一种系统实时情绪预测冠状病毒大流行的Twitter流数据。该系统已经开发使用Twitter流API, Apache卡夫卡,Apache火花,和普通的机器学习模型。它是由两个部分组成的,即开发离线情绪分析模型和在线预测管道。离线模型组件是用于获得最好的机器学习模型,将用于在线情绪预测使用语法和TF-ID特征提取方法。我们评估五个机器学习模型,DT, LR,然而,射频,和支持向量机,用收集到的数据集(例如,historical streaming tweets in the period 23/01/2020 and 01/06/2020 filtered by #COVID-19 and #Coronavirus hashtags). The empirical results have proved that the RF model using the unigram feature extraction method has achieved the best performance compared with the other models. The online prediction pipeline component is used to predict the coronavirus tweets’ sentiment polarity in real-time. It has used the Twitter Streaming API to collect streaming tweets about coronavirus in real-time then sends them to Kafka. Spark streaming has analyzed the ingested tweets and forwards them to the best machine learning model, which is the RF model, to predict the sentiment polarity about the coronavirus in tweets in real-time. The experimental results show that the RF model using the unigram feature extraction method has achieved the best performance.