diff --git a/.ipynb_checkpoints/Sentiment_Analysis-checkpoint.ipynb b/.ipynb_checkpoints/Sentiment_Analysis-checkpoint.ipynb new file mode 100644 index 0000000..3bc88b5 --- /dev/null +++ b/.ipynb_checkpoints/Sentiment_Analysis-checkpoint.ipynb @@ -0,0 +1,784 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 387 + }, + "colab_type": "code", + "id": "nMx2UqrJFyw-", + "outputId": "2a1da4e3-31d4-401f-f6b0-9f693ad8d9a6" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (0.22.0)\n", + "Requirement already satisfied: python-dateutil>=2 in /usr/local/lib/python3.6/dist-packages (from pandas) (2.5.3)\n", + "Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from pandas) (1.14.6)\n", + "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas) (2018.9)\n", + "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/dist-packages (from python-dateutil>=2->pandas) (1.11.0)\n", + "Requirement already satisfied: tweepy in /usr/local/lib/python3.6/dist-packages (3.6.0)\n", + "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.11.0)\n", + "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.2.0)\n", + "Requirement already satisfied: PySocks>=1.5.7 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.6.8)\n", + "Requirement already satisfied: requests>=2.11.1 in /usr/local/lib/python3.6/dist-packages (from tweepy) (2.18.4)\n", + "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->tweepy) (3.0.0)\n", + "Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (1.22)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2018.11.29)\n", + "Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2.6)\n", + "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (3.0.4)\n", + "Collecting vaderSentiment\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/86/9e/c53e1fc61aac5ee490a6ac5e21b1ac04e55a7c2aba647bb8411c9aadf24e/vaderSentiment-3.2.1-py2.py3-none-any.whl (125kB)\n", + "\u001b[K 100% |████████████████████████████████| 133kB 4.8MB/s \n", + "\u001b[?25hInstalling collected packages: vaderSentiment\n", + "Successfully installed vaderSentiment-3.2.1\n" + ] + } + ], + "source": [ + "!pip install pandas\n", + "!pip install tweepy\n", + "!pip install vaderSentiment" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "VldzdttbGRT6" + }, + "outputs": [], + "source": [ + "import tweepy\n", + "import pandas as pd\n", + "from nltk.sentiment.vader import SentimentIntensityAnalyzer" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "xoeDu5guGo-N" + }, + "outputs": [], + "source": [ + "#My Twitter API Authentication Variables\n", + "consumer_key = ''\n", + "consumer_secret = ''\n", + "access_token = ''\n", + "access_token_secret = ''" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## To get the full 280 characters from" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 376 + }, + "colab_type": "code", + "id": "i41rn4KkG-iz", + "outputId": "0243083f-626d-4df7-e974-f51e1e9d7790" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Tweets
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...
2RT @StevenDawsonSD: How #virtual assistants ar...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...
4RT @automeme: 4 Ways Artificial Intelligence C...
5Chefs, truck drivers beware: AI is coming for ...
6RT @StarCraft: This is it, ladies and gentleme...
7RT @StarCraft: This is it, ladies and gentleme...
8RT @NATS: In case you missed our announcement ...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...
\n", + "
" + ], + "text/plain": [ + " Tweets\n", + "0 #Banking&Insurance https://t.co/JKIXuMzwEU...\n", + "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat...\n", + "2 RT @StevenDawsonSD: How #virtual assistants ar...\n", + "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...\n", + "4 RT @automeme: 4 Ways Artificial Intelligence C...\n", + "5 Chefs, truck drivers beware: AI is coming for ...\n", + "6 RT @StarCraft: This is it, ladies and gentleme...\n", + "7 RT @StarCraft: This is it, ladies and gentleme...\n", + "8 RT @NATS: In case you missed our announcement ...\n", + "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ..." + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2019-01-24 18:38:09\n" + ] + } + ], + "source": [ + "auth = tweepy.OAuthHandler(consumer_key, consumer_secret)\n", + "auth.set_access_token(access_token, access_token_secret)\n", + "\n", + "api = tweepy.API(auth)\n", + "\n", + "tweets = api.search('Artificial Intelligence', count=200, tweet_mode = 'extended')\n", + "tweets_list = []\n", + "tweets_status = [t._json for t in tweets]\n", + "for tweet in tweets_status:\n", + " if 'retweeted_status' in tweet:\n", + " retweeted_status = tweet['retweeted_status']\n", + " tweets_list.append(retweeted_status['full_text'])\n", + " else:\n", + " tweets_list.append(tweet['full_text'])\n", + "\n", + "data = pd.DataFrame(tweets_list, columns = {'Tweets'})\n", + "data.head(2)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 69 + }, + "colab_type": "code", + "id": "6k_z5lpRIN4t", + "outputId": "e5f77812-a407-4ed0-8198-240dd01b2bec" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[nltk_data] Error loading fr_lexicon: Package 'fr_lexicon' not found\n", + "[nltk_data] in index\n" + ] + }, + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 21, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "import nltk\n", + "nltk.download('vader_lexicon')" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1969 + }, + "colab_type": "code", + "id": "kQiYGQEqIZ3w", + "outputId": "35c11ad4-4e98-4d25-c32a-0b627a3e5d90" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Tweetspolarity
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
2RT @StevenDawsonSD: How #virtual assistants ar...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...{'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp...
4RT @automeme: 4 Ways Artificial Intelligence C...{'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound...
5Chefs, truck drivers beware: AI is coming for ...{'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp...
6RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
7RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
8RT @NATS: In case you missed our announcement ...{'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
10https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
11RT @uniglobalunion: In #Davos at the #WEF19, #...{'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp...
12RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
13کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
14RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
15RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
16#WatsonSupplyChain @IBMSupplyChain #retail at ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
17‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
18RT @futurecitiescat: Our #URBAIN event has sta...{'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp...
19“High-altitude surveillance was once the domai...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
20RT @singularity_net: AI is the key topic at th...{'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp...
21RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
22RT @BCG: What will be the effects of artificia...{'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com...
23RT @_DeepQuest: The Inevitable Infant Rising &...{'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co...
24RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
25Invest in tech: artificial intelligence and ma...{'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp...
26RT @MiamiCableGuy: According to LinkedIn, thes...{'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp...
27\"‘Businesses Will Not Be Able to Hide’: Spy Sa...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
28RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
29RT @_DeepQuest: https://t.co/1h8Q7zsHxF{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
.........
70How Artificial Intelligence is poised to boost...{'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp...
71RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
72RT @jamesks: UoE machine learning society runn...{'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp...
73Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
74Artificial Intelligence Shows Potential for Tr...{'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp...
75RT @PostOpinions: \"What does an ethics-driven ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
76RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
77RT @davidbeem: \"From start to finish David Bee...{'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp...
78RT @OracleAnalytics: According to @techreviewA...{'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou...
79RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
80‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
81It's going to take reliable, low-cost #energys...{'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp...
82RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
83RT @philmcrae: Automation (robots, driverless ...{'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp...
84RT @bigdata: Using topological data analysis t...{'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp...
85Join IIEP, @IISTP_GW &amp; @SIIA for a discuss...{'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp...
86‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
87RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
88RT @DavidJones_now: via @Newsweek The Aliens H...{'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp...
89RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
90RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
91RT @ThalesUK: What can the #transport industry...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
92RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
93Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
94Young people, less educated workers, men, and ...{'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp...
95RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
96Understanding the Potential of Artificial Inte...{'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp...
97RT @data_nerd: Artificial Intelligence : Separ...{'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp...
98UoE machine learning society running a great s...{'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp...
99RT @program___news: Using artificial intellige...{'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co...
\n", + "

100 rows × 2 columns

\n", + "
" + ], + "text/plain": [ + " Tweets \\\n", + "0 #Banking&Insurance https://t.co/JKIXuMzwEU... \n", + "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "2 RT @StevenDawsonSD: How #virtual assistants ar... \n", + "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP... \n", + "4 RT @automeme: 4 Ways Artificial Intelligence C... \n", + "5 Chefs, truck drivers beware: AI is coming for ... \n", + "6 RT @StarCraft: This is it, ladies and gentleme... \n", + "7 RT @StarCraft: This is it, ladies and gentleme... \n", + "8 RT @NATS: In case you missed our announcement ... \n", + "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ... \n", + "10 https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif... \n", + "11 RT @uniglobalunion: In #Davos at the #WEF19, #... \n", + "12 RT @KoblerinPAK: Amazed to see that president ... \n", + "13 کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے... \n", + "14 RT @KoblerinPAK: Amazed to see that president ... \n", + "15 RT @KoblerinPAK: Amazed to see that president ... \n", + "16 #WatsonSupplyChain @IBMSupplyChain #retail at ... \n", + "17 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "18 RT @futurecitiescat: Our #URBAIN event has sta... \n", + "19 “High-altitude surveillance was once the domai... \n", + "20 RT @singularity_net: AI is the key topic at th... \n", + "21 RT @StarCraft: This is it, ladies and gentleme... \n", + "22 RT @BCG: What will be the effects of artificia... \n", + "23 RT @_DeepQuest: The Inevitable Infant Rising &... \n", + "24 RT @StarCraft: This is it, ladies and gentleme... \n", + "25 Invest in tech: artificial intelligence and ma... \n", + "26 RT @MiamiCableGuy: According to LinkedIn, thes... \n", + "27 \"‘Businesses Will Not Be Able to Hide’: Spy Sa... \n", + "28 RT @StarCraft: This is it, ladies and gentleme... \n", + "29 RT @_DeepQuest: https://t.co/1h8Q7zsHxF \n", + ".. ... \n", + "70 How Artificial Intelligence is poised to boost... \n", + "71 RT @StarCraft: This is it, ladies and gentleme... \n", + "72 RT @jamesks: UoE machine learning society runn... \n", + "73 Using artificial intelligence for error correc... \n", + "74 Artificial Intelligence Shows Potential for Tr... \n", + "75 RT @PostOpinions: \"What does an ethics-driven ... \n", + "76 RT @StarCraft: This is it, ladies and gentleme... \n", + "77 RT @davidbeem: \"From start to finish David Bee... \n", + "78 RT @OracleAnalytics: According to @techreviewA... \n", + "79 RT @StarCraft: This is it, ladies and gentleme... \n", + "80 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "81 It's going to take reliable, low-cost #energys... \n", + "82 RT @StarCraft: This is it, ladies and gentleme... \n", + "83 RT @philmcrae: Automation (robots, driverless ... \n", + "84 RT @bigdata: Using topological data analysis t... \n", + "85 Join IIEP, @IISTP_GW & @SIIA for a discuss... \n", + "86 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "87 RT @StarCraft: This is it, ladies and gentleme... \n", + "88 RT @DavidJones_now: via @Newsweek The Aliens H... \n", + "89 RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A... \n", + "90 RT @StarCraft: This is it, ladies and gentleme... \n", + "91 RT @ThalesUK: What can the #transport industry... \n", + "92 RT @StarCraft: This is it, ladies and gentleme... \n", + "93 Using artificial intelligence for error correc... \n", + "94 Young people, less educated workers, men, and ... \n", + "95 RT @StarCraft: This is it, ladies and gentleme... \n", + "96 Understanding the Potential of Artificial Inte... \n", + "97 RT @data_nerd: Artificial Intelligence : Separ... \n", + "98 UoE machine learning society running a great s... \n", + "99 RT @program___news: Using artificial intellige... \n", + "\n", + " polarity \n", + "0 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "1 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "2 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", + "3 {'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp... \n", + "4 {'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound... \n", + "5 {'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp... \n", + "6 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "7 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "8 {'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com... \n", + "9 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "10 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "11 {'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp... \n", + "12 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "13 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "14 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "15 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "16 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "17 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "18 {'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp... \n", + "19 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", + "20 {'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp... \n", + "21 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "22 {'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com... \n", + "23 {'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co... \n", + "24 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "25 {'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp... \n", + "26 {'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp... \n", + "27 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "28 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "29 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + ".. ... \n", + "70 {'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp... \n", + "71 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "72 {'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp... \n", + "73 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", + "74 {'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp... \n", + "75 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "76 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "77 {'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp... \n", + "78 {'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou... \n", + "79 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "80 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "81 {'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp... \n", + "82 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "83 {'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp... \n", + "84 {'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp... \n", + "85 {'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp... \n", + "86 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "87 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "88 {'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp... \n", + "89 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "90 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "91 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "92 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "93 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", + "94 {'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp... \n", + "95 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "96 {'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp... \n", + "97 {'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp... \n", + "98 {'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp... \n", + "99 {'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co... \n", + "\n", + "[100 rows x 2 columns]" + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" + } + ], + "source": [ + "sid = SentimentIntensityAnalyzer()\n", + "\n", + "\n", + "listy = []\n", + "\n", + "for index, row in data.iterrows():\n", + " ss = sid.polarity_scores(row[\"Tweets\"])\n", + " listy.append(ss)\n", + " \n", + "se = pd.Series(listy)\n", + "data['polarity'] = se.values\n", + "\n", + "display(data.head(100))" + ] + } + ], + "metadata": { + "colab": { + "name": "Untitled29.ipynb", + "provenance": [], + "version": "0.3.2" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/Sentiment_Analysis.ipynb b/Sentiment_Analysis.ipynb index 24cb3a5..1087e6e 100644 --- a/Sentiment_Analysis.ipynb +++ b/Sentiment_Analysis.ipynb @@ -1,761 +1,786 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { + "cells": [ + { + "cell_type": "code", + "execution_count": 0, + "metadata": { "colab": { - "name": "Untitled29.ipynb", - "version": "0.3.2", - "provenance": [] + "base_uri": "https://localhost:8080/", + "height": 387 }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" + "colab_type": "code", + "id": "nMx2UqrJFyw-", + "outputId": "2a1da4e3-31d4-401f-f6b0-9f693ad8d9a6" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (0.22.0)\n", + "Requirement already satisfied: python-dateutil>=2 in /usr/local/lib/python3.6/dist-packages (from pandas) (2.5.3)\n", + "Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from pandas) (1.14.6)\n", + "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas) (2018.9)\n", + "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/dist-packages (from python-dateutil>=2->pandas) (1.11.0)\n", + "Requirement already satisfied: tweepy in /usr/local/lib/python3.6/dist-packages (3.6.0)\n", + "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.11.0)\n", + "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.2.0)\n", + "Requirement already satisfied: PySocks>=1.5.7 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.6.8)\n", + "Requirement already satisfied: requests>=2.11.1 in /usr/local/lib/python3.6/dist-packages (from tweepy) (2.18.4)\n", + "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->tweepy) (3.0.0)\n", + "Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (1.22)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2018.11.29)\n", + "Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2.6)\n", + "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (3.0.4)\n", + "Collecting vaderSentiment\n", + "\u001b[?25l Downloading https://files.pythonhosted.org/packages/86/9e/c53e1fc61aac5ee490a6ac5e21b1ac04e55a7c2aba647bb8411c9aadf24e/vaderSentiment-3.2.1-py2.py3-none-any.whl (125kB)\n", + "\u001b[K 100% |████████████████████████████████| 133kB 4.8MB/s \n", + "\u001b[?25hInstalling collected packages: vaderSentiment\n", + "Successfully installed vaderSentiment-3.2.1\n" + ] } + ], + "source": [ + "!pip install pandas\n", + "!pip install tweepy\n", + "!pip install vaderSentiment" + ] }, - "cells": [ - { - "metadata": { - "id": "nMx2UqrJFyw-", - "colab_type": "code", - "outputId": "2a1da4e3-31d4-401f-f6b0-9f693ad8d9a6", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 387 - } - }, - "cell_type": "code", - "source": [ - "!pip install pandas\n", - "!pip install tweepy\n", - "!pip install vaderSentiment" - ], - "execution_count": 0, - "outputs": [ - { - "output_type": "stream", - "text": [ - "Requirement already satisfied: pandas in /usr/local/lib/python3.6/dist-packages (0.22.0)\n", - "Requirement already satisfied: python-dateutil>=2 in /usr/local/lib/python3.6/dist-packages (from pandas) (2.5.3)\n", - "Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from pandas) (1.14.6)\n", - "Requirement already satisfied: pytz>=2011k in /usr/local/lib/python3.6/dist-packages (from pandas) (2018.9)\n", - "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.6/dist-packages (from python-dateutil>=2->pandas) (1.11.0)\n", - "Requirement already satisfied: tweepy in /usr/local/lib/python3.6/dist-packages (3.6.0)\n", - "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.11.0)\n", - "Requirement already satisfied: requests-oauthlib>=0.7.0 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.2.0)\n", - "Requirement already satisfied: PySocks>=1.5.7 in /usr/local/lib/python3.6/dist-packages (from tweepy) (1.6.8)\n", - "Requirement already satisfied: requests>=2.11.1 in /usr/local/lib/python3.6/dist-packages (from tweepy) (2.18.4)\n", - "Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.6/dist-packages (from requests-oauthlib>=0.7.0->tweepy) (3.0.0)\n", - "Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (1.22)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2018.11.29)\n", - "Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (2.6)\n", - "Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests>=2.11.1->tweepy) (3.0.4)\n", - "Collecting vaderSentiment\n", - "\u001b[?25l Downloading https://files.pythonhosted.org/packages/86/9e/c53e1fc61aac5ee490a6ac5e21b1ac04e55a7c2aba647bb8411c9aadf24e/vaderSentiment-3.2.1-py2.py3-none-any.whl (125kB)\n", - "\u001b[K 100% |████████████████████████████████| 133kB 4.8MB/s \n", - "\u001b[?25hInstalling collected packages: vaderSentiment\n", - "Successfully installed vaderSentiment-3.2.1\n" - ], - "name": "stdout" - } - ] + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "VldzdttbGRT6" + }, + "outputs": [], + "source": [ + "import tweepy\n", + "import pandas as pd\n", + "from nltk.sentiment.vader import SentimentIntensityAnalyzer" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": {}, + "colab_type": "code", + "id": "xoeDu5guGo-N" + }, + "outputs": [], + "source": [ + "#My Twitter API Authentication Variables\n", + "consumer_key = ''\n", + "consumer_secret = ''\n", + "access_token = ''\n", + "access_token_secret = ''" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## To get the full 280 characters from Tweet\n", + "\n", + "The below code will also get the full tweets from a retweeted status. This helps us to perform sentimental analysis on a complete tweet." + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 376 }, + "colab_type": "code", + "id": "i41rn4KkG-iz", + "outputId": "0243083f-626d-4df7-e974-f51e1e9d7790" + }, + "outputs": [ { - "metadata": { - "id": "VldzdttbGRT6", - "colab_type": "code", - "colab": {} - }, - "cell_type": "code", - "source": [ - "import tweepy\n", - "import pandas as pd\n", - "from nltk.sentiment.vader import SentimentIntensityAnalyzer" + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Tweets
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...
2RT @StevenDawsonSD: How #virtual assistants ar...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...
4RT @automeme: 4 Ways Artificial Intelligence C...
5Chefs, truck drivers beware: AI is coming for ...
6RT @StarCraft: This is it, ladies and gentleme...
7RT @StarCraft: This is it, ladies and gentleme...
8RT @NATS: In case you missed our announcement ...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...
\n", + "
" ], - "execution_count": 0, - "outputs": [] + "text/plain": [ + " Tweets\n", + "0 #Banking&Insurance https://t.co/JKIXuMzwEU...\n", + "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat...\n", + "2 RT @StevenDawsonSD: How #virtual assistants ar...\n", + "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...\n", + "4 RT @automeme: 4 Ways Artificial Intelligence C...\n", + "5 Chefs, truck drivers beware: AI is coming for ...\n", + "6 RT @StarCraft: This is it, ladies and gentleme...\n", + "7 RT @StarCraft: This is it, ladies and gentleme...\n", + "8 RT @NATS: In case you missed our announcement ...\n", + "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ..." + ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" }, { - "metadata": { - "id": "xoeDu5guGo-N", - "colab_type": "code", - "colab": {} - }, - "cell_type": "code", - "source": [ - "#My Twitter API Authentication Variables\n", - "consumer_key = ''\n", - "consumer_secret = ''\n", - "access_token = ''\n", - "access_token_secret = ''" - ], - "execution_count": 0, - "outputs": [] + "name": "stdout", + "output_type": "stream", + "text": [ + "2019-01-24 18:38:09\n" + ] + } + ], + "source": [ + "auth = tweepy.OAuthHandler(consumer_key, consumer_secret)\n", + "auth.set_access_token(access_token, access_token_secret)\n", + "\n", + "api = tweepy.API(auth)\n", + "\n", + "tweets = api.search('Artificial Intelligence', count=200, tweet_mode = 'extended')\n", + "tweets_list = []\n", + "tweets_status = [t._json for t in tweets]\n", + "for tweet in tweets_status:\n", + " if 'retweeted_status' in tweet:\n", + " retweeted_status = tweet['retweeted_status']\n", + " tweets_list.append(retweeted_status['full_text'])\n", + " else:\n", + " tweets_list.append(tweet['full_text'])\n", + "\n", + "data = pd.DataFrame(tweets_list, columns = {'Tweets'})\n", + "data.head(2)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 69 }, + "colab_type": "code", + "id": "6k_z5lpRIN4t", + "outputId": "e5f77812-a407-4ed0-8198-240dd01b2bec" + }, + "outputs": [ { - "metadata": { - "id": "i41rn4KkG-iz", - "colab_type": "code", - "outputId": "0243083f-626d-4df7-e974-f51e1e9d7790", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 376 - } - }, - "cell_type": "code", - "source": [ - "auth = tweepy.OAuthHandler(consumer_key, consumer_secret)\n", - "auth.set_access_token(access_token, access_token_secret)\n", - "\n", - "api = tweepy.API(auth)\n", - "\n", - "tweets = api.search('Artificial Intelligence', count=200)\n", - "\n", - "\n", - "data = pd.DataFrame(data=[tweet.text for tweet in tweets], columns=['Tweets'])\n", - "\n", - "display(data.head(10))\n", - "\n", - "\n", - "print(tweets[0].created_at)\n" - ], - "execution_count": 0, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Tweets
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...
2RT @StevenDawsonSD: How #virtual assistants ar...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...
4RT @automeme: 4 Ways Artificial Intelligence C...
5Chefs, truck drivers beware: AI is coming for ...
6RT @StarCraft: This is it, ladies and gentleme...
7RT @StarCraft: This is it, ladies and gentleme...
8RT @NATS: In case you missed our announcement ...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...
\n", - "
" - ], - "text/plain": [ - " Tweets\n", - "0 #Banking&Insurance https://t.co/JKIXuMzwEU...\n", - "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat...\n", - "2 RT @StevenDawsonSD: How #virtual assistants ar...\n", - "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...\n", - "4 RT @automeme: 4 Ways Artificial Intelligence C...\n", - "5 Chefs, truck drivers beware: AI is coming for ...\n", - "6 RT @StarCraft: This is it, ladies and gentleme...\n", - "7 RT @StarCraft: This is it, ladies and gentleme...\n", - "8 RT @NATS: In case you missed our announcement ...\n", - "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ..." - ] - }, - "metadata": { - "tags": [] - } - }, - { - "output_type": "stream", - "text": [ - "2019-01-24 18:38:09\n" - ], - "name": "stdout" - } - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "[nltk_data] Error loading fr_lexicon: Package 'fr_lexicon' not found\n", + "[nltk_data] in index\n" + ] }, { - "metadata": { - "id": "6k_z5lpRIN4t", - "colab_type": "code", - "outputId": "e5f77812-a407-4ed0-8198-240dd01b2bec", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 69 - } - }, - "cell_type": "code", - "source": [ - "import nltk\n", - "nltk.download('vader_lexicon')" - ], - "execution_count": 0, - "outputs": [ - { - "output_type": "stream", - "text": [ - "[nltk_data] Error loading fr_lexicon: Package 'fr_lexicon' not found\n", - "[nltk_data] in index\n" - ], - "name": "stdout" - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "False" - ] - }, - "metadata": { - "tags": [] - }, - "execution_count": 21 - } + "data": { + "text/plain": [ + "False" ] + }, + "execution_count": 21, + "metadata": { + "tags": [] + }, + "output_type": "execute_result" + } + ], + "source": [ + "import nltk\n", + "nltk.download('vader_lexicon')" + ] + }, + { + "cell_type": "code", + "execution_count": 0, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 1969 }, + "colab_type": "code", + "id": "kQiYGQEqIZ3w", + "outputId": "35c11ad4-4e98-4d25-c32a-0b627a3e5d90" + }, + "outputs": [ { - "metadata": { - "id": "kQiYGQEqIZ3w", - "colab_type": "code", - "outputId": "35c11ad4-4e98-4d25-c32a-0b627a3e5d90", - "colab": { - "base_uri": "https://localhost:8080/", - "height": 1969 - } - }, - "cell_type": "code", - "source": [ - "sid = SentimentIntensityAnalyzer()\n", - "\n", - "\n", - "listy = []\n", - "\n", - "for index, row in data.iterrows():\n", - " ss = sid.polarity_scores(row[\"Tweets\"])\n", - " listy.append(ss)\n", - " \n", - "se = pd.Series(listy)\n", - "data['polarity'] = se.values\n", - "\n", - "display(data.head(100))" + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Tweetspolarity
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
2RT @StevenDawsonSD: How #virtual assistants ar...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...{'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp...
4RT @automeme: 4 Ways Artificial Intelligence C...{'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound...
5Chefs, truck drivers beware: AI is coming for ...{'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp...
6RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
7RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
8RT @NATS: In case you missed our announcement ...{'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
10https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
11RT @uniglobalunion: In #Davos at the #WEF19, #...{'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp...
12RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
13کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
14RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
15RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
16#WatsonSupplyChain @IBMSupplyChain #retail at ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
17‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
18RT @futurecitiescat: Our #URBAIN event has sta...{'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp...
19“High-altitude surveillance was once the domai...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
20RT @singularity_net: AI is the key topic at th...{'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp...
21RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
22RT @BCG: What will be the effects of artificia...{'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com...
23RT @_DeepQuest: The Inevitable Infant Rising &...{'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co...
24RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
25Invest in tech: artificial intelligence and ma...{'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp...
26RT @MiamiCableGuy: According to LinkedIn, thes...{'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp...
27\"‘Businesses Will Not Be Able to Hide’: Spy Sa...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
28RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
29RT @_DeepQuest: https://t.co/1h8Q7zsHxF{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
.........
70How Artificial Intelligence is poised to boost...{'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp...
71RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
72RT @jamesks: UoE machine learning society runn...{'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp...
73Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
74Artificial Intelligence Shows Potential for Tr...{'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp...
75RT @PostOpinions: \"What does an ethics-driven ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
76RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
77RT @davidbeem: \"From start to finish David Bee...{'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp...
78RT @OracleAnalytics: According to @techreviewA...{'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou...
79RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
80‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
81It's going to take reliable, low-cost #energys...{'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp...
82RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
83RT @philmcrae: Automation (robots, driverless ...{'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp...
84RT @bigdata: Using topological data analysis t...{'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp...
85Join IIEP, @IISTP_GW &amp; @SIIA for a discuss...{'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp...
86‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
87RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
88RT @DavidJones_now: via @Newsweek The Aliens H...{'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp...
89RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
90RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
91RT @ThalesUK: What can the #transport industry...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
92RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
93Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
94Young people, less educated workers, men, and ...{'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp...
95RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
96Understanding the Potential of Artificial Inte...{'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp...
97RT @data_nerd: Artificial Intelligence : Separ...{'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp...
98UoE machine learning society running a great s...{'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp...
99RT @program___news: Using artificial intellige...{'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co...
\n", + "

100 rows × 2 columns

\n", + "
" ], - "execution_count": 0, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Tweetspolarity
0#Banking&amp;Insurance https://t.co/JKIXuMzwEU...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
1‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
2RT @StevenDawsonSD: How #virtual assistants ar...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
3RT @mikecoulson48: @SwotTyler @johnmcdonnellMP...{'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp...
4RT @automeme: 4 Ways Artificial Intelligence C...{'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound...
5Chefs, truck drivers beware: AI is coming for ...{'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp...
6RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
7RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
8RT @NATS: In case you missed our announcement ...{'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com...
9「NotePerformer」って,これかな.有料. | NotePerformer 3: ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
10https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
11RT @uniglobalunion: In #Davos at the #WEF19, #...{'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp...
12RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
13کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
14RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
15RT @KoblerinPAK: Amazed to see that president ...{'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou...
16#WatsonSupplyChain @IBMSupplyChain #retail at ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
17‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
18RT @futurecitiescat: Our #URBAIN event has sta...{'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp...
19“High-altitude surveillance was once the domai...{'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp...
20RT @singularity_net: AI is the key topic at th...{'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp...
21RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
22RT @BCG: What will be the effects of artificia...{'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com...
23RT @_DeepQuest: The Inevitable Infant Rising &...{'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co...
24RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
25Invest in tech: artificial intelligence and ma...{'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp...
26RT @MiamiCableGuy: According to LinkedIn, thes...{'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp...
27\"‘Businesses Will Not Be Able to Hide’: Spy Sa...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
28RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
29RT @_DeepQuest: https://t.co/1h8Q7zsHxF{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
.........
70How Artificial Intelligence is poised to boost...{'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp...
71RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
72RT @jamesks: UoE machine learning society runn...{'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp...
73Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
74Artificial Intelligence Shows Potential for Tr...{'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp...
75RT @PostOpinions: \"What does an ethics-driven ...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
76RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
77RT @davidbeem: \"From start to finish David Bee...{'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp...
78RT @OracleAnalytics: According to @techreviewA...{'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou...
79RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
80‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
81It's going to take reliable, low-cost #energys...{'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp...
82RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
83RT @philmcrae: Automation (robots, driverless ...{'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp...
84RT @bigdata: Using topological data analysis t...{'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp...
85Join IIEP, @IISTP_GW &amp; @SIIA for a discuss...{'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp...
86‘Businesses Will Not Be Able to Hide’: Spy Sat...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
87RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
88RT @DavidJones_now: via @Newsweek The Aliens H...{'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp...
89RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
90RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
91RT @ThalesUK: What can the #transport industry...{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound...
92RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
93Using artificial intelligence for error correc...{'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co...
94Young people, less educated workers, men, and ...{'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp...
95RT @StarCraft: This is it, ladies and gentleme...{'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp...
96Understanding the Potential of Artificial Inte...{'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp...
97RT @data_nerd: Artificial Intelligence : Separ...{'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp...
98UoE machine learning society running a great s...{'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp...
99RT @program___news: Using artificial intellige...{'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co...
\n", - "

100 rows × 2 columns

\n", - "
" - ], - "text/plain": [ - " Tweets \\\n", - "0 #Banking&Insurance https://t.co/JKIXuMzwEU... \n", - "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", - "2 RT @StevenDawsonSD: How #virtual assistants ar... \n", - "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP... \n", - "4 RT @automeme: 4 Ways Artificial Intelligence C... \n", - "5 Chefs, truck drivers beware: AI is coming for ... \n", - "6 RT @StarCraft: This is it, ladies and gentleme... \n", - "7 RT @StarCraft: This is it, ladies and gentleme... \n", - "8 RT @NATS: In case you missed our announcement ... \n", - "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ... \n", - "10 https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif... \n", - "11 RT @uniglobalunion: In #Davos at the #WEF19, #... \n", - "12 RT @KoblerinPAK: Amazed to see that president ... \n", - "13 کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے... \n", - "14 RT @KoblerinPAK: Amazed to see that president ... \n", - "15 RT @KoblerinPAK: Amazed to see that president ... \n", - "16 #WatsonSupplyChain @IBMSupplyChain #retail at ... \n", - "17 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", - "18 RT @futurecitiescat: Our #URBAIN event has sta... \n", - "19 “High-altitude surveillance was once the domai... \n", - "20 RT @singularity_net: AI is the key topic at th... \n", - "21 RT @StarCraft: This is it, ladies and gentleme... \n", - "22 RT @BCG: What will be the effects of artificia... \n", - "23 RT @_DeepQuest: The Inevitable Infant Rising &... \n", - "24 RT @StarCraft: This is it, ladies and gentleme... \n", - "25 Invest in tech: artificial intelligence and ma... \n", - "26 RT @MiamiCableGuy: According to LinkedIn, thes... \n", - "27 \"‘Businesses Will Not Be Able to Hide’: Spy Sa... \n", - "28 RT @StarCraft: This is it, ladies and gentleme... \n", - "29 RT @_DeepQuest: https://t.co/1h8Q7zsHxF \n", - ".. ... \n", - "70 How Artificial Intelligence is poised to boost... \n", - "71 RT @StarCraft: This is it, ladies and gentleme... \n", - "72 RT @jamesks: UoE machine learning society runn... \n", - "73 Using artificial intelligence for error correc... \n", - "74 Artificial Intelligence Shows Potential for Tr... \n", - "75 RT @PostOpinions: \"What does an ethics-driven ... \n", - "76 RT @StarCraft: This is it, ladies and gentleme... \n", - "77 RT @davidbeem: \"From start to finish David Bee... \n", - "78 RT @OracleAnalytics: According to @techreviewA... \n", - "79 RT @StarCraft: This is it, ladies and gentleme... \n", - "80 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", - "81 It's going to take reliable, low-cost #energys... \n", - "82 RT @StarCraft: This is it, ladies and gentleme... \n", - "83 RT @philmcrae: Automation (robots, driverless ... \n", - "84 RT @bigdata: Using topological data analysis t... \n", - "85 Join IIEP, @IISTP_GW & @SIIA for a discuss... \n", - "86 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", - "87 RT @StarCraft: This is it, ladies and gentleme... \n", - "88 RT @DavidJones_now: via @Newsweek The Aliens H... \n", - "89 RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A... \n", - "90 RT @StarCraft: This is it, ladies and gentleme... \n", - "91 RT @ThalesUK: What can the #transport industry... \n", - "92 RT @StarCraft: This is it, ladies and gentleme... \n", - "93 Using artificial intelligence for error correc... \n", - "94 Young people, less educated workers, men, and ... \n", - "95 RT @StarCraft: This is it, ladies and gentleme... \n", - "96 Understanding the Potential of Artificial Inte... \n", - "97 RT @data_nerd: Artificial Intelligence : Separ... \n", - "98 UoE machine learning society running a great s... \n", - "99 RT @program___news: Using artificial intellige... \n", - "\n", - " polarity \n", - "0 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "1 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "2 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", - "3 {'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp... \n", - "4 {'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound... \n", - "5 {'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp... \n", - "6 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "7 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "8 {'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com... \n", - "9 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "10 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "11 {'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp... \n", - "12 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", - "13 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "14 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", - "15 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", - "16 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "17 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "18 {'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp... \n", - "19 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", - "20 {'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp... \n", - "21 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "22 {'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com... \n", - "23 {'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co... \n", - "24 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "25 {'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp... \n", - "26 {'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp... \n", - "27 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "28 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "29 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - ".. ... \n", - "70 {'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp... \n", - "71 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "72 {'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp... \n", - "73 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", - "74 {'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp... \n", - "75 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "76 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "77 {'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp... \n", - "78 {'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou... \n", - "79 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "80 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "81 {'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp... \n", - "82 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "83 {'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp... \n", - "84 {'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp... \n", - "85 {'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp... \n", - "86 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "87 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "88 {'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp... \n", - "89 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "90 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "91 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", - "92 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "93 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", - "94 {'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp... \n", - "95 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", - "96 {'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp... \n", - "97 {'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp... \n", - "98 {'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp... \n", - "99 {'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co... \n", - "\n", - "[100 rows x 2 columns]" - ] - }, - "metadata": { - "tags": [] - } - } + "text/plain": [ + " Tweets \\\n", + "0 #Banking&Insurance https://t.co/JKIXuMzwEU... \n", + "1 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "2 RT @StevenDawsonSD: How #virtual assistants ar... \n", + "3 RT @mikecoulson48: @SwotTyler @johnmcdonnellMP... \n", + "4 RT @automeme: 4 Ways Artificial Intelligence C... \n", + "5 Chefs, truck drivers beware: AI is coming for ... \n", + "6 RT @StarCraft: This is it, ladies and gentleme... \n", + "7 RT @StarCraft: This is it, ladies and gentleme... \n", + "8 RT @NATS: In case you missed our announcement ... \n", + "9 「NotePerformer」って,これかな.有料. | NotePerformer 3: ... \n", + "10 https://t.co/nFCC9dFEWS\\n\\n#AI #chabots #artif... \n", + "11 RT @uniglobalunion: In #Davos at the #WEF19, #... \n", + "12 RT @KoblerinPAK: Amazed to see that president ... \n", + "13 کیاخوبصورت کالم ہے\\n@ArifAlvi \\nصاحب آپ توچنگے... \n", + "14 RT @KoblerinPAK: Amazed to see that president ... \n", + "15 RT @KoblerinPAK: Amazed to see that president ... \n", + "16 #WatsonSupplyChain @IBMSupplyChain #retail at ... \n", + "17 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "18 RT @futurecitiescat: Our #URBAIN event has sta... \n", + "19 “High-altitude surveillance was once the domai... \n", + "20 RT @singularity_net: AI is the key topic at th... \n", + "21 RT @StarCraft: This is it, ladies and gentleme... \n", + "22 RT @BCG: What will be the effects of artificia... \n", + "23 RT @_DeepQuest: The Inevitable Infant Rising &... \n", + "24 RT @StarCraft: This is it, ladies and gentleme... \n", + "25 Invest in tech: artificial intelligence and ma... \n", + "26 RT @MiamiCableGuy: According to LinkedIn, thes... \n", + "27 \"‘Businesses Will Not Be Able to Hide’: Spy Sa... \n", + "28 RT @StarCraft: This is it, ladies and gentleme... \n", + "29 RT @_DeepQuest: https://t.co/1h8Q7zsHxF \n", + ".. ... \n", + "70 How Artificial Intelligence is poised to boost... \n", + "71 RT @StarCraft: This is it, ladies and gentleme... \n", + "72 RT @jamesks: UoE machine learning society runn... \n", + "73 Using artificial intelligence for error correc... \n", + "74 Artificial Intelligence Shows Potential for Tr... \n", + "75 RT @PostOpinions: \"What does an ethics-driven ... \n", + "76 RT @StarCraft: This is it, ladies and gentleme... \n", + "77 RT @davidbeem: \"From start to finish David Bee... \n", + "78 RT @OracleAnalytics: According to @techreviewA... \n", + "79 RT @StarCraft: This is it, ladies and gentleme... \n", + "80 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "81 It's going to take reliable, low-cost #energys... \n", + "82 RT @StarCraft: This is it, ladies and gentleme... \n", + "83 RT @philmcrae: Automation (robots, driverless ... \n", + "84 RT @bigdata: Using topological data analysis t... \n", + "85 Join IIEP, @IISTP_GW & @SIIA for a discuss... \n", + "86 ‘Businesses Will Not Be Able to Hide’: Spy Sat... \n", + "87 RT @StarCraft: This is it, ladies and gentleme... \n", + "88 RT @DavidJones_now: via @Newsweek The Aliens H... \n", + "89 RT @KoblerinPAK: دیکھ کر حیرانی ہوئی کہ صدر @A... \n", + "90 RT @StarCraft: This is it, ladies and gentleme... \n", + "91 RT @ThalesUK: What can the #transport industry... \n", + "92 RT @StarCraft: This is it, ladies and gentleme... \n", + "93 Using artificial intelligence for error correc... \n", + "94 Young people, less educated workers, men, and ... \n", + "95 RT @StarCraft: This is it, ladies and gentleme... \n", + "96 Understanding the Potential of Artificial Inte... \n", + "97 RT @data_nerd: Artificial Intelligence : Separ... \n", + "98 UoE machine learning society running a great s... \n", + "99 RT @program___news: Using artificial intellige... \n", + "\n", + " polarity \n", + "0 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "1 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "2 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", + "3 {'neg': 0.0, 'neu': 0.816, 'pos': 0.184, 'comp... \n", + "4 {'neg': 0.0, 'neu': 0.7, 'pos': 0.3, 'compound... \n", + "5 {'neg': 0.0, 'neu': 0.847, 'pos': 0.153, 'comp... \n", + "6 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "7 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "8 {'neg': 0.157, 'neu': 0.73, 'pos': 0.113, 'com... \n", + "9 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "10 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "11 {'neg': 0.0, 'neu': 0.732, 'pos': 0.268, 'comp... \n", + "12 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "13 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "14 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "15 {'neg': 0.0, 'neu': 0.74, 'pos': 0.26, 'compou... \n", + "16 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "17 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "18 {'neg': 0.0, 'neu': 0.834, 'pos': 0.166, 'comp... \n", + "19 {'neg': 0.0, 'neu': 0.833, 'pos': 0.167, 'comp... \n", + "20 {'neg': 0.0, 'neu': 0.811, 'pos': 0.189, 'comp... \n", + "21 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "22 {'neg': 0.108, 'neu': 0.712, 'pos': 0.18, 'com... \n", + "23 {'neg': 0.141, 'neu': 0.726, 'pos': 0.132, 'co... \n", + "24 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "25 {'neg': 0.0, 'neu': 0.721, 'pos': 0.279, 'comp... \n", + "26 {'neg': 0.0, 'neu': 0.885, 'pos': 0.115, 'comp... \n", + "27 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "28 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "29 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + ".. ... \n", + "70 {'neg': 0.0, 'neu': 0.402, 'pos': 0.598, 'comp... \n", + "71 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "72 {'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'comp... \n", + "73 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", + "74 {'neg': 0.0, 'neu': 0.647, 'pos': 0.353, 'comp... \n", + "75 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "76 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "77 {'neg': 0.134, 'neu': 0.866, 'pos': 0.0, 'comp... \n", + "78 {'neg': 0.0, 'neu': 0.88, 'pos': 0.12, 'compou... \n", + "79 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "80 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "81 {'neg': 0.0, 'neu': 0.904, 'pos': 0.096, 'comp... \n", + "82 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "83 {'neg': 0.0, 'neu': 0.853, 'pos': 0.147, 'comp... \n", + "84 {'neg': 0.0, 'neu': 0.868, 'pos': 0.132, 'comp... \n", + "85 {'neg': 0.0, 'neu': 0.762, 'pos': 0.238, 'comp... \n", + "86 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "87 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "88 {'neg': 0.117, 'neu': 0.883, 'pos': 0.0, 'comp... \n", + "89 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "90 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "91 {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... \n", + "92 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "93 {'neg': 0.182, 'neu': 0.608, 'pos': 0.209, 'co... \n", + "94 {'neg': 0.077, 'neu': 0.923, 'pos': 0.0, 'comp... \n", + "95 {'neg': 0.0, 'neu': 0.681, 'pos': 0.319, 'comp... \n", + "96 {'neg': 0.0, 'neu': 0.659, 'pos': 0.341, 'comp... \n", + "97 {'neg': 0.0, 'neu': 0.744, 'pos': 0.256, 'comp... \n", + "98 {'neg': 0.0, 'neu': 0.823, 'pos': 0.177, 'comp... \n", + "99 {'neg': 0.152, 'neu': 0.674, 'pos': 0.174, 'co... \n", + "\n", + "[100 rows x 2 columns]" ] + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" } - ] + ], + "source": [ + "sid = SentimentIntensityAnalyzer()\n", + "\n", + "\n", + "listy = []\n", + "\n", + "for index, row in data.iterrows():\n", + " ss = sid.polarity_scores(row[\"Tweets\"])\n", + " listy.append(ss)\n", + " \n", + "se = pd.Series(listy)\n", + "data['polarity'] = se.values\n", + "\n", + "display(data.head(100))" + ] + } + ], + "metadata": { + "colab": { + "name": "Untitled29.ipynb", + "provenance": [], + "version": "0.3.2" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 1 }