"
- ],
- "text/plain": [
- " Unnamed: 0 title \\\n",
- "0 8476 You Can Smell Hillary’s Fear \n",
- "1 10294 Watch The Exact Moment Paul Ryan Committed Pol... \n",
- "2 3608 Kerry to go to Paris in gesture of sympathy \n",
- "3 10142 Bernie supporters on Twitter erupt in anger ag... \n",
- "4 875 The Battle of New York: Why This Primary Matters \n",
- "5 6903 Tehran, USA \n",
- "6 7341 Girl Horrified At What She Watches Boyfriend D... \n",
- "7 95 ‘Britain’s Schindler’ Dies at 106 \n",
- "8 4869 Fact check: Trump and Clinton at the 'commande... \n",
- "9 2909 Iran reportedly makes new push for uranium con... \n",
- "\n",
- " text label \n",
- "0 Daniel Greenfield, a Shillman Journalism Fello... FAKE \n",
- "1 Google Pinterest Digg Linkedin Reddit Stumbleu... FAKE \n",
- "2 U.S. Secretary of State John F. Kerry said Mon... REAL \n",
- "3 — Kaydee King (@KaydeeKing) November 9, 2016 T... FAKE \n",
- "4 It's primary day in New York and front-runners... REAL \n",
- "5 \\nI’m not an immigrant, but my grandparents ... FAKE \n",
- "6 Share This Baylee Luciani (left), Screenshot o... FAKE \n",
- "7 A Czech stockbroker who saved more than 650 Je... REAL \n",
- "8 Hillary Clinton and Donald Trump made some ina... REAL \n",
- "9 Iranian negotiators reportedly have made a las... REAL "
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
]
- },
- "execution_count": 55,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "#Reading the data\n",
- "df=pd.read_csv('/home/femme_js/Hoaxify/news.csv')\n",
- "\n",
- "df.head(10)\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 56,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " Unnamed: 0 title text label\n",
- "0 False False False False\n",
- "1 False False False False\n",
- "2 False False False False\n",
- "3 False False False False\n",
- "4 False False False False\n",
- "... ... ... ... ...\n",
- "6330 False False False False\n",
- "6331 False False False False\n",
- "6332 False False False False\n",
- "6333 False False False False\n",
- "6334 False False False False\n",
- "\n",
- "[6335 rows x 4 columns]\n"
- ]
- }
- ],
- "source": [
- "# checking if column have nan values\n",
- "\n",
- "check_nan_in_df = df.isnull()\n",
- "print (check_nan_in_df)\n",
- "\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 57,
- "metadata": {},
- "outputs": [],
- "source": [
- "# as data dont have any NaN value, we dont need to fill them"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 58,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "0 FAKE\n",
- "1 FAKE\n",
- "2 REAL\n",
- "3 FAKE\n",
- "4 REAL\n",
- "Name: label, dtype: object"
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "MdAVzqfOwGmS"
+ },
+ "source": [
+ "#INCLUDE LIBRARIES\n",
+ "\n",
+ "\n",
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import re\n",
+ "import itertools\n",
+ "import nltk\n",
+ "from nltk.corpus import stopwords\n",
+ "from nltk.stem import WordNetLemmatizer\n",
+ "from sklearn.model_selection import train_test_split\n",
+ "from sklearn.feature_extraction.text import TfidfVectorizer\n",
+ "import matplotlib.pyplot as plt\n",
+ "\n",
+ "\n",
+ "from nltk import sent_tokenize, word_tokenize\n",
+ "\n"
+ ],
+ "execution_count": 2,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "nnRJ1ZhtwGma",
+ "outputId": "7455aa5e-39f4-4143-e8d7-795b3a586630"
+ },
+ "source": [
+ "from nltk.tokenize import word_tokenize\n",
+ "text = \"Hello everyone. You are reading NLP article.\"\n",
+ "word_tokenize(text)"
+ ],
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "['Hello', 'everyone', '.', 'You', 'are', 'reading', 'NLP', 'article', '.']"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 54
+ }
]
- },
- "execution_count": 58,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "#Getting the Labels\n",
- "\n",
- "labels=df.label\n",
- "labels.head()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 59,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "
\n",
- "\n",
- "
\n",
- " \n",
- "
\n",
- "
\n",
- "
Unnamed: 0
\n",
- "
title
\n",
- "
text
\n",
- "
label
\n",
- "
total
\n",
- "
\n",
- " \n",
- " \n",
- "
\n",
- "
0
\n",
- "
8476
\n",
- "
You Can Smell Hillary’s Fear
\n",
- "
Daniel Greenfield, a Shillman Journalism Fello...
\n",
- "
FAKE
\n",
- "
You Can Smell Hillary’s Fear Daniel Greenfield...
\n",
- "
\n",
- "
\n",
- "
1
\n",
- "
10294
\n",
- "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
- "
Google Pinterest Digg Linkedin Reddit Stumbleu...
\n",
- "
FAKE
\n",
- "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
- "
\n",
- "
\n",
- "
2
\n",
- "
3608
\n",
- "
Kerry to go to Paris in gesture of sympathy
\n",
- "
U.S. Secretary of State John F. Kerry said Mon...
\n",
- "
REAL
\n",
- "
Kerry to go to Paris in gesture of sympathy U....
\n",
- "
\n",
- "
\n",
- "
3
\n",
- "
10142
\n",
- "
Bernie supporters on Twitter erupt in anger ag...
\n",
- "
— Kaydee King (@KaydeeKing) November 9, 2016 T...
\n",
- "
FAKE
\n",
- "
Bernie supporters on Twitter erupt in anger ag...
\n",
- "
\n",
- "
\n",
- "
4
\n",
- "
875
\n",
- "
The Battle of New York: Why This Primary Matters
\n",
- "
It's primary day in New York and front-runners...
\n",
- "
REAL
\n",
- "
The Battle of New York: Why This Primary Matte...
\n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " Unnamed: 0 title \\\n",
- "0 8476 You Can Smell Hillary’s Fear \n",
- "1 10294 Watch The Exact Moment Paul Ryan Committed Pol... \n",
- "2 3608 Kerry to go to Paris in gesture of sympathy \n",
- "3 10142 Bernie supporters on Twitter erupt in anger ag... \n",
- "4 875 The Battle of New York: Why This Primary Matters \n",
- "\n",
- " text label \\\n",
- "0 Daniel Greenfield, a Shillman Journalism Fello... FAKE \n",
- "1 Google Pinterest Digg Linkedin Reddit Stumbleu... FAKE \n",
- "2 U.S. Secretary of State John F. Kerry said Mon... REAL \n",
- "3 — Kaydee King (@KaydeeKing) November 9, 2016 T... FAKE \n",
- "4 It's primary day in New York and front-runners... REAL \n",
- "\n",
- " total \n",
- "0 You Can Smell Hillary’s Fear Daniel Greenfield... \n",
- "1 Watch The Exact Moment Paul Ryan Committed Pol... \n",
- "2 Kerry to go to Paris in gesture of sympathy U.... \n",
- "3 Bernie supporters on Twitter erupt in anger ag... \n",
- "4 The Battle of New York: Why This Primary Matte... "
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "9fVJMZXJwGmb",
+ "outputId": "fc2748d4-7bf4-4ad1-95cc-e459a9a071bc"
+ },
+ "source": [
+ "#Reading the data\n",
+ "df=pd.read_csv('/home/femme_js/Hoaxify/news.csv')\n",
+ "\n",
+ "df.head(10)\n",
+ "\n"
+ ],
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
Unnamed: 0
\n",
+ "
title
\n",
+ "
text
\n",
+ "
label
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
0
\n",
+ "
8476
\n",
+ "
You Can Smell Hillary’s Fear
\n",
+ "
Daniel Greenfield, a Shillman Journalism Fello...
\n",
+ "
FAKE
\n",
+ "
\n",
+ "
\n",
+ "
1
\n",
+ "
10294
\n",
+ "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
+ "
Google Pinterest Digg Linkedin Reddit Stumbleu...
\n",
+ "
FAKE
\n",
+ "
\n",
+ "
\n",
+ "
2
\n",
+ "
3608
\n",
+ "
Kerry to go to Paris in gesture of sympathy
\n",
+ "
U.S. Secretary of State John F. Kerry said Mon...
\n",
+ "
REAL
\n",
+ "
\n",
+ "
\n",
+ "
3
\n",
+ "
10142
\n",
+ "
Bernie supporters on Twitter erupt in anger ag...
\n",
+ "
— Kaydee King (@KaydeeKing) November 9, 2016 T...
\n",
+ "
FAKE
\n",
+ "
\n",
+ "
\n",
+ "
4
\n",
+ "
875
\n",
+ "
The Battle of New York: Why This Primary Matters
\n",
+ "
It's primary day in New York and front-runners...
\n",
+ "
REAL
\n",
+ "
\n",
+ "
\n",
+ "
5
\n",
+ "
6903
\n",
+ "
Tehran, USA
\n",
+ "
\\nI’m not an immigrant, but my grandparents ...
\n",
+ "
FAKE
\n",
+ "
\n",
+ "
\n",
+ "
6
\n",
+ "
7341
\n",
+ "
Girl Horrified At What She Watches Boyfriend D...
\n",
+ "
Share This Baylee Luciani (left), Screenshot o...
\n",
+ "
FAKE
\n",
+ "
\n",
+ "
\n",
+ "
7
\n",
+ "
95
\n",
+ "
‘Britain’s Schindler’ Dies at 106
\n",
+ "
A Czech stockbroker who saved more than 650 Je...
\n",
+ "
REAL
\n",
+ "
\n",
+ "
\n",
+ "
8
\n",
+ "
4869
\n",
+ "
Fact check: Trump and Clinton at the 'commande...
\n",
+ "
Hillary Clinton and Donald Trump made some ina...
\n",
+ "
REAL
\n",
+ "
\n",
+ "
\n",
+ "
9
\n",
+ "
2909
\n",
+ "
Iran reportedly makes new push for uranium con...
\n",
+ "
Iranian negotiators reportedly have made a las...
\n",
+ "
REAL
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Unnamed: 0 title \\\n",
+ "0 8476 You Can Smell Hillary’s Fear \n",
+ "1 10294 Watch The Exact Moment Paul Ryan Committed Pol... \n",
+ "2 3608 Kerry to go to Paris in gesture of sympathy \n",
+ "3 10142 Bernie supporters on Twitter erupt in anger ag... \n",
+ "4 875 The Battle of New York: Why This Primary Matters \n",
+ "5 6903 Tehran, USA \n",
+ "6 7341 Girl Horrified At What She Watches Boyfriend D... \n",
+ "7 95 ‘Britain’s Schindler’ Dies at 106 \n",
+ "8 4869 Fact check: Trump and Clinton at the 'commande... \n",
+ "9 2909 Iran reportedly makes new push for uranium con... \n",
+ "\n",
+ " text label \n",
+ "0 Daniel Greenfield, a Shillman Journalism Fello... FAKE \n",
+ "1 Google Pinterest Digg Linkedin Reddit Stumbleu... FAKE \n",
+ "2 U.S. Secretary of State John F. Kerry said Mon... REAL \n",
+ "3 — Kaydee King (@KaydeeKing) November 9, 2016 T... FAKE \n",
+ "4 It's primary day in New York and front-runners... REAL \n",
+ "5 \\nI’m not an immigrant, but my grandparents ... FAKE \n",
+ "6 Share This Baylee Luciani (left), Screenshot o... FAKE \n",
+ "7 A Czech stockbroker who saved more than 650 Je... REAL \n",
+ "8 Hillary Clinton and Donald Trump made some ina... REAL \n",
+ "9 Iranian negotiators reportedly have made a las... REAL "
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 55
+ }
]
- },
- "execution_count": 59,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "# Combining important features into a single feature\n",
- "\n",
- "df['total'] = df['title'] + ' ' + df['text']\n",
- "\n",
- "df.head()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 60,
- "metadata": {},
- "outputs": [],
- "source": [
- "#PRE-PROCESSING THE DATA\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 62,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "
\n",
- "\n",
- "
\n",
- " \n",
- "
\n",
- "
\n",
- "
Unnamed: 0
\n",
- "
title
\n",
- "
text
\n",
- "
label
\n",
- "
total
\n",
- "
\n",
- " \n",
- " \n",
- "
\n",
- "
0
\n",
- "
8476
\n",
- "
You Can Smell Hillary’s Fear
\n",
- "
Daniel Greenfield, a Shillman Journalism Fello...
\n",
- "
FAKE
\n",
- "
smell hillary fear daniel greenfield shillman...
\n",
- "
\n",
- "
\n",
- "
1
\n",
- "
10294
\n",
- "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
- "
Google Pinterest Digg Linkedin Reddit Stumbleu...
\n",
- "
FAKE
\n",
- "
watch exact moment paul ryan committed politi...
\n",
- "
\n",
- "
\n",
- "
2
\n",
- "
3608
\n",
- "
Kerry to go to Paris in gesture of sympathy
\n",
- "
U.S. Secretary of State John F. Kerry said Mon...
\n",
- "
REAL
\n",
- "
kerry go paris gesture sympathy u secretary s...
\n",
- "
\n",
- "
\n",
- "
3
\n",
- "
10142
\n",
- "
Bernie supporters on Twitter erupt in anger ag...
\n",
- "
— Kaydee King (@KaydeeKing) November 9, 2016 T...
\n",
- "
FAKE
\n",
- "
bernie supporter twitter erupt anger dnc trie...
\n",
- "
\n",
- "
\n",
- "
4
\n",
- "
875
\n",
- "
The Battle of New York: Why This Primary Matters
\n",
- "
It's primary day in New York and front-runners...
\n",
- "
REAL
\n",
- "
battle new york primary matter primary day ne...
\n",
- "
\n",
- " \n",
- "
\n",
- "
"
- ],
- "text/plain": [
- " Unnamed: 0 title \\\n",
- "0 8476 You Can Smell Hillary’s Fear \n",
- "1 10294 Watch The Exact Moment Paul Ryan Committed Pol... \n",
- "2 3608 Kerry to go to Paris in gesture of sympathy \n",
- "3 10142 Bernie supporters on Twitter erupt in anger ag... \n",
- "4 875 The Battle of New York: Why This Primary Matters \n",
- "\n",
- " text label \\\n",
- "0 Daniel Greenfield, a Shillman Journalism Fello... FAKE \n",
- "1 Google Pinterest Digg Linkedin Reddit Stumbleu... FAKE \n",
- "2 U.S. Secretary of State John F. Kerry said Mon... REAL \n",
- "3 — Kaydee King (@KaydeeKing) November 9, 2016 T... FAKE \n",
- "4 It's primary day in New York and front-runners... REAL \n",
- "\n",
- " total \n",
- "0 smell hillary fear daniel greenfield shillman... \n",
- "1 watch exact moment paul ryan committed politi... \n",
- "2 kerry go paris gesture sympathy u secretary s... \n",
- "3 bernie supporter twitter erupt anger dnc trie... \n",
- "4 battle new york primary matter primary day ne... "
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "kjysD29EwGmb",
+ "outputId": "eb6a9053-fe24-479f-b6cb-022e63dc75d8"
+ },
+ "source": [
+ "# checking if column have nan values\n",
+ "\n",
+ "check_nan_in_df = df.isnull()\n",
+ "print (check_nan_in_df)\n",
+ "\n",
+ "\n"
+ ],
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "text": [
+ " Unnamed: 0 title text label\n",
+ "0 False False False False\n",
+ "1 False False False False\n",
+ "2 False False False False\n",
+ "3 False False False False\n",
+ "4 False False False False\n",
+ "... ... ... ... ...\n",
+ "6330 False False False False\n",
+ "6331 False False False False\n",
+ "6332 False False False False\n",
+ "6333 False False False False\n",
+ "6334 False False False False\n",
+ "\n",
+ "[6335 rows x 4 columns]\n"
+ ],
+ "name": "stdout"
+ }
]
- },
- "execution_count": 62,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "\n",
- "stop_words = stopwords.words('english')\n",
- "\n",
- "lemmatizer = WordNetLemmatizer()\n",
- "\n",
- "for index, row in df.iterrows():\n",
- " filter_sentence = ''\n",
- " sentence = row['total']\n",
- " # Cleaning the sentence with regex\n",
- " sentence = re.sub(r'[^\\w\\s]', '', sentence)\n",
- " # Tokenization\n",
- " words = nltk.word_tokenize(sentence)\n",
- " # Stopwords removal\n",
- " words = [w for w in words if not w in stop_words]\n",
- " # Lemmatization\n",
- " for words in words:\n",
- " filter_sentence = filter_sentence + ' ' + str(lemmatizer.lemmatize(words)).lower()\n",
- " \n",
- " df.loc[index, 'total'] = filter_sentence\n",
- "\n",
- "df.head()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 63,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "0 smell hillary fear daniel greenfield shillman...\n",
- "1 watch exact moment paul ryan committed politi...\n",
- "2 kerry go paris gesture sympathy u secretary s...\n",
- "3 bernie supporter twitter erupt anger dnc trie...\n",
- "4 battle new york primary matter primary day ne...\n",
- "Name: total, dtype: object"
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "1ky9amFFwGmc"
+ },
+ "source": [
+ "# as data dont have any NaN value, we dont need to fill them"
+ ],
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "tsfWPHDAwGmc",
+ "outputId": "1081082b-ce15-4643-c9db-1e6278f237e5"
+ },
+ "source": [
+ "#Getting the Labels\n",
+ "\n",
+ "labels=df.label\n",
+ "labels.head()"
+ ],
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "0 FAKE\n",
+ "1 FAKE\n",
+ "2 REAL\n",
+ "3 FAKE\n",
+ "4 REAL\n",
+ "Name: label, dtype: object"
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 58
+ }
]
- },
- "execution_count": 63,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "df['total'].head()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 64,
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "\n"
- ]
- }
- ],
- "source": [
- "print(type(df['label']))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 65,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- ""
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "-X_9viQzwGmd",
+ "outputId": "51e712a5-4bcb-4420-b28f-29bde46708be"
+ },
+ "source": [
+ "# Combining important features into a single feature\n",
+ "\n",
+ "df['total'] = df['title'] + ' ' + df['text']\n",
+ "\n",
+ "df.head()"
+ ],
+ "execution_count": null,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
Unnamed: 0
\n",
+ "
title
\n",
+ "
text
\n",
+ "
label
\n",
+ "
total
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
0
\n",
+ "
8476
\n",
+ "
You Can Smell Hillary’s Fear
\n",
+ "
Daniel Greenfield, a Shillman Journalism Fello...
\n",
+ "
FAKE
\n",
+ "
You Can Smell Hillary’s Fear Daniel Greenfield...
\n",
+ "
\n",
+ "
\n",
+ "
1
\n",
+ "
10294
\n",
+ "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
+ "
Google Pinterest Digg Linkedin Reddit Stumbleu...
\n",
+ "
FAKE
\n",
+ "
Watch The Exact Moment Paul Ryan Committed Pol...
\n",
+ "
\n",
+ "
\n",
+ "
2
\n",
+ "
3608
\n",
+ "
Kerry to go to Paris in gesture of sympathy
\n",
+ "
U.S. Secretary of State John F. Kerry said Mon...
\n",
+ "
REAL
\n",
+ "
Kerry to go to Paris in gesture of sympathy U....
\n",
+ "
\n",
+ "
\n",
+ "
3
\n",
+ "
10142
\n",
+ "
Bernie supporters on Twitter erupt in anger ag...
\n",
+ "
— Kaydee King (@KaydeeKing) November 9, 2016 T...
\n",
+ "
FAKE
\n",
+ "
Bernie supporters on Twitter erupt in anger ag...
\n",
+ "
\n",
+ "
\n",
+ "
4
\n",
+ "
875
\n",
+ "
The Battle of New York: Why This Primary Matters
\n",
+ "
It's primary day in New York and front-runners...
\n",
+ "
REAL
\n",
+ "
The Battle of New York: Why This Primary Matte...
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Unnamed: 0 title \\\n",
+ "0 8476 You Can Smell Hillary’s Fear \n",
+ "1 10294 Watch The Exact Moment Paul Ryan Committed Pol... \n",
+ "2 3608 Kerry to go to Paris in gesture of sympathy \n",
+ "3 10142 Bernie supporters on Twitter erupt in anger ag... \n",
+ "4 875 The Battle of New York: Why This Primary Matters \n",
+ "\n",
+ " text label \\\n",
+ "0 Daniel Greenfield, a Shillman Journalism Fello... FAKE \n",
+ "1 Google Pinterest Digg Linkedin Reddit Stumbleu... FAKE \n",
+ "2 U.S. Secretary of State John F. Kerry said Mon... REAL \n",
+ "3 — Kaydee King (@KaydeeKing) November 9, 2016 T... FAKE \n",
+ "4 It's primary day in New York and front-runners... REAL \n",
+ "\n",
+ " total \n",
+ "0 You Can Smell Hillary’s Fear Daniel Greenfield... \n",
+ "1 Watch The Exact Moment Paul Ryan Committed Pol... \n",
+ "2 Kerry to go to Paris in gesture of sympathy U.... \n",
+ "3 Bernie supporters on Twitter erupt in anger ag... \n",
+ "4 The Battle of New York: Why This Primary Matte... "
+ ]
+ },
+ "metadata": {
+ "tags": []
+ },
+ "execution_count": 59
+ }
]
- },
- "execution_count": 65,
- "metadata": {},
- "output_type": "execute_result"
},
{
- "data": {
- "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEICAYAAACzliQjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAQ5klEQVR4nO3df6zddX3H8efLAk5RB467hrXFFq1ZcJtAGmRjyVAmFExW0E3pMu0YW01WEs38B40JTiXRZMrioiw4OotzYjc1VNcNK8OpyxQKQ6Qwxh0/RpsC1SLqiGzge3+cT/VQ76+2t+fg/Twfycn9ft/fz/d73t/k9nW//ZzvOSdVhSSpD88adwOSpNEx9CWpI4a+JHXE0Jekjhj6ktQRQ1+SOnLEuBuYyXHHHVfLly8fdxuS9FPllltu+VZVTUy17Rkd+suXL2f79u3jbkOSfqokeWC6bU7vSFJHDH1J6oihL0kdMfQlqSOGviR1xNCXpI4Y+pLUEUNfkjryjH5z1k+L5Zf+w7hbWFDuf99rxt2CtGAZ+tIC50XJ/FkIFyRO70hSRwx9SeqIoS9JHTH0Jakjh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