NLP Sentiment Analysis
NLP Sentiment Analysis
2 Importing Libraries
[2]: import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
sns.set_style("darkgrid")
matplotlib.rcParams['font.size'] = 14
matplotlib.rcParams['figure.figsize'] = (15, 5)
matplotlib.rcParams['figure.facecolor'] = '#00000000'
import warnings
warnings.simplefilter(action='ignore')
import spacy
import requests
from bs4 import BeautifulSoup
import re
1
[3]: user_agent = 'You can find it by typing "My user agent" in the search bar of␣
↪your browser'
[5]: url
[5]: 'https://finviz.com/quote.ashx?t=AAPL&p=d'
[6]: request.ok
[6]: True
[8]: [["GM plans to phase out Apple CarPlay in EVs, with Google's help"],
['Apple Is Still a Buy Despite Market Rumors of an Impending Recession'],
['3 Things About Apple That Smart Investors Know'],
['US Appeals Court Rules In Favor Of Apple In Patent Infringement Case Against
2
VirnetX'],
['Which Is the Better Dividend Stock: Viatris or Apple?'],
['Apple Stores Worst Deals? Employees Reveal 3 Tactics That Make You Spend More
Money'],
['How Much Amazon, Apple, Meta and the Biggest Tech Companies Are Worth'],
["Why Isn't Warren Buffett Buying Microsoft Stock Hand Over Fist?"],
['The first quarter of the year sent investors back to the future: Morning
Brief'],
["87% of Warren Buffett's More Than $6.1 Billion in Dividend Income Comes From
These 7 Stocks"],
['Streaming platforms vie for MLB broadcast deals this season as opening day
takes the plate'],
["'The odds are definitely growing' for a possible TikTok ban in the U.S.:
Analyst"],
['An Analyst Offers a New Reason Why Apple Should Buy Disney: Its Too Big to
Fail'],
['Investors giving an eye toward big tech in search for quality in S&P
stocks: Analyst'],
['Taylor Swifts Net Worth: How the Anti-Hero Star Made Her Fortune'],
['The Nasdaq-100 Just Entered a Bull Market. Why Its Time to Sell Apple and
Microsoft.'],
['Apple wins U.S. appeal over patents in $502 million VirnetX verdict'],
['Apple wins U.S. appeal over patents in $502 mln VirnetX verdict'],
['Why C3.ai Stock Popped Today'],
['Over 150,000 people have been let go so far this year. Are layoffs a
confession of bad management?'],
['TikTok Wont Be the Last Chinese Firm Targeted. Where the Next Fronts Might
Be.'],
['Apples WWDC Will Happen in Early June. Some Hope for a VR Headset Launch.'],
['Daily Spotlight: Final 4Q GDP Report Due Today'],
['1 Red Flag for Apple In 2023, and 1 Green Flag'],
['A SWOT Analysis of Roku Stock: What Investors Need to Know'],
['The First Quarter Was a Roller Coaster. What to Expect the Rest of 2023.'],
['Why Warren Buffett Owns More of Apple, Bank of America, and Chevron Stocks
Than You Might Think'],
['Apple Wants to Solve One of Musics Biggest Problems'],
["Warren Buffett's 4 Foundational Criteria for Major Investments, Revealed"],
['This Dividend-Focused ETF Is Not a Good Dividend Investment'],
['Netflix Tests Idea of Expanding Gaming Service to Televisions'],
['Is AppleCare Plus Worth It?'],
['Epic and Apple Make Metaverse Advances. Thats Bad News for Meta.'],
['Why Investors Took a Shine to Apple Stock Today'],
['A.I. race should pause for six months, says Elon Musk'],
['Todays top stories: Bank regulator hearing, Starbucks CEO testimony, Apple
Developers Conference'],
['Best Streaming Devices: Google Chromecast, Apple TV, Amazon Fire and More'],
['Apple announces its annual conference dates in June, hinting unveil of VR
3
headset'],
['Apple Sets June Dates for Developer Conference'],
['Apple TV Could Allow Viewers To View Multiple Sports Simultaneously After
Rival Launches Similar Feature'],
["Apple to host annual developers' conference from June 5"],
['How Microsoft And Google Beat Apple And Amazon To The Top In Generative AI'],
['Apples Worldwide Developers Conference returns June 5, 2023'],
['Why Banks Are Waging a Digital-Wallet War With Apple'],
["BYD Defers US Debut, Alibaba's Split Sparks Layoff Concerns, Apple Launches
Much-Awaited 'Pay Later' Service: Today's Top Stories"],
["Apple Goes Offensive In Samsung's Turf, Taps NewJeans K-Pop For Latest Store
In Korea's Popular Gangnam District"],
['Affirm (AFRM) Shares Fall 7.3% After Apple Pay Later Launch'],
["Apple Inc.'s (NASDAQ:AAPL) Intrinsic Value Is Potentially 24% Below Its Share
Price"],
['Apple Pay Later can give Affirm and Klarna a run for their money'],
["This Is Warren Buffett's No. 1 Stock to Buy During a Bear Market"],
["Lululemon, Micron and UBS rise premarket; Macy's, Foot Locker fall"],
["Market Rally Holds Key Levels: LULU Stock Jumps Late, Micron Says Sales
Growth 'Close'"],
['Apple Gangnam will welcome first customers this Friday, March 31 in South
Korea'],
['Apple Launches Apple Pay Later in the US'],
['Apple Starts to Roll Out Pay Later Service After Delay'],
['Apple Rolls Out Buy Now, Pay Later Plan'],
['Apple Advertising Business Is Underappreciated, Analyst Says'],
['Apple Pay Later debuts in U.S. with no interest, no fees guarantee'],
["Affirm Shares Are Falling Due To Apple: Here's Why The Stock Is Reacting"],
['Apple launches buy now, pay later service in the US'],
['Apple introduces Apple Pay Later, Microsoft unveils AI-powered cybersecurity
platform'],
["Apple launches 'Apple Pay Later' buy-now, pay-later program"],
['UPDATE 3-Apple launches buy now, pay later service in U.S.'],
['Apple launches buy now, pay later service in U.S'],
['Apple introduces Apple Pay Later to allow consumers to pay for purchases over
time'],
['Apple (AAPL) Strengthens Streaming Service With New Content'],
['Apple Music Classical is here'],
['5G Stocks To Buy As Analysts Debate Fixed Broadband Growth'],
['Stocks trade mixed at the open, rate hike uncertainty weighs on markets'],
['2 Nasdaq 100 Stocks to Buy Hand Over Fist Right Now'],
['Tech sector becomes safe haven for investors amid U.S. banking crisis'],
['CIBC introduces additional Canadian Depositary Receipts ("CDRs")'],
["Is Apple Stock A Buy Before iPhone Maker's March-Quarter Earnings Report?"],
["If You Invested $25,000 in Warren Buffett's 5 Top Stocks 5 Years Ago, Here's
How Much You Would Have Now"],
['Apple CEO Tim Cook meets with new premier Li Qiang on trip to reaffirm
4
commitment to China market'],
['Apple (AAPL) Stock Sinks As Market Gains: What You Should Know'],
['Apple Snaps AI Startup WaveOne Specializing In Compressing Videos'],
['S&P 500 gains as investors weigh relief in banks, tech slip'],
['Kevin OLearys Stock Portfolio: 10 Stock Picks for 2023'],
['A $600 Billion Rally in Big Tech Stocks\xa0Is Not Without Risks'],
['From overhiring to optionality: what we can learn from layoffs'],
['Apple CEO Meets China Commerce Chief to Talk Supply Chain'],
['UPDATE 1-Chinese commerce minister in talks with Apple boss Tim Cook'],
['Hedge funds and C-suites: Trump-linked DWAC fires CEO | Pro Recap'],
['The Fed and the market are both right'],
['Apple CEO Tim Cook welcomed with applause at Beijing conference sponsored by
Chinese government'],
['Better Buy: Alibaba vs. Shopify'],
['3 No-Brainer Warren Buffett Stocks to Buy Right Now'],
["Chinese Foreign Minister Qin Gang assures US business leaders of Beijing's
support"],
['3 Top Growth Stocks to Buy Now That Could Be Worth $1 Trillion by 2030'],
['Panera Bread palm scanners provide another level of convenience, personalized
service: CEO'],
['Apples Tim Cook Upbeat in Beijing as China Courts Global CEOs'],
['Apples Tim Cook Takes Stage in China to Welcoming Applause'],
['Tim Cook praises Apples symbiotic relationship with China'],
['Worried About Banks? Buy This ETF'],
['3 Warren Buffett Stocks That Are Crushing the S&P 500 This Year. Are They
Still Smart Picks?'],
["Apple CEO praises China's innovation, long history of cooperation on Beijing
visit"],
['Apple CEO Cook Stresses Ties With China at Beijing Event'],
['Weekly Roundup'],
['1 Big Reason to Buy This Nasdaq Stock Hand Over Fist Before It Is Too Late']]
news_list = []
for x in regex_news:
news_list.append(x[0])
news_dict = {}
news_dict['Company'] = company
news_dict['News'] = news_list
5
# Converting into a Dataframe
apple = pd.DataFrame(news_dict)
[10]: apple
url = 'https://finviz.com/quote.ashx?t={}&p=d'.format(firm)
request = requests.get(url, headers={'User-Agent':user_agent})
parser = BeautifulSoup(request.text, 'html.parser')
news_html = parser.find_all('a',{'class':'tab-link-news'})
regex = "target=\"_blank\">(.*?)<\/a>"
regex_news = [re.findall(regex, str(sentence)) for sentence in news_html]
news_list = []
for x in regex_news:
news_list.append(x[0])
news_dict = {}
news_dict['Company'] = firm
news_dict['News'] = news_list
6
final_df = pd.DataFrame(news_dict)
return final_df
• Eni –> E
Creating a unique dataframe for all of them.
for c in tickers:
new_df = company_news(c)
companies_df = pd.concat([companies_df, new_df])
[14]: companies_df
7
3 AMZN 5 Bargain-Basement Stocks to Buy Right Now
4 AMZN Why Amazon Stock Shot Nearly 2% Higher Today
.. … …
95 E Zacks Industry Outlook Highlights Exxon Mobil,…
96 E 5 Energy Stocks From the Promising Integrated …
97 E Eni SpA (E) Gains As Market Dips: What You Sho…
98 E Here is Why Growth Investors Should Buy Eni Sp…
99 E Is Eni (E) Stock Undervalued Right Now?
[15]: companies_df.Company.value_counts()
[17]: companies_df.News[58]
[17]: 'Amazon AWS Joins the AI Party and Announces New Nvidia Infrastructure Is
Coming'
8
[18]: companies_df.News[321]
[19]: companies_df.News[220]
[19]: 'Why Intel, Qualcomm, and Taiwan Semiconductor Manufacturing Rallied Today'
Encoding text. It will be used a PyTorch Tensor for making the model working properly.
# Taking only the scores from the Tensors and putting them in a NumPy␣
array
↪
scores = model_output[0][0].detach().numpy()
scores = softmax(scores)
scores_dict = {
'negative_score':scores[0],
'neutral_score':scores[1],
'positive_score':scores[2]
}
return scores_dict
except:
9
return 'Text too big'
[24]: companies_df
Sentiment_Scores
0 {'negative_score': 0.009421064, 'neutral_score…
1 {'negative_score': 0.00943878, 'neutral_score'…
2 {'negative_score': 0.0035974341, 'neutral_scor…
3 {'negative_score': 0.020916877, 'neutral_score…
4 {'negative_score': 0.00399428, 'neutral_score'…
.. …
495 {'negative_score': 0.010740134, 'neutral_score…
496 {'negative_score': 0.03108356, 'neutral_score'…
497 {'negative_score': 0.037193075, 'neutral_score…
498 {'negative_score': 0.012144469, 'neutral_score…
499 {'negative_score': 0.42154813, 'neutral_score'…
[25]: sentiment_dict = {}
sentiment_dict
10
1: {'negative_score': 0.00943878,
'neutral_score': 0.7341834,
'positive_score': 0.25637782},
2: {'negative_score': 0.0035974341,
'neutral_score': 0.4999522,
'positive_score': 0.49645048},
3: {'negative_score': 0.020916877,
'neutral_score': 0.84100795,
'positive_score': 0.1380751},
4: {'negative_score': 0.00399428,
'neutral_score': 0.19986825,
'positive_score': 0.79613745},
5: {'negative_score': 0.041208755,
'neutral_score': 0.9041199,
'positive_score': 0.054671295},
6: {'negative_score': 0.013996111,
'neutral_score': 0.24835204,
'positive_score': 0.7376517},
7: {'negative_score': 0.013675001,
'neutral_score': 0.46830657,
'positive_score': 0.51801836},
8: {'negative_score': 0.11699365,
'neutral_score': 0.8215755,
'positive_score': 0.06143082},
9: {'negative_score': 0.61019385,
'neutral_score': 0.37768775,
'positive_score': 0.012118343},
10: {'negative_score': 0.0014557443,
'neutral_score': 0.26883727,
'positive_score': 0.729707},
11: {'negative_score': 0.19204928,
'neutral_score': 0.65880454,
'positive_score': 0.14914624},
12: {'negative_score': 0.005446459,
'neutral_score': 0.47425756,
'positive_score': 0.52029604},
13: {'negative_score': 0.023405703,
'neutral_score': 0.19754757,
'positive_score': 0.7790468},
14: {'negative_score': 0.051096242,
'neutral_score': 0.39400876,
'positive_score': 0.554895},
15: {'negative_score': 0.01217697,
'neutral_score': 0.1747481,
'positive_score': 0.81307477},
16: {'negative_score': 0.0097710425,
'neutral_score': 0.4928191,
11
'positive_score': 0.49740982},
17: {'negative_score': 0.01984466,
'neutral_score': 0.7651033,
'positive_score': 0.21505207},
18: {'negative_score': 0.050416548,
'neutral_score': 0.90555865,
'positive_score': 0.044024743},
19: {'negative_score': 0.01892697,
'neutral_score': 0.8784709,
'positive_score': 0.10260204},
20: {'negative_score': 0.01431561,
'neutral_score': 0.27399534,
'positive_score': 0.711689},
21: {'negative_score': 0.67783487,
'neutral_score': 0.30462044,
'positive_score': 0.017544603},
22: {'negative_score': 0.07250213,
'neutral_score': 0.51904213,
'positive_score': 0.4084558},
23: {'negative_score': 0.61815554,
'neutral_score': 0.36988744,
'positive_score': 0.011957092},
24: {'negative_score': 0.025558563,
'neutral_score': 0.5810036,
'positive_score': 0.39343786},
25: {'negative_score': 0.09299716,
'neutral_score': 0.8806078,
'positive_score': 0.026394926},
26: {'negative_score': 0.671785,
'neutral_score': 0.3131032,
'positive_score': 0.01511201},
27: {'negative_score': 0.001295219,
'neutral_score': 0.049897835,
'positive_score': 0.948807},
28: {'negative_score': 0.5053952,
'neutral_score': 0.47139746,
'positive_score': 0.02320742},
29: {'negative_score': 0.05836098,
'neutral_score': 0.56322753,
'positive_score': 0.3784114},
30: {'negative_score': 0.013416976,
'neutral_score': 0.5392903,
'positive_score': 0.4472927},
31: {'negative_score': 0.0038333347,
'neutral_score': 0.15855494,
'positive_score': 0.8376118},
32: {'negative_score': 0.0024692249,
12
'neutral_score': 0.20918654,
'positive_score': 0.7883442},
33: {'negative_score': 0.018086985,
'neutral_score': 0.5722004,
'positive_score': 0.40971273},
34: {'negative_score': 0.003972179,
'neutral_score': 0.27099168,
'positive_score': 0.725036},
35: {'negative_score': 0.4712293,
'neutral_score': 0.43594438,
'positive_score': 0.09282635},
36: {'negative_score': 0.0029526441,
'neutral_score': 0.19902186,
'positive_score': 0.7980254},
37: {'negative_score': 0.4469664,
'neutral_score': 0.46354976,
'positive_score': 0.08948375},
38: {'negative_score': 0.4967354,
'neutral_score': 0.4663443,
'positive_score': 0.036920268},
39: {'negative_score': 0.10573473,
'neutral_score': 0.817664,
'positive_score': 0.07660134},
40: {'negative_score': 0.009760183,
'neutral_score': 0.47559047,
'positive_score': 0.51464933},
41: {'negative_score': 0.09280071,
'neutral_score': 0.62411284,
'positive_score': 0.2830864},
42: {'negative_score': 0.035043716,
'neutral_score': 0.7648832,
'positive_score': 0.200073},
43: {'negative_score': 0.63853616,
'neutral_score': 0.3325495,
'positive_score': 0.028914357},
44: {'negative_score': 0.002011118,
'neutral_score': 0.06710635,
'positive_score': 0.9308825},
45: {'negative_score': 0.021653129,
'neutral_score': 0.8827085,
'positive_score': 0.09563829},
46: {'negative_score': 0.0056635994,
'neutral_score': 0.7193225,
'positive_score': 0.27501377},
47: {'negative_score': 0.48941585,
'neutral_score': 0.47124237,
'positive_score': 0.039341792},
13
48: {'negative_score': 0.011806904,
'neutral_score': 0.4347279,
'positive_score': 0.55346525},
49: {'negative_score': 0.03266451,
'neutral_score': 0.9205408,
'positive_score': 0.046794623},
50: {'negative_score': 0.010358575,
'neutral_score': 0.6918909,
'positive_score': 0.2977506},
51: {'negative_score': 0.004152641,
'neutral_score': 0.23906088,
'positive_score': 0.75678635},
52: {'negative_score': 0.001794973,
'neutral_score': 0.14996539,
'positive_score': 0.8482397},
53: {'negative_score': 0.62788385,
'neutral_score': 0.33883974,
'positive_score': 0.033276502},
54: {'negative_score': 0.0047338256,
'neutral_score': 0.4253693,
'positive_score': 0.56989694},
55: {'negative_score': 0.0037925595,
'neutral_score': 0.21526533,
'positive_score': 0.78094196},
56: {'negative_score': 0.6735801,
'neutral_score': 0.30384707,
'positive_score': 0.022572912},
57: {'negative_score': 0.102467395,
'neutral_score': 0.39129093,
'positive_score': 0.5062418},
58: {'negative_score': 0.0034912664,
'neutral_score': 0.59031916,
'positive_score': 0.40618962},
59: {'negative_score': 0.0017627731,
'neutral_score': 0.34738412,
'positive_score': 0.6508533},
60: {'negative_score': 0.16817105,
'neutral_score': 0.76790696,
'positive_score': 0.06392193},
61: {'negative_score': 0.0033820155,
'neutral_score': 0.1914514,
'positive_score': 0.8051666},
62: {'negative_score': 0.521883,
'neutral_score': 0.46007437,
'positive_score': 0.018042691},
63: {'negative_score': 0.03793396,
'neutral_score': 0.9353349,
14
'positive_score': 0.026731243},
64: {'negative_score': 0.01084139,
'neutral_score': 0.5076526,
'positive_score': 0.4815061},
65: {'negative_score': 0.0020261686,
'neutral_score': 0.21476363,
'positive_score': 0.7832101},
66: {'negative_score': 0.029838843,
'neutral_score': 0.89202565,
'positive_score': 0.078135625},
67: {'negative_score': 0.014531754,
'neutral_score': 0.6578287,
'positive_score': 0.32763958},
68: {'negative_score': 0.11415433,
'neutral_score': 0.70861375,
'positive_score': 0.17723197},
69: {'negative_score': 0.59089875,
'neutral_score': 0.36818913,
'positive_score': 0.04091223},
70: {'negative_score': 0.0027621903,
'neutral_score': 0.17315751,
'positive_score': 0.82408047},
71: {'negative_score': 0.5902189,
'neutral_score': 0.39062792,
'positive_score': 0.019153139},
72: {'negative_score': 0.5203477,
'neutral_score': 0.45629784,
'positive_score': 0.02335447},
73: {'negative_score': 0.005802314,
'neutral_score': 0.7333005,
'positive_score': 0.26089704},
74: {'negative_score': 0.37353703,
'neutral_score': 0.58437854,
'positive_score': 0.04208442},
75: {'negative_score': 0.041413683,
'neutral_score': 0.6444274,
'positive_score': 0.3141589},
76: {'negative_score': 0.48328543,
'neutral_score': 0.4759564,
'positive_score': 0.04075813},
77: {'negative_score': 0.18209402,
'neutral_score': 0.68916947,
'positive_score': 0.12873654},
78: {'negative_score': 0.29361233,
'neutral_score': 0.6274255,
'positive_score': 0.07896221},
79: {'negative_score': 0.03200564,
15
'neutral_score': 0.865931,
'positive_score': 0.102063484},
80: {'negative_score': 0.0069854,
'neutral_score': 0.43393075,
'positive_score': 0.5590837},
81: {'negative_score': 0.5146891,
'neutral_score': 0.44151443,
'positive_score': 0.043796454},
82: {'negative_score': 0.016825143,
'neutral_score': 0.42349523,
'positive_score': 0.5596796},
83: {'negative_score': 0.011655888,
'neutral_score': 0.73758274,
'positive_score': 0.2507613},
84: {'negative_score': 0.003454642,
'neutral_score': 0.41149247,
'positive_score': 0.5850529},
85: {'negative_score': 0.12949936,
'neutral_score': 0.8176207,
'positive_score': 0.05288002},
86: {'negative_score': 0.071117476,
'neutral_score': 0.6560714,
'positive_score': 0.2728111},
87: {'negative_score': 0.020133326,
'neutral_score': 0.9036643,
'positive_score': 0.0762024},
88: {'negative_score': 0.016261443,
'neutral_score': 0.8359934,
'positive_score': 0.14774504},
89: {'negative_score': 0.23254229,
'neutral_score': 0.72883135,
'positive_score': 0.038626354},
90: {'negative_score': 0.040484786,
'neutral_score': 0.7676561,
'positive_score': 0.19185922},
91: {'negative_score': 0.0028385525,
'neutral_score': 0.23227896,
'positive_score': 0.7648825},
92: {'negative_score': 0.17647068,
'neutral_score': 0.609251,
'positive_score': 0.21427831},
93: {'negative_score': 0.003059588,
'neutral_score': 0.1008462,
'positive_score': 0.8960942},
94: {'negative_score': 0.006748043,
'neutral_score': 0.15569444,
'positive_score': 0.8375575},
16
95: {'negative_score': 0.025346812,
'neutral_score': 0.46096385,
'positive_score': 0.51368934},
96: {'negative_score': 0.0010726454,
'neutral_score': 0.04487503,
'positive_score': 0.9540522},
97: {'negative_score': 0.6146833,
'neutral_score': 0.36902812,
'positive_score': 0.016288558},
98: {'negative_score': 0.17276078,
'neutral_score': 0.7521216,
'positive_score': 0.075117484},
99: {'negative_score': 0.0021275436,
'neutral_score': 0.19122986,
'positive_score': 0.8066425},
100: {'negative_score': 0.0027932008,
'neutral_score': 0.33483106,
'positive_score': 0.6623756},
101: {'negative_score': 0.0089173615,
'neutral_score': 0.8879167,
'positive_score': 0.103165895},
102: {'negative_score': 0.029080378,
'neutral_score': 0.88410425,
'positive_score': 0.08681528},
103: {'negative_score': 0.3983091,
'neutral_score': 0.565503,
'positive_score': 0.036187798},
104: {'negative_score': 0.037628446,
'neutral_score': 0.87998885,
'positive_score': 0.08238274},
105: {'negative_score': 0.036445227,
'neutral_score': 0.87182784,
'positive_score': 0.09172696},
106: {'negative_score': 0.0019465814,
'neutral_score': 0.7121582,
'positive_score': 0.28589508},
107: {'negative_score': 0.036449704,
'neutral_score': 0.9204343,
'positive_score': 0.04311591},
108: {'negative_score': 0.3006013,
'neutral_score': 0.6368675,
'positive_score': 0.06253121},
109: {'negative_score': 0.009358514,
'neutral_score': 0.42127427,
'positive_score': 0.56936735},
110: {'negative_score': 0.5243808,
'neutral_score': 0.41983208,
17
'positive_score': 0.055787064},
111: {'negative_score': 0.0046253353,
'neutral_score': 0.5918144,
'positive_score': 0.40356016},
112: {'negative_score': 0.024495082,
'neutral_score': 0.8566489,
'positive_score': 0.11885613},
113: {'negative_score': 0.0031851584,
'neutral_score': 0.15984005,
'positive_score': 0.8369748},
114: {'negative_score': 0.0033635113,
'neutral_score': 0.6332696,
'positive_score': 0.36336675},
115: {'negative_score': 0.0035509923,
'neutral_score': 0.5842075,
'positive_score': 0.41224155},
116: {'negative_score': 0.011721942,
'neutral_score': 0.3063373,
'positive_score': 0.6819407},
117: {'negative_score': 0.009760183,
'neutral_score': 0.47559047,
'positive_score': 0.51464933},
118: {'negative_score': 0.35768062,
'neutral_score': 0.58856434,
'positive_score': 0.053754985},
119: {'negative_score': 0.0017627731,
'neutral_score': 0.34738412,
'positive_score': 0.6508533},
120: {'negative_score': 0.010232634,
'neutral_score': 0.3774714,
'positive_score': 0.6122958},
121: {'negative_score': 0.04182061,
'neutral_score': 0.9059408,
'positive_score': 0.052238673},
122: {'negative_score': 0.029838843,
'neutral_score': 0.89202565,
'positive_score': 0.078135625},
123: {'negative_score': 0.2693727,
'neutral_score': 0.6558322,
'positive_score': 0.07479509},
124: {'negative_score': 0.25093812,
'neutral_score': 0.6497765,
'positive_score': 0.09928547},
125: {'negative_score': 0.0046205963,
'neutral_score': 0.6046467,
'positive_score': 0.3907328},
126: {'negative_score': 0.08659925,
18
'neutral_score': 0.8429847,
'positive_score': 0.07041611},
127: {'negative_score': 0.0025581727,
'neutral_score': 0.16874848,
'positive_score': 0.8286934},
128: {'negative_score': 0.011655888,
'neutral_score': 0.73758274,
'positive_score': 0.2507613},
129: {'negative_score': 0.020133326,
'neutral_score': 0.9036643,
'positive_score': 0.0762024},
130: {'negative_score': 0.0028385525,
'neutral_score': 0.23227896,
'positive_score': 0.7648825},
131: {'negative_score': 0.011706959,
'neutral_score': 0.8026197,
'positive_score': 0.18567336},
132: {'negative_score': 0.0051853643,
'neutral_score': 0.3633066,
'positive_score': 0.631508},
133: {'negative_score': 0.0011028587,
'neutral_score': 0.050911263,
'positive_score': 0.947986},
134: {'negative_score': 0.03169535,
'neutral_score': 0.6685903,
'positive_score': 0.29971442},
135: {'negative_score': 0.6282159,
'neutral_score': 0.33802903,
'positive_score': 0.033755094},
136: {'negative_score': 0.0058779675,
'neutral_score': 0.6190624,
'positive_score': 0.37505957},
137: {'negative_score': 0.002695635,
'neutral_score': 0.2927696,
'positive_score': 0.70453477},
138: {'negative_score': 0.0021467428,
'neutral_score': 0.30823073,
'positive_score': 0.6896226},
139: {'negative_score': 0.0062762895,
'neutral_score': 0.30798045,
'positive_score': 0.68574345},
140: {'negative_score': 0.1746557,
'neutral_score': 0.66536546,
'positive_score': 0.15997885},
141: {'negative_score': 0.002713059,
'neutral_score': 0.041979156,
'positive_score': 0.95530766},
19
142: {'negative_score': 0.002012271,
'neutral_score': 0.17330514,
'positive_score': 0.8246824},
143: {'negative_score': 0.011406436,
'neutral_score': 0.93303496,
'positive_score': 0.05555877},
144: {'negative_score': 0.0026216444,
'neutral_score': 0.33191264,
'positive_score': 0.66546583},
145: {'negative_score': 0.00497416,
'neutral_score': 0.76400024,
'positive_score': 0.23102556},
146: {'negative_score': 0.019375496,
'neutral_score': 0.58448297,
'positive_score': 0.3961415},
147: {'negative_score': 0.02434429,
'neutral_score': 0.55095667,
'positive_score': 0.424699},
148: {'negative_score': 0.01905816,
'neutral_score': 0.9051083,
'positive_score': 0.07583352},
149: {'negative_score': 0.29785544,
'neutral_score': 0.6642348,
'positive_score': 0.037909884},
150: {'negative_score': 0.018048111,
'neutral_score': 0.9181679,
'positive_score': 0.06378393},
151: {'negative_score': 0.0022964054,
'neutral_score': 0.2612895,
'positive_score': 0.73641396},
152: {'negative_score': 0.0073353336,
'neutral_score': 0.8817919,
'positive_score': 0.11087273},
153: {'negative_score': 0.0029872083,
'neutral_score': 0.46380657,
'positive_score': 0.5332062},
154: {'negative_score': 0.4134268,
'neutral_score': 0.5147541,
'positive_score': 0.071819015},
155: {'negative_score': 0.023476796,
'neutral_score': 0.48768246,
'positive_score': 0.48884082},
156: {'negative_score': 0.09374839,
'neutral_score': 0.74624574,
'positive_score': 0.16000582},
157: {'negative_score': 0.011640346,
'neutral_score': 0.48928744,
20
'positive_score': 0.4990721},
158: {'negative_score': 0.0038694986,
'neutral_score': 0.23488039,
'positive_score': 0.7612501},
159: {'negative_score': 0.009173758,
'neutral_score': 0.768745,
'positive_score': 0.22208132},
160: {'negative_score': 0.015854606,
'neutral_score': 0.68235445,
'positive_score': 0.301791},
161: {'negative_score': 0.010663833,
'neutral_score': 0.6421856,
'positive_score': 0.34715053},
162: {'negative_score': 0.0068540475,
'neutral_score': 0.62682545,
'positive_score': 0.3663204},
163: {'negative_score': 0.011850031,
'neutral_score': 0.7082331,
'positive_score': 0.27991676},
164: {'negative_score': 0.039767787,
'neutral_score': 0.5509491,
'positive_score': 0.40928316},
165: {'negative_score': 0.20566034,
'neutral_score': 0.75641215,
'positive_score': 0.03792755},
166: {'negative_score': 0.009749564,
'neutral_score': 0.7527605,
'positive_score': 0.2374898},
167: {'negative_score': 0.013209444,
'neutral_score': 0.69942033,
'positive_score': 0.28737018},
168: {'negative_score': 0.011908328,
'neutral_score': 0.29234973,
'positive_score': 0.695742},
169: {'negative_score': 0.30489394,
'neutral_score': 0.5889348,
'positive_score': 0.10617132},
170: {'negative_score': 0.69559073,
'neutral_score': 0.29317018,
'positive_score': 0.011239077},
171: {'negative_score': 0.0024453246,
'neutral_score': 0.11801795,
'positive_score': 0.8795367},
172: {'negative_score': 0.0011716833,
'neutral_score': 0.28206512,
'positive_score': 0.7167632},
173: {'negative_score': 0.0057808864,
21
'neutral_score': 0.5909726,
'positive_score': 0.4032465},
174: {'negative_score': 0.43802953,
'neutral_score': 0.5137798,
'positive_score': 0.04819062},
175: {'negative_score': 0.4809804,
'neutral_score': 0.48094305,
'positive_score': 0.038076527},
176: {'negative_score': 0.0036073958,
'neutral_score': 0.9348841,
'positive_score': 0.061508443},
177: {'negative_score': 0.06998518,
'neutral_score': 0.8888539,
'positive_score': 0.041160975},
178: {'negative_score': 0.032152995,
'neutral_score': 0.7549906,
'positive_score': 0.2128565},
179: {'negative_score': 0.09135647,
'neutral_score': 0.858624,
'positive_score': 0.05001964},
180: {'negative_score': 0.008163148,
'neutral_score': 0.6076083,
'positive_score': 0.3842284},
181: {'negative_score': 0.06638285,
'neutral_score': 0.84091234,
'positive_score': 0.092704795},
182: {'negative_score': 0.7306105,
'neutral_score': 0.25714362,
'positive_score': 0.012245837},
183: {'negative_score': 0.5754584,
'neutral_score': 0.3804975,
'positive_score': 0.044043954},
184: {'negative_score': 0.007670414,
'neutral_score': 0.21207982,
'positive_score': 0.7802497},
185: {'negative_score': 0.011095131,
'neutral_score': 0.8609739,
'positive_score': 0.12793086},
186: {'negative_score': 0.34253636,
'neutral_score': 0.62462,
'positive_score': 0.032843668},
187: {'negative_score': 0.09374839,
'neutral_score': 0.74624574,
'positive_score': 0.16000582},
188: {'negative_score': 0.012204359,
'neutral_score': 0.6989028,
'positive_score': 0.2888929},
22
189: {'negative_score': 0.4074849,
'neutral_score': 0.5543305,
'positive_score': 0.038184468},
190: {'negative_score': 0.018004755,
'neutral_score': 0.6042468,
'positive_score': 0.37774843},
191: {'negative_score': 0.061526395,
'neutral_score': 0.86366546,
'positive_score': 0.07480805},
192: {'negative_score': 0.004024475,
'neutral_score': 0.33509153,
'positive_score': 0.66088396},
193: {'negative_score': 0.0040598474,
'neutral_score': 0.4507522,
'positive_score': 0.54518807},
194: {'negative_score': 0.031577818,
'neutral_score': 0.51808065,
'positive_score': 0.4503414},
195: {'negative_score': 0.008056027,
'neutral_score': 0.27723497,
'positive_score': 0.71470904},
196: {'negative_score': 0.03653657,
'neutral_score': 0.8125713,
'positive_score': 0.15089212},
197: {'negative_score': 0.5499354,
'neutral_score': 0.42916697,
'positive_score': 0.020897636},
198: {'negative_score': 0.042439748,
'neutral_score': 0.87121093,
'positive_score': 0.08634927},
199: {'negative_score': 0.0030454388,
'neutral_score': 0.14121555,
'positive_score': 0.855739},
200: {'negative_score': 0.006616521,
'neutral_score': 0.43229616,
'positive_score': 0.56108737},
201: {'negative_score': 0.0051095947,
'neutral_score': 0.62213093,
'positive_score': 0.37275943},
202: {'negative_score': 0.025084278,
'neutral_score': 0.89457023,
'positive_score': 0.08034544},
203: {'negative_score': 0.036731448,
'neutral_score': 0.90706134,
'positive_score': 0.056207288},
204: {'negative_score': 0.0014831672,
'neutral_score': 0.053751905,
23
'positive_score': 0.94476485},
205: {'negative_score': 0.36802468,
'neutral_score': 0.56589323,
'positive_score': 0.06608197},
206: {'negative_score': 0.70232475,
'neutral_score': 0.2809192,
'positive_score': 0.016756129},
207: {'negative_score': 0.0047279648,
'neutral_score': 0.44835734,
'positive_score': 0.54691464},
208: {'negative_score': 0.0011762227,
'neutral_score': 0.16539179,
'positive_score': 0.833432},
209: {'negative_score': 0.005273068,
'neutral_score': 0.6473309,
'positive_score': 0.3473961},
210: {'negative_score': 0.048498865,
'neutral_score': 0.77315813,
'positive_score': 0.17834295},
211: {'negative_score': 0.0023632993,
'neutral_score': 0.331047,
'positive_score': 0.66658974},
212: {'negative_score': 0.007328034,
'neutral_score': 0.3354241,
'positive_score': 0.6572477},
213: {'negative_score': 0.023488889,
'neutral_score': 0.3451982,
'positive_score': 0.6313129},
214: {'negative_score': 0.0053829188,
'neutral_score': 0.5924952,
'positive_score': 0.40212184},
215: {'negative_score': 0.094924726,
'neutral_score': 0.85875016,
'positive_score': 0.046325114},
216: {'negative_score': 0.021039877,
'neutral_score': 0.8979503,
'positive_score': 0.08100969},
217: {'negative_score': 0.0066975923,
'neutral_score': 0.83072,
'positive_score': 0.16258247},
218: {'negative_score': 0.008402858,
'neutral_score': 0.6509665,
'positive_score': 0.3406307},
219: {'negative_score': 0.02940395,
'neutral_score': 0.8846278,
'positive_score': 0.08596814},
220: {'negative_score': 0.033156388,
24
'neutral_score': 0.89391726,
'positive_score': 0.07292632},
221: {'negative_score': 0.0031454184,
'neutral_score': 0.16589324,
'positive_score': 0.8309613},
222: {'negative_score': 0.102702394,
'neutral_score': 0.76935554,
'positive_score': 0.12794214},
223: {'negative_score': 0.0029978547,
'neutral_score': 0.2759352,
'positive_score': 0.72106695},
224: {'negative_score': 0.012561381,
'neutral_score': 0.61011857,
'positive_score': 0.3773201},
225: {'negative_score': 0.0029483237,
'neutral_score': 0.43568155,
'positive_score': 0.56137025},
226: {'negative_score': 0.0029483237,
'neutral_score': 0.43568155,
'positive_score': 0.56137025},
227: {'negative_score': 0.20967638,
'neutral_score': 0.743686,
'positive_score': 0.046637423},
228: {'negative_score': 0.008557385,
'neutral_score': 0.6385445,
'positive_score': 0.35289812},
229: {'negative_score': 0.004064399,
'neutral_score': 0.6803643,
'positive_score': 0.31557134},
230: {'negative_score': 0.00438336,
'neutral_score': 0.8863145,
'positive_score': 0.10930215},
231: {'negative_score': 0.014818297,
'neutral_score': 0.9334956,
'positive_score': 0.05168595},
232: {'negative_score': 0.029838843,
'neutral_score': 0.89202565,
'positive_score': 0.078135625},
233: {'negative_score': 0.48731008,
'neutral_score': 0.49977908,
'positive_score': 0.012910907},
234: {'negative_score': 0.01508981,
'neutral_score': 0.8577194,
'positive_score': 0.12719086},
235: {'negative_score': 0.007694804,
'neutral_score': 0.6793922,
'positive_score': 0.31291303},
25
236: {'negative_score': 0.035608217,
'neutral_score': 0.9183445,
'positive_score': 0.04604709},
237: {'negative_score': 0.01722801,
'neutral_score': 0.8547378,
'positive_score': 0.12803409},
238: {'negative_score': 0.0025774797,
'neutral_score': 0.15859853,
'positive_score': 0.83882403},
239: {'negative_score': 0.73696136,
'neutral_score': 0.24866654,
'positive_score': 0.014372073},
240: {'negative_score': 0.052498333,
'neutral_score': 0.7014073,
'positive_score': 0.24609432},
241: {'negative_score': 0.31431606,
'neutral_score': 0.6589561,
'positive_score': 0.02672786},
242: {'negative_score': 0.22141571,
'neutral_score': 0.7300119,
'positive_score': 0.048572417},
243: {'negative_score': 0.3676334,
'neutral_score': 0.603716,
'positive_score': 0.028650682},
244: {'negative_score': 0.19514029,
'neutral_score': 0.6746538,
'positive_score': 0.1302058},
245: {'negative_score': 0.25735497,
'neutral_score': 0.70231235,
'positive_score': 0.040332757},
246: {'negative_score': 0.35941398,
'neutral_score': 0.6197015,
'positive_score': 0.020884367},
247: {'negative_score': 0.29163077,
'neutral_score': 0.67720705,
'positive_score': 0.03116228},
248: {'negative_score': 0.4328284,
'neutral_score': 0.53654456,
'positive_score': 0.030627087},
249: {'negative_score': 0.3405558,
'neutral_score': 0.60834,
'positive_score': 0.05110421},
250: {'negative_score': 0.3585387,
'neutral_score': 0.6205015,
'positive_score': 0.020959692},
251: {'negative_score': 0.002652211,
'neutral_score': 0.21705836,
26
'positive_score': 0.7802895},
252: {'negative_score': 0.0026103752,
'neutral_score': 0.21916795,
'positive_score': 0.7782218},
253: {'negative_score': 0.008656895,
'neutral_score': 0.67337024,
'positive_score': 0.317973},
254: {'negative_score': 0.002110054,
'neutral_score': 0.15463234,
'positive_score': 0.84325767},
255: {'negative_score': 0.12227866,
'neutral_score': 0.5883022,
'positive_score': 0.2894192},
256: {'negative_score': 0.28005734,
'neutral_score': 0.6285778,
'positive_score': 0.09136482},
257: {'negative_score': 0.02326545,
'neutral_score': 0.86945224,
'positive_score': 0.107282266},
258: {'negative_score': 0.02725823,
'neutral_score': 0.92161685,
'positive_score': 0.05112478},
259: {'negative_score': 0.0037384839,
'neutral_score': 0.41044256,
'positive_score': 0.58581895},
260: {'negative_score': 0.36791143,
'neutral_score': 0.6160644,
'positive_score': 0.016024072},
261: {'negative_score': 0.040784046,
'neutral_score': 0.888413,
'positive_score': 0.070802905},
262: {'negative_score': 0.0027190866,
'neutral_score': 0.18174201,
'positive_score': 0.815539},
263: {'negative_score': 0.003230711,
'neutral_score': 0.19471352,
'positive_score': 0.8020557},
264: {'negative_score': 0.0076503498,
'neutral_score': 0.86198276,
'positive_score': 0.13036692},
265: {'negative_score': 0.22853665,
'neutral_score': 0.70612985,
'positive_score': 0.0653336},
266: {'negative_score': 0.21532933,
'neutral_score': 0.749199,
'positive_score': 0.03547154},
267: {'negative_score': 0.028190441,
27
'neutral_score': 0.9093026,
'positive_score': 0.06250706},
268: {'negative_score': 0.032970563,
'neutral_score': 0.9095074,
'positive_score': 0.057522085},
269: {'negative_score': 0.07716652,
'neutral_score': 0.89059824,
'positive_score': 0.032235198},
270: {'negative_score': 0.005723555,
'neutral_score': 0.7196264,
'positive_score': 0.27465},
271: {'negative_score': 0.0035376628,
'neutral_score': 0.57962674,
'positive_score': 0.41683558},
272: {'negative_score': 0.038147412,
'neutral_score': 0.73858285,
'positive_score': 0.22326973},
273: {'negative_score': 0.73026437,
'neutral_score': 0.2504314,
'positive_score': 0.0193042},
274: {'negative_score': 0.004844724,
'neutral_score': 0.41884363,
'positive_score': 0.5763116},
275: {'negative_score': 0.66931856,
'neutral_score': 0.318476,
'positive_score': 0.012205501},
276: {'negative_score': 0.015742427,
'neutral_score': 0.6615816,
'positive_score': 0.32267597},
277: {'negative_score': 0.013450119,
'neutral_score': 0.86875725,
'positive_score': 0.11779273},
278: {'negative_score': 0.08186317,
'neutral_score': 0.7179064,
'positive_score': 0.20023037},
279: {'negative_score': 0.00930053,
'neutral_score': 0.88660014,
'positive_score': 0.10409931},
280: {'negative_score': 0.0046882937,
'neutral_score': 0.27783188,
'positive_score': 0.71747977},
281: {'negative_score': 0.0031950823,
'neutral_score': 0.52839714,
'positive_score': 0.46840787},
282: {'negative_score': 0.023510681,
'neutral_score': 0.6652271,
'positive_score': 0.31126213},
28
283: {'negative_score': 0.0068532825,
'neutral_score': 0.84249485,
'positive_score': 0.15065177},
284: {'negative_score': 0.86462146,
'neutral_score': 0.12708715,
'positive_score': 0.008291351},
285: {'negative_score': 0.0027808985,
'neutral_score': 0.25213704,
'positive_score': 0.74508196},
286: {'negative_score': 0.00217963,
'neutral_score': 0.13099433,
'positive_score': 0.866826},
287: {'negative_score': 0.0020613298,
'neutral_score': 0.21533458,
'positive_score': 0.782604},
288: {'negative_score': 0.015517591,
'neutral_score': 0.40506142,
'positive_score': 0.57942086},
289: {'negative_score': 0.7967088,
'neutral_score': 0.19032617,
'positive_score': 0.012964883},
290: {'negative_score': 0.008557385,
'neutral_score': 0.6385445,
'positive_score': 0.35289812},
291: {'negative_score': 0.58977604,
'neutral_score': 0.39131868,
'positive_score': 0.01890526},
292: {'negative_score': 0.46704176,
'neutral_score': 0.4503002,
'positive_score': 0.08265798},
293: {'negative_score': 0.007946771,
'neutral_score': 0.72216904,
'positive_score': 0.26988408},
294: {'negative_score': 0.0970088,
'neutral_score': 0.5090279,
'positive_score': 0.39396325},
295: {'negative_score': 0.0061772172,
'neutral_score': 0.5411972,
'positive_score': 0.45262563},
296: {'negative_score': 0.91775894,
'neutral_score': 0.07494248,
'positive_score': 0.007298434},
297: {'negative_score': 0.22784135,
'neutral_score': 0.7186478,
'positive_score': 0.053510804},
298: {'negative_score': 0.02976917,
'neutral_score': 0.9261204,
29
'positive_score': 0.044110354},
299: {'negative_score': 0.5503218,
'neutral_score': 0.42137083,
'positive_score': 0.02830728},
300: {'negative_score': 0.06380678,
'neutral_score': 0.89826435,
'positive_score': 0.03792878},
301: {'negative_score': 0.026512148,
'neutral_score': 0.7673464,
'positive_score': 0.2061414},
302: {'negative_score': 0.56993353,
'neutral_score': 0.41942397,
'positive_score': 0.010642539},
303: {'negative_score': 0.56993353,
'neutral_score': 0.41942397,
'positive_score': 0.010642539},
304: {'negative_score': 0.0023021062,
'neutral_score': 0.20352787,
'positive_score': 0.79416996},
305: {'negative_score': 0.022323115,
'neutral_score': 0.75027305,
'positive_score': 0.22740373},
306: {'negative_score': 0.0013263384,
'neutral_score': 0.19287544,
'positive_score': 0.8057982},
307: {'negative_score': 0.31369394,
'neutral_score': 0.5139635,
'positive_score': 0.17234255},
308: {'negative_score': 0.5710447,
'neutral_score': 0.37108928,
'positive_score': 0.057866096},
309: {'negative_score': 0.0035450489,
'neutral_score': 0.27074242,
'positive_score': 0.72571254},
310: {'negative_score': 0.28402346,
'neutral_score': 0.6813271,
'positive_score': 0.0346495},
311: {'negative_score': 0.0060268524,
'neutral_score': 0.5897441,
'positive_score': 0.40422907},
312: {'negative_score': 0.0060268524,
'neutral_score': 0.5897441,
'positive_score': 0.40422907},
313: {'negative_score': 0.0035974341,
'neutral_score': 0.4999522,
'positive_score': 0.49645048},
314: {'negative_score': 0.020916877,
30
'neutral_score': 0.84100795,
'positive_score': 0.1380751},
315: {'negative_score': 0.011704604,
'neutral_score': 0.59233826,
'positive_score': 0.3959571},
316: {'negative_score': 0.0106351925,
'neutral_score': 0.85324883,
'positive_score': 0.13611592},
317: {'negative_score': 0.004584962,
'neutral_score': 0.5380481,
'positive_score': 0.45736685},
318: {'negative_score': 0.65798944,
'neutral_score': 0.30551577,
'positive_score': 0.036494747},
319: {'negative_score': 0.0035960197,
'neutral_score': 0.14621165,
'positive_score': 0.85019225},
320: {'negative_score': 0.032330543,
'neutral_score': 0.7222565,
'positive_score': 0.24541287},
321: {'negative_score': 0.0039409893,
'neutral_score': 0.10357188,
'positive_score': 0.8924873},
322: {'negative_score': 0.3930131,
'neutral_score': 0.53732795,
'positive_score': 0.069659},
323: {'negative_score': 0.28147718,
'neutral_score': 0.6547329,
'positive_score': 0.06378999},
324: {'negative_score': 0.2401329,
'neutral_score': 0.68256265,
'positive_score': 0.07730445},
325: {'negative_score': 0.34476426,
'neutral_score': 0.5901665,
'positive_score': 0.06506928},
326: {'negative_score': 0.1337852,
'neutral_score': 0.77924657,
'positive_score': 0.086968176},
327: {'negative_score': 0.025472622,
'neutral_score': 0.7062616,
'positive_score': 0.26826575},
328: {'negative_score': 0.023585327,
'neutral_score': 0.8725936,
'positive_score': 0.103820935},
329: {'negative_score': 0.22588766,
'neutral_score': 0.7266983,
'positive_score': 0.047413956},
31
330: {'negative_score': 0.002943393,
'neutral_score': 0.16973953,
'positive_score': 0.82731694},
331: {'negative_score': 0.11177131,
'neutral_score': 0.77921927,
'positive_score': 0.109009266},
332: {'negative_score': 0.110368624,
'neutral_score': 0.78758293,
'positive_score': 0.10204835},
333: {'negative_score': 0.03539893,
'neutral_score': 0.8329274,
'positive_score': 0.13167363},
334: {'negative_score': 0.030448565,
'neutral_score': 0.45498207,
'positive_score': 0.51456934},
335: {'negative_score': 0.07893736,
'neutral_score': 0.7947432,
'positive_score': 0.12631953},
336: {'negative_score': 0.008715253,
'neutral_score': 0.63407594,
'positive_score': 0.35720876},
337: {'negative_score': 0.68589276,
'neutral_score': 0.29737845,
'positive_score': 0.01672878},
338: {'negative_score': 0.68589276,
'neutral_score': 0.29737845,
'positive_score': 0.01672878},
339: {'negative_score': 0.0063957707,
'neutral_score': 0.34283814,
'positive_score': 0.650766},
340: {'negative_score': 0.018948015,
'neutral_score': 0.59267426,
'positive_score': 0.38837764},
341: {'negative_score': 0.008497243,
'neutral_score': 0.48286623,
'positive_score': 0.5086366},
342: {'negative_score': 0.015257401,
'neutral_score': 0.60949135,
'positive_score': 0.37525123},
343: {'negative_score': 0.004410101,
'neutral_score': 0.42033052,
'positive_score': 0.57525945},
344: {'negative_score': 0.83336884,
'neutral_score': 0.15637702,
'positive_score': 0.010254174},
345: {'negative_score': 0.40522784,
'neutral_score': 0.5379621,
32
'positive_score': 0.05681019},
346: {'negative_score': 0.007545675,
'neutral_score': 0.3502314,
'positive_score': 0.642223},
347: {'negative_score': 0.007010133,
'neutral_score': 0.6573502,
'positive_score': 0.3356396},
348: {'negative_score': 0.120988816,
'neutral_score': 0.7850647,
'positive_score': 0.093946464},
349: {'negative_score': 0.00478361,
'neutral_score': 0.41522658,
'positive_score': 0.5799899},
350: {'negative_score': 0.026038622,
'neutral_score': 0.862076,
'positive_score': 0.11188547},
351: {'negative_score': 0.54732263,
'neutral_score': 0.41510904,
'positive_score': 0.03756842},
352: {'negative_score': 0.76639116,
'neutral_score': 0.22381951,
'positive_score': 0.009789463},
353: {'negative_score': 0.0067364178,
'neutral_score': 0.59889615,
'positive_score': 0.39436734},
354: {'negative_score': 0.03286201,
'neutral_score': 0.79003197,
'positive_score': 0.1771059},
355: {'negative_score': 0.0029978547,
'neutral_score': 0.2759352,
'positive_score': 0.72106695},
356: {'negative_score': 0.8180565,
'neutral_score': 0.17395647,
'positive_score': 0.007986987},
357: {'negative_score': 0.46481368,
'neutral_score': 0.51834494,
'positive_score': 0.016841423},
358: {'negative_score': 0.012561381,
'neutral_score': 0.61011857,
'positive_score': 0.3773201},
359: {'negative_score': 0.3657856,
'neutral_score': 0.5358376,
'positive_score': 0.09837686},
360: {'negative_score': 0.0016179049,
'neutral_score': 0.08927374,
'positive_score': 0.9091082},
361: {'negative_score': 0.25674972,
33
'neutral_score': 0.6796437,
'positive_score': 0.06360659},
362: {'negative_score': 0.001850158,
'neutral_score': 0.037598502,
'positive_score': 0.9605513},
363: {'negative_score': 0.005050119,
'neutral_score': 0.12350262,
'positive_score': 0.87144727},
364: {'negative_score': 0.5093882,
'neutral_score': 0.4177669,
'positive_score': 0.072844885},
365: {'negative_score': 0.004283161,
'neutral_score': 0.38335937,
'positive_score': 0.61235756},
366: {'negative_score': 0.032962333,
'neutral_score': 0.8857477,
'positive_score': 0.08128989},
367: {'negative_score': 0.2526981,
'neutral_score': 0.6962429,
'positive_score': 0.05105895},
368: {'negative_score': 0.020276591,
'neutral_score': 0.77059925,
'positive_score': 0.2091243},
369: {'negative_score': 0.019843336,
'neutral_score': 0.77352434,
'positive_score': 0.20663238},
370: {'negative_score': 0.024813231,
'neutral_score': 0.43891236,
'positive_score': 0.5362745},
371: {'negative_score': 0.64192367,
'neutral_score': 0.34098375,
'positive_score': 0.017092653},
372: {'negative_score': 0.1141986,
'neutral_score': 0.81042296,
'positive_score': 0.07537845},
373: {'negative_score': 0.012679476,
'neutral_score': 0.6224088,
'positive_score': 0.36491162},
374: {'negative_score': 0.46497703,
'neutral_score': 0.46600378,
'positive_score': 0.06901924},
375: {'negative_score': 0.6653187,
'neutral_score': 0.31559893,
'positive_score': 0.019082317},
376: {'negative_score': 0.8252824,
'neutral_score': 0.16347224,
'positive_score': 0.011245467},
34
377: {'negative_score': 0.0053060106,
'neutral_score': 0.16623773,
'positive_score': 0.8284561},
378: {'negative_score': 0.0035572303,
'neutral_score': 0.33964902,
'positive_score': 0.6567937},
379: {'negative_score': 0.0037568938,
'neutral_score': 0.15603136,
'positive_score': 0.84021175},
380: {'negative_score': 0.21339214,
'neutral_score': 0.7336204,
'positive_score': 0.05298739},
381: {'negative_score': 0.21839397,
'neutral_score': 0.74721795,
'positive_score': 0.034388002},
382: {'negative_score': 0.0025020032,
'neutral_score': 0.20575799,
'positive_score': 0.79173976},
383: {'negative_score': 0.0065948996,
'neutral_score': 0.901135,
'positive_score': 0.09227009},
384: {'negative_score': 0.015839184,
'neutral_score': 0.7252211,
'positive_score': 0.2589397},
385: {'negative_score': 0.006544334,
'neutral_score': 0.7140649,
'positive_score': 0.2793907},
386: {'negative_score': 0.014190309,
'neutral_score': 0.34056652,
'positive_score': 0.6452432},
387: {'negative_score': 0.008299673,
'neutral_score': 0.69624776,
'positive_score': 0.2954526},
388: {'negative_score': 0.36008084,
'neutral_score': 0.585541,
'positive_score': 0.054378103},
389: {'negative_score': 0.029838843,
'neutral_score': 0.89202565,
'positive_score': 0.078135625},
390: {'negative_score': 0.14574827,
'neutral_score': 0.76534355,
'positive_score': 0.08890821},
391: {'negative_score': 0.06530564,
'neutral_score': 0.76817435,
'positive_score': 0.16651998},
392: {'negative_score': 0.17076781,
'neutral_score': 0.64785516,
35
'positive_score': 0.18137701},
393: {'negative_score': 0.0052980823,
'neutral_score': 0.6023566,
'positive_score': 0.39234534},
394: {'negative_score': 0.6758135,
'neutral_score': 0.29537866,
'positive_score': 0.028807815},
395: {'negative_score': 0.010363368,
'neutral_score': 0.5139975,
'positive_score': 0.4756389},
396: {'negative_score': 0.028331142,
'neutral_score': 0.70262915,
'positive_score': 0.2690398},
397: {'negative_score': 0.0015268826,
'neutral_score': 0.060345437,
'positive_score': 0.9381277},
398: {'negative_score': 0.027765686,
'neutral_score': 0.91636384,
'positive_score': 0.05587032},
399: {'negative_score': 0.49579617,
'neutral_score': 0.48153,
'positive_score': 0.022673804},
400: {'negative_score': 0.07021959,
'neutral_score': 0.8911077,
'positive_score': 0.038672816},
401: {'negative_score': 0.012397981,
'neutral_score': 0.7410582,
'positive_score': 0.24654384},
402: {'negative_score': 0.07021959,
'neutral_score': 0.8911077,
'positive_score': 0.038672816},
403: {'negative_score': 0.07021959,
'neutral_score': 0.8911077,
'positive_score': 0.038672816},
404: {'negative_score': 0.0043159886,
'neutral_score': 0.38136482,
'positive_score': 0.61431926},
405: {'negative_score': 0.07021959,
'neutral_score': 0.8911077,
'positive_score': 0.038672816},
406: {'negative_score': 0.050443336,
'neutral_score': 0.7485655,
'positive_score': 0.20099117},
407: {'negative_score': 0.003637213,
'neutral_score': 0.42699212,
'positive_score': 0.5693707},
408: {'negative_score': 0.010535455,
36
'neutral_score': 0.81817055,
'positive_score': 0.171294},
409: {'negative_score': 0.033283427,
'neutral_score': 0.9337622,
'positive_score': 0.032954246},
410: {'negative_score': 0.02812512,
'neutral_score': 0.9310894,
'positive_score': 0.0407854},
411: {'negative_score': 0.016940327,
'neutral_score': 0.94063765,
'positive_score': 0.04242195},
412: {'negative_score': 0.04737241,
'neutral_score': 0.9142901,
'positive_score': 0.0383375},
413: {'negative_score': 0.018767245,
'neutral_score': 0.9412121,
'positive_score': 0.04002066},
414: {'negative_score': 0.01808745,
'neutral_score': 0.9474161,
'positive_score': 0.03449628},
415: {'negative_score': 0.010316853,
'neutral_score': 0.9239881,
'positive_score': 0.06569487},
416: {'negative_score': 0.0027184265,
'neutral_score': 0.35762793,
'positive_score': 0.6396535},
417: {'negative_score': 0.001956002,
'neutral_score': 0.061733164,
'positive_score': 0.9363108},
418: {'negative_score': 0.03279826,
'neutral_score': 0.79561687,
'positive_score': 0.17158498},
419: {'negative_score': 0.03995065,
'neutral_score': 0.9155117,
'positive_score': 0.04453757},
420: {'negative_score': 0.34847236,
'neutral_score': 0.604401,
'positive_score': 0.047126602},
421: {'negative_score': 0.007974619,
'neutral_score': 0.4182566,
'positive_score': 0.5737686},
422: {'negative_score': 0.012359007,
'neutral_score': 0.7880895,
'positive_score': 0.19955146},
423: {'negative_score': 0.00552628,
'neutral_score': 0.6068031,
'positive_score': 0.38767064},
37
424: {'negative_score': 0.005219327,
'neutral_score': 0.51137453,
'positive_score': 0.48340598},
425: {'negative_score': 0.04828428,
'neutral_score': 0.84011203,
'positive_score': 0.11160363},
426: {'negative_score': 0.03177031,
'neutral_score': 0.9441385,
'positive_score': 0.024091393},
427: {'negative_score': 0.4903513,
'neutral_score': 0.4914646,
'positive_score': 0.018183993},
428: {'negative_score': 0.0035984002,
'neutral_score': 0.58405155,
'positive_score': 0.4123498},
429: {'negative_score': 0.2244403,
'neutral_score': 0.736244,
'positive_score': 0.039315686},
430: {'negative_score': 0.005785392,
'neutral_score': 0.38648307,
'positive_score': 0.6077314},
431: {'negative_score': 0.0057388376,
'neutral_score': 0.75375766,
'positive_score': 0.24050349},
432: {'negative_score': 0.011374814,
'neutral_score': 0.8616723,
'positive_score': 0.12695298},
433: {'negative_score': 0.0021213824,
'neutral_score': 0.07064873,
'positive_score': 0.9272299},
434: {'negative_score': 0.0057796678,
'neutral_score': 0.49367955,
'positive_score': 0.5005409},
435: {'negative_score': 0.05248139,
'neutral_score': 0.91366744,
'positive_score': 0.033851177},
436: {'negative_score': 0.26278368,
'neutral_score': 0.7042145,
'positive_score': 0.03300188},
437: {'negative_score': 0.046532508,
'neutral_score': 0.9201634,
'positive_score': 0.033304185},
438: {'negative_score': 0.08395779,
'neutral_score': 0.87093496,
'positive_score': 0.045107305},
439: {'negative_score': 0.037193075,
'neutral_score': 0.8730986,
38
'positive_score': 0.08970836},
440: {'negative_score': 0.042123742,
'neutral_score': 0.9136686,
'positive_score': 0.044207737},
441: {'negative_score': 0.06753841,
'neutral_score': 0.8982945,
'positive_score': 0.03416704},
442: {'negative_score': 0.025098128,
'neutral_score': 0.90880823,
'positive_score': 0.06609373},
443: {'negative_score': 0.2831938,
'neutral_score': 0.6861968,
'positive_score': 0.030609448},
444: {'negative_score': 0.025596993,
'neutral_score': 0.87155193,
'positive_score': 0.10285093},
445: {'negative_score': 0.24657165,
'neutral_score': 0.7310825,
'positive_score': 0.022345735},
446: {'negative_score': 0.1463667,
'neutral_score': 0.75984,
'positive_score': 0.093793325},
447: {'negative_score': 0.14936972,
'neutral_score': 0.80036265,
'positive_score': 0.050267626},
448: {'negative_score': 0.0093219755,
'neutral_score': 0.834134,
'positive_score': 0.15654406},
449: {'negative_score': 0.048512585,
'neutral_score': 0.9275171,
'positive_score': 0.023970338},
450: {'negative_score': 0.42154813,
'neutral_score': 0.55156285,
'positive_score': 0.026889082},
451: {'negative_score': 0.14936972,
'neutral_score': 0.80036265,
'positive_score': 0.050267626},
452: {'negative_score': 0.003033638,
'neutral_score': 0.17929928,
'positive_score': 0.817667},
453: {'negative_score': 0.020783523,
'neutral_score': 0.7898968,
'positive_score': 0.1893196},
454: {'negative_score': 0.053941574,
'neutral_score': 0.90715665,
'positive_score': 0.038901772},
455: {'negative_score': 0.21579522,
39
'neutral_score': 0.74765503,
'positive_score': 0.03654964},
456: {'negative_score': 0.004448642,
'neutral_score': 0.48780593,
'positive_score': 0.5077455},
457: {'negative_score': 0.004700852,
'neutral_score': 0.18791072,
'positive_score': 0.80738837},
458: {'negative_score': 0.051219944,
'neutral_score': 0.91074026,
'positive_score': 0.03803968},
459: {'negative_score': 0.0032840415,
'neutral_score': 0.17622875,
'positive_score': 0.82048726},
460: {'negative_score': 0.002726474,
'neutral_score': 0.26144475,
'positive_score': 0.7358287},
461: {'negative_score': 0.010150548,
'neutral_score': 0.53085274,
'positive_score': 0.4589968},
462: {'negative_score': 0.007781856,
'neutral_score': 0.87828714,
'positive_score': 0.11393094},
463: {'negative_score': 0.002483693,
'neutral_score': 0.20433833,
'positive_score': 0.79317796},
464: {'negative_score': 0.38752842,
'neutral_score': 0.5687363,
'positive_score': 0.043735173},
465: {'negative_score': 0.63950616,
'neutral_score': 0.35158846,
'positive_score': 0.008905421},
466: {'negative_score': 0.049977183,
'neutral_score': 0.9249996,
'positive_score': 0.025023185},
467: {'negative_score': 0.2849256,
'neutral_score': 0.685223,
'positive_score': 0.029851437},
468: {'negative_score': 0.0048265546,
'neutral_score': 0.2946458,
'positive_score': 0.7005275},
469: {'negative_score': 0.010586973,
'neutral_score': 0.798806,
'positive_score': 0.19060713},
470: {'negative_score': 0.008484926,
'neutral_score': 0.88145643,
'positive_score': 0.110058606},
40
471: {'negative_score': 0.013159263,
'neutral_score': 0.95112383,
'positive_score': 0.03571707},
472: {'negative_score': 0.010786151,
'neutral_score': 0.8759321,
'positive_score': 0.11328182},
473: {'negative_score': 0.030129164,
'neutral_score': 0.77044964,
'positive_score': 0.19942124},
474: {'negative_score': 0.13091071,
'neutral_score': 0.8312084,
'positive_score': 0.03788099},
475: {'negative_score': 0.007131345,
'neutral_score': 0.5377461,
'positive_score': 0.45512247},
476: {'negative_score': 0.04015412,
'neutral_score': 0.8318218,
'positive_score': 0.12802407},
477: {'negative_score': 0.013452114,
'neutral_score': 0.7430784,
'positive_score': 0.24346945},
478: {'negative_score': 0.043658704,
'neutral_score': 0.9134463,
'positive_score': 0.042895146},
479: {'negative_score': 0.0013737155,
'neutral_score': 0.03739044,
'positive_score': 0.9612358},
480: {'negative_score': 0.30753908,
'neutral_score': 0.6723729,
'positive_score': 0.02008813},
481: {'negative_score': 0.0028366947,
'neutral_score': 0.16059579,
'positive_score': 0.8365676},
482: {'negative_score': 0.06803914,
'neutral_score': 0.84880763,
'positive_score': 0.083153225},
483: {'negative_score': 0.13520324,
'neutral_score': 0.7894526,
'positive_score': 0.075344145},
484: {'negative_score': 0.4903513,
'neutral_score': 0.4914646,
'positive_score': 0.018183993},
485: {'negative_score': 0.26226765,
'neutral_score': 0.7098164,
'positive_score': 0.027915992},
486: {'negative_score': 0.10601437,
'neutral_score': 0.8447064,
41
'positive_score': 0.049279198},
487: {'negative_score': 0.102883115,
'neutral_score': 0.8739191,
'positive_score': 0.023197927},
488: {'negative_score': 0.6401936,
'neutral_score': 0.3348406,
'positive_score': 0.024965882},
489: {'negative_score': 0.6349949,
'neutral_score': 0.3448738,
'positive_score': 0.020131292},
490: {'negative_score': 0.018927792,
'neutral_score': 0.94683766,
'positive_score': 0.03423443},
491: {'negative_score': 0.18957606,
'neutral_score': 0.7886025,
'positive_score': 0.02182151},
492: {'negative_score': 0.0021453153,
'neutral_score': 0.14763576,
'positive_score': 0.85021883},
493: {'negative_score': 0.17554075,
'neutral_score': 0.77434236,
'positive_score': 0.050116885},
494: {'negative_score': 0.30382586,
'neutral_score': 0.6611454,
'positive_score': 0.035028774},
495: {'negative_score': 0.010740134,
'neutral_score': 0.8062925,
'positive_score': 0.18296745},
496: {'negative_score': 0.03108356,
'neutral_score': 0.8667473,
'positive_score': 0.10216902},
497: {'negative_score': 0.037193075,
'neutral_score': 0.8730986,
'positive_score': 0.08970836},
498: {'negative_score': 0.012144469,
'neutral_score': 0.61307234,
'positive_score': 0.3747831},
499: {'negative_score': 0.42154813,
'neutral_score': 0.55156285,
'positive_score': 0.026889082}}
[26]: pd.DataFrame(sentiment_dict)
[26]: 0 1 2 3 4 5 \
negative_score 0.009421 0.009439 0.003597 0.020917 0.003994 0.041209
neutral_score 0.149966 0.734183 0.499952 0.841008 0.199868 0.904120
positive_score 0.840613 0.256378 0.496450 0.138075 0.796137 0.054671
42
6 7 8 9 … 490 \
negative_score 0.013996 0.013675 0.116994 0.610194 … 0.018928
neutral_score 0.248352 0.468307 0.821576 0.377688 … 0.946838
positive_score 0.737652 0.518018 0.061431 0.012118 … 0.034234
Transposing it.
43
4 AMZN Why Amazon Stock Shot Nearly 2% Higher Today
.. … …
495 E Zacks Industry Outlook Highlights Exxon Mobil,…
496 E 5 Energy Stocks From the Promising Integrated …
497 E Eni SpA (E) Gains As Market Dips: What You Sho…
498 E Here is Why Growth Investors Should Buy Eni Sp…
499 E Is Eni (E) Stock Undervalued Right Now?
Sentiment_Scores negative_score \
0 {'negative_score': 0.009421064, 'neutral_score… 0.009421
1 {'negative_score': 0.00943878, 'neutral_score'… 0.009439
2 {'negative_score': 0.0035974341, 'neutral_scor… 0.003597
3 {'negative_score': 0.020916877, 'neutral_score… 0.020917
4 {'negative_score': 0.00399428, 'neutral_score'… 0.003994
.. … …
495 {'negative_score': 0.010740134, 'neutral_score… 0.010740
496 {'negative_score': 0.03108356, 'neutral_score'… 0.031084
497 {'negative_score': 0.037193075, 'neutral_score… 0.037193
498 {'negative_score': 0.012144469, 'neutral_score… 0.012144
499 {'negative_score': 0.42154813, 'neutral_score'… 0.421548
neutral_score positive_score
0 0.149966 0.840613
1 0.734183 0.256378
2 0.499952 0.496450
3 0.841008 0.138075
4 0.199868 0.796137
.. … …
495 0.806292 0.182967
496 0.866747 0.102169
497 0.873099 0.089708
498 0.613072 0.374783
499 0.551563 0.026889
7 EDA
[29]: final_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 500 entries, 0 to 499
Data columns (total 6 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Company 500 non-null object
1 News 500 non-null object
44
2 Sentiment_Scores 500 non-null object
3 negative_score 500 non-null float32
4 neutral_score 500 non-null float32
5 positive_score 500 non-null float32
dtypes: float32(3), object(3)
memory usage: 17.7+ KB
Checking the average values for each company.
ax[0].set_title('Negative Score')
sns.histplot(data=final_df, x='negative_score', ax=ax[0])
ax[1].set_title('Neutral Score')
sns.histplot(data=final_df, x='neutral_score', ax=ax[1])
ax[2].set_title('Positive Score')
sns.histplot(data=final_df, x='positive_score', ax=ax[2]);
45
Both positive and negative scores appear to be right-skewed, on the contrary the neutral score is
left-skewed.
Checking the best and the worst news.
[33]: final_df.News[479]
Probably here words like “incredible” and “growth” had a great influence on the final result.
46
[47]: final_df.loc[284, 'negative_score']
[47]: 0.86462146
[46]: final_df.News[284]
[46]: 'The Worst Is Over For PC, Smartphone Chip Stocks, Analyst Says'
Here the model does not seem to have well captured the sentence’s meaning. It interpreted words
like “worst” and “over” as a negative aspect, while the news was good for the company.
8 Conclusion
As a preliminary analysis, from my point of view, the most difficult part was the webscraping phase.
Many sites have a really complex structure and it is quite difficult to inspect them well.
Further improvements can be done in the future by including people’s opinions, for example by
including tweets.
47