The repository consists of python code which will perform sentiment analysis on summarized news articles. The code also supports visualization of sentiment information. The classification of news article sentiment is also given.
News Article Summarization
The news articles are summarized into brief representation using the python program textSummarizationForNewsArticle_1.py. The precise brief representation of news article helps the user to understand its content quickly. The following figure shows an example of the news article summarization.
3D Visualization of News Sentiment
The news article is subjected to sentiment analysis and collected various sentiment information such as positive, negative and compound score. Also, a number of positive, negative, neutral words are gathered from a news article. The program 3DSentiVisualizationsNews_2.py provides 3D visualization of sentiment information. Following are examples for 3D column charts for compound sentiment score and positive score.
Sentiment Statistics for News Articles
After sentiment analysis on a news article, various statistics such as positive score, negative score, compound score etc are collected. The program sentimentStatisticsOfNewsToExcel_3.py writes sentiment statistics to an excel sheet. The following figure shows an example.
Summarization of News Article and Sentiment Analysis
The news articles are initially subjected to text summarization, which will create a brief representation of the text. Then sentiment analysis is performed on news articles. The scheme is shown in the below figure.
The summarization is performed in steps of 0 to 100 summarization ratio and each time sentiment scores are computed. The python program is given in 3DSentiVisualizeAfterSummary_4.py. The following figures are 3D visualizations generated after summarization.
Sentiment Statistics after News Summarization
The program sentiStaticsToExcelAfterSummary_5.py generates sentiment statistics after performing summarization of news articles. The below figures shows an example for statistics collected.
News Article Sentiment Classification
From the set of news articles, a bag of words are collected. For each news article feature vector of words are formed. The sentiment classification of the news article is performed as shown in the below figure. The program bbcNewsSentimentClassification_6.py performs the sentiment classification of news articles.
This research work appeared in the following article (OPEN ACCESS):
Cite this work
Please cite as
Siddhaling Urolagin, "Sentiment Analysis, Visualization and Classification of Summarized News Articles: A Novel Approach" in International Journal of Advanced Computer Science and Applications (IJACSA), Volume 9 Issue 8, pp. 616-625, August 2018.
Further Projects and Contact
For further reading and other projects please visit