Sanjiv R. Das
Reading references
%pylab inline
import pandas as pd
import os
from ipypublish import nb_setup
%load_ext rpy2.ipython
Populating the interactive namespace from numpy and matplotlib
#Load if needed on Windows
# !curl -O "https://raw.githubusercontent.com/vitorcurtis/RWinOut/master/RWinOut.py"
# %load_ext RWinOut
In Finance, for example, text has become a major source of trading information, leading to a new field known as News Metrics.
News analysis is defined as “the measurement of the various qualitative and quantitative attributes of textual news stories. Some of these attributes are: sentiment, relevance, and novelty. Expressing news stories as numbers permits the manipulation of everyday information in a mathematical and statistical way.” (Wikipedia). In this chapter, I provide a framework for text analytics techniques that are in widespread use. I will discuss various text analytic methods and software, and then provide a set of metrics that may be used to assess the performance of analytics. Various directions for this field are discussed through the exposition. The techniques herein can aid in the valuation and trading of securities, facilitate investment decision making, meet regulatory requirements, provide marketing insights, or manage risk.
“News analytics are used in financial modeling, particularly in quantitative and algorithmic trading. Further, news analytics can be used to plot and characterize firm behaviors over time and thus yield important strategic insights about rival firms. News analytics are usually derived through automated text analysis and applied to digital texts using elements from natural language processing and machine learning such as latent semantic analysis, support vector machines, `bag of words’, among other techniques.” (Wikipedia)
There are many reasons why text has business value. But this is a narrow view. Textual data provides a means of understanding all human behavior through a data-driven, analytical approach. Let’s enumerate some reasons for this.
In a talk at the 17th ACM Conference on Information Knowledge and Management (CIKM ’08), Google’s director of research Peter Norvig stated his unequivocal preference for data over algorithms—“data is more agile than code.” Yet, it is well-understood that too much data can lead to overfitting so that an algorithm becomes mostly useless out-of-sample.
Chris Anderson: “Data is the New Theory.”
nb_setup.images_hconcat(["DSTMAA_images/algo_complexity.jpg"], width=400)
Das, Martinez-Jerez, and Tufano (FM 2005)
nb_setup.images_hconcat(["DSTMAA_images/news_cycle.png"], width=600)
nb_setup.images_hconcat(["DSTMAA_images/breakdown_newsflow.png"], width=600)
nb_setup.images_hconcat(["DSTMAA_images/freq_postings.png"], width=600)
nb_setup.images_hconcat(["DSTMAA_images/weekly_posting.png"], width=600)
nb_setup.images_hconcat(["DSTMAA_images/intraday_posting.png"], width=600)
nb_setup.images_hconcat(["DSTMAA_images/characters_posting.png"], width=600)
text = "We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America."
#How many characters including blanks?
len(text)
327
#Tokenize the words, separating by spaces, periods, commas
x = text.split(" ")
print(x)
['We', 'the', 'People', 'of', 'the', 'United', 'States,', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union,', 'establish', 'Justice,', 'insure', 'domestic', 'Tranquility,', 'provide', 'for', 'the', 'common', 'defence,', 'promote', 'the', 'general', 'Welfare,', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity,', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America.']
#How many words?
len(x)
52
But this returns words with commas and periods included, which is not desired. So what we need is the regular expressions package, i.e., re.
import re
x = re.split('[ ,.]',text)
print(x)
['We', 'the', 'People', 'of', 'the', 'United', 'States', '', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union', '', 'establish', 'Justice', '', 'insure', 'domestic', 'Tranquility', '', 'provide', 'for', 'the', 'common', 'defence', '', 'promote', 'the', 'general', 'Welfare', '', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity', '', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America', '']
#Use a list comprehension to remove spaces
x = [j for j in x if len(j)>0]
print(x)
['We', 'the', 'People', 'of', 'the', 'United', 'States', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union', 'establish', 'Justice', 'insure', 'domestic', 'Tranquility', 'provide', 'for', 'the', 'common', 'defence', 'promote', 'the', 'general', 'Welfare', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America']
len(x)
52
#Unique words
y = [j.lower() for j in x]
z = unique(y)
print(z)
['a' 'america' 'and' 'blessings' 'common' 'constitution' 'defence' 'do' 'domestic' 'establish' 'for' 'form' 'general' 'in' 'insure' 'justice' 'liberty' 'more' 'of' 'ordain' 'order' 'our' 'ourselves' 'people' 'perfect' 'posterity' 'promote' 'provide' 'secure' 'states' 'the' 'this' 'to' 'tranquility' 'union' 'united' 'we' 'welfare']
len(z)
38
#Find words greater than 3 characters
[j for j in x if len(j)>3]
['People', 'United', 'States', 'Order', 'form', 'more', 'perfect', 'Union', 'establish', 'Justice', 'insure', 'domestic', 'Tranquility', 'provide', 'common', 'defence', 'promote', 'general', 'Welfare', 'secure', 'Blessings', 'Liberty', 'ourselves', 'Posterity', 'ordain', 'establish', 'this', 'Constitution', 'United', 'States', 'America']
#Find capitalized words
[j for j in x if j.istitle()]
['We', 'People', 'United', 'States', 'Order', 'Union', 'Justice', 'Tranquility', 'Welfare', 'Blessings', 'Liberty', 'Posterity', 'Constitution', 'United', 'States', 'America']
#Find words that begin with c
[j for j in x if j.startswith('c')]
['common']
#Find words that end in t
[j for j in x if j.endswith('t')]
['perfect']
#Find words that contain a
[j for j in x if "a" in set(j.lower())]
['States', 'a', 'establish', 'Tranquility', 'general', 'Welfare', 'and', 'and', 'ordain', 'and', 'establish', 'States', 'America']
Or, use regular expressions to help us with more complex parsing.
For example '@[A-Za-z0-9_]+'
will return all words that:
'@'
and are followed by at least one: 'A-Z'
)'a-z'
) '0-9'
)'_'
)#Find words that contain 'a' using RE
[j for j in x if re.search('[Aa]',j)]
['States', 'a', 'establish', 'Tranquility', 'general', 'Welfare', 'and', 'and', 'ordain', 'and', 'establish', 'States', 'America']
#Test type of tokens
print(x)
[j for j in x if j.islower()]
['We', 'the', 'People', 'of', 'the', 'United', 'States', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union', 'establish', 'Justice', 'insure', 'domestic', 'Tranquility', 'provide', 'for', 'the', 'common', 'defence', 'promote', 'the', 'general', 'Welfare', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America']
['the', 'of', 'the', 'in', 'to', 'form', 'a', 'more', 'perfect', 'establish', 'insure', 'domestic', 'provide', 'for', 'the', 'common', 'defence', 'promote', 'the', 'general', 'and', 'secure', 'the', 'of', 'to', 'ourselves', 'and', 'our', 'do', 'ordain', 'and', 'establish', 'this', 'for', 'the', 'of']
print(x)
[j for j in x if j.isdigit()]
['We', 'the', 'People', 'of', 'the', 'United', 'States', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union', 'establish', 'Justice', 'insure', 'domestic', 'Tranquility', 'provide', 'for', 'the', 'common', 'defence', 'promote', 'the', 'general', 'Welfare', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America']
[]
[j for j in x if j.isalnum()]
['We', 'the', 'People', 'of', 'the', 'United', 'States', 'in', 'Order', 'to', 'form', 'a', 'more', 'perfect', 'Union', 'establish', 'Justice', 'insure', 'domestic', 'Tranquility', 'provide', 'for', 'the', 'common', 'defence', 'promote', 'the', 'general', 'Welfare', 'and', 'secure', 'the', 'Blessings', 'of', 'Liberty', 'to', 'ourselves', 'and', 'our', 'Posterity', 'do', 'ordain', 'and', 'establish', 'this', 'Constitution', 'for', 'the', 'United', 'States', 'of', 'America']
y = ' To be or not to be. '
print(y.strip())
print(y.rstrip())
print(y.lstrip())
print(y.lower())
print(y.upper())
To be or not to be. To be or not to be. To be or not to be. to be or not to be. TO BE OR NOT TO BE.
#Return the starting position of the string
print(y.find('be'))
print(y.rfind('be'))
5 18
print(y.replace('be','do'))
To do or not to do.
y = 'Supercalifragilisticexpialidocious'
ytok = y.split('i')
print(ytok)
['Supercal', 'frag', 'l', 'st', 'cexp', 'al', 'doc', 'ous']
print('i'.join(ytok))
print(list(y))
Supercalifragilisticexpialidocious ['S', 'u', 'p', 'e', 'r', 'c', 'a', 'l', 'i', 'f', 'r', 'a', 'g', 'i', 'l', 'i', 's', 't', 'i', 'c', 'e', 'x', 'p', 'i', 'a', 'l', 'i', 'd', 'o', 'c', 'i', 'o', 'u', 's']
## Reading in a URL
import requests
url = 'http://srdas.github.io/bio-candid.html'
f = requests.get(url)
text = f.text
print(text)
f.close()
<HTML> <BODY background="http://algo.scu.edu/~sanjivdas/graphics/back2.gif"> Sanjiv Das is the William and Janice Terry Professor of Finance and Data Science at Santa Clara University's Leavey School of Business. He previously held faculty appointments as Professor at Harvard Business School and UC Berkeley. He holds post-graduate degrees in Finance (M.Phil and Ph.D. from New York University), Computer Science (M.S. from UC Berkeley), an MBA from the Indian Institute of Management, Ahmedabad, B.Com in Accounting and Economics (University of Bombay, Sydenham College), and is also a qualified Cost and Works Accountant (AICWA). He is a senior editor of The Journal of Investment Management, Associate Editor of Management Science and other academic journals, and is on the Advisory Board of the Journal of Financial Data Science. Prior to being an academic, he worked in the derivatives business in the Asia-Pacific region as a Vice-President at Citibank. His current research interests include: portfolio theory and wealth management ,machine learning, financial networks, derivatives pricing models, the modeling of default risk, systemic risk, and venture capital. He has published over a hundred articles in academic journals, and has won numerous awards for research and teaching. His recent book "Derivatives: Principles and Practice" was published in May 2010 (second edition 2016). <p> <B>Sanjiv Das: A Short Academic Life History</B> <p> After loafing and working in many parts of Asia, but never really growing up, Sanjiv moved to New York to change the world, hopefully through research. He graduated in 1994 with a Ph.D. from NYU, and since then spent five years in Boston, and now lives in San Jose, California. Sanjiv loves animals, places in the world where the mountains meet the sea, riding sport motorbikes, reading, gadgets, science fiction movies, and writing cool software code. When there is time available from the excitement of daily life, Sanjiv writes academic papers, which helps him relax. Always the contrarian, Sanjiv thinks that New York City is the most calming place in the world, after California of course. <p> Sanjiv is now a Professor of Finance at Santa Clara University. He came to SCU from Harvard Business School and spent a year at UC Berkeley. In his past life in the unreal world, Sanjiv worked at Citibank, N.A. in the Asia-Pacific region. He takes great pleasure in merging his many previous lives into his current existence, which is incredibly confused and diverse. <p> Sanjiv's research style is instilled with a distinct "New York state of mind" - it is chaotic, diverse, with minimal method to the madness. He has published articles on derivatives, term-structure models, mutual funds, the internet, portfolio choice, banking models, credit risk, and has unpublished articles in many other areas. Some years ago, he took time off to get another degree in computer science at Berkeley, confirming that an unchecked hobby can quickly become an obsession. There he learnt about the fascinating field of Randomized Algorithms, skills he now applies earnestly to his editorial work, and other pursuits, many of which stem from being in the epicenter of Silicon Valley. <p> Coastal living did a lot to mold Sanjiv, who needs to live near the ocean. The many walks in Greenwich village convinced him that there is no such thing as a representative investor, yet added many unique features to his personal utility function. He learnt that it is important to open the academic door to the ivory tower and let the world in. Academia is a real challenge, given that he has to reconcile many more opinions than ideas. He has been known to have turned down many offers from Mad magazine to publish his academic work. As he often explains, you never really finish your education - "you can check out any time you like, but you can never leave." Which is why he is doomed to a lifetime in Hotel California. And he believes that, if this is as bad as it gets, life is really pretty good.
len(text)
4044
lines = text.splitlines()
print(len(lines))
print(lines[3])
75 Sanjiv Das is the William and Janice Terry Professor of Finance and
from bs4 import BeautifulSoup
sanjivbio = BeautifulSoup(text,'lxml').get_text()
print(sanjivbio)
Sanjiv Das is the William and Janice Terry Professor of Finance and Data Science at Santa Clara University's Leavey School of Business. He previously held faculty appointments as Professor at Harvard Business School and UC Berkeley. He holds post-graduate degrees in Finance (M.Phil and Ph.D. from New York University), Computer Science (M.S. from UC Berkeley), an MBA from the Indian Institute of Management, Ahmedabad, B.Com in Accounting and Economics (University of Bombay, Sydenham College), and is also a qualified Cost and Works Accountant (AICWA). He is a senior editor of The Journal of Investment Management, Associate Editor of Management Science and other academic journals, and is on the Advisory Board of the Journal of Financial Data Science. Prior to being an academic, he worked in the derivatives business in the Asia-Pacific region as a Vice-President at Citibank. His current research interests include: portfolio theory and wealth management ,machine learning, financial networks, derivatives pricing models, the modeling of default risk, systemic risk, and venture capital. He has published over a hundred articles in academic journals, and has won numerous awards for research and teaching. His recent book "Derivatives: Principles and Practice" was published in May 2010 (second edition 2016). Sanjiv Das: A Short Academic Life History After loafing and working in many parts of Asia, but never really growing up, Sanjiv moved to New York to change the world, hopefully through research. He graduated in 1994 with a Ph.D. from NYU, and since then spent five years in Boston, and now lives in San Jose, California. Sanjiv loves animals, places in the world where the mountains meet the sea, riding sport motorbikes, reading, gadgets, science fiction movies, and writing cool software code. When there is time available from the excitement of daily life, Sanjiv writes academic papers, which helps him relax. Always the contrarian, Sanjiv thinks that New York City is the most calming place in the world, after California of course. Sanjiv is now a Professor of Finance at Santa Clara University. He came to SCU from Harvard Business School and spent a year at UC Berkeley. In his past life in the unreal world, Sanjiv worked at Citibank, N.A. in the Asia-Pacific region. He takes great pleasure in merging his many previous lives into his current existence, which is incredibly confused and diverse. Sanjiv's research style is instilled with a distinct "New York state of mind" - it is chaotic, diverse, with minimal method to the madness. He has published articles on derivatives, term-structure models, mutual funds, the internet, portfolio choice, banking models, credit risk, and has unpublished articles in many other areas. Some years ago, he took time off to get another degree in computer science at Berkeley, confirming that an unchecked hobby can quickly become an obsession. There he learnt about the fascinating field of Randomized Algorithms, skills he now applies earnestly to his editorial work, and other pursuits, many of which stem from being in the epicenter of Silicon Valley. Coastal living did a lot to mold Sanjiv, who needs to live near the ocean. The many walks in Greenwich village convinced him that there is no such thing as a representative investor, yet added many unique features to his personal utility function. He learnt that it is important to open the academic door to the ivory tower and let the world in. Academia is a real challenge, given that he has to reconcile many more opinions than ideas. He has been known to have turned down many offers from Mad magazine to publish his academic work. As he often explains, you never really finish your education - "you can check out any time you like, but you can never leave." Which is why he is doomed to a lifetime in Hotel California. And he believes that, if this is as bad as it gets, life is really pretty good.
print(len(sanjivbio))
type(sanjivbio)
3947
str
Webster’s defines a “dictionary” as “…a reference source in print or electronic form containing words usually alphabetically arranged along with information about their forms, pronunciations, functions, etymologies, meanings, and syntactical and idiomatic uses.”
The Grammarly Handbook provides the folowing negation words (see https://www.grammarly.com/handbook/):
Text can be scored using dictionaries and word lists. Here is an example of mood scoring. We use a psychological dictionary from Harvard. There is also WordNet.
WordNet is a large database of words in English, i.e., a lexicon. The repository is at http://wordnet.princeton.edu. WordNet groups words together based on their meanings (synonyms) and hence may be used as a thesaurus. WordNet is also useful for natural language processing as it provides word lists by language category, such as noun, verb, adjective, etc.
## Read in a file
## Here we will read in an entire dictionary from Harvard Inquirer
f = open('DSTMAA_data/inqdict.txt')
HIDict = f.read()
HIDict = HIDict.splitlines()
HIDict[:20]
['Entryword Source Pos Neg Pstv Affil Ngtv Hostile Strng Power Weak Subm Actv Psv Pleasure Pain Arousal EMOT Feel Virtue Vice Ovrst Undrst Acad Doctr Econ* Exch ECON Exprs Legal Milit Polit* POLIT Relig Role COLL Work Ritual Intrel Race Kin* MALE Female Nonadlt HU ANI PLACE Social Region Route Aquatic Land Sky Object Tool Food Vehicle Bldgpt Natobj Bodypt Comnobj Comform COM Say Need Goal Try Means Ach Persist Complt Fail Natpro Begin Vary Change Incr Decr Finish Stay Rise Move Exert Fetch Travel Fall Think Know Causal Ought Percv Comp Eval EVAL Solve Abs* ABS Qual Quan NUMB ORD CARD FREQ DIST Time* TIME Space POS DIM Dimn Rel COLOR Self Our You Name Yes No Negate Intrj IAV DAV SV IPadj IndAdj POWGAIN POWLOSS POWENDS POWAREN POWCON POWCOOP POWAPT POWPT POWDOCT POWAUTH POWOTH POWTOT RCTETH RCTREL RCTGAIN RCTLOSS RCTENDS RCTTOT RSPGAIN RSPLOSS RSPOTH RSPTOT AFFGAIN AFFLOSS AFFPT AFFOTH AFFTOT WLTPT WLTTRAN WLTOTH WLTTOT WLBGAIN WLBLOSS WLBPHYS WLBPSYC WLBPT WLBTOT ENLGAIN ENLLOSS ENLENDS ENLPT ENLOTH ENLTOT SKLAS SKLPT SKLOTH SKLTOT TRNGAIN TRNLOSS TRANS MEANS ENDS ARENAS PARTIC NATIONS AUD ANOMIE NEGAFF POSAFF SURE IF NOT TIMESP FOOD FORM Othertags Definition ', 'A H4Lvd DET ART | article: Indefinite singular article--some or any one', 'ABANDON H4Lvd Neg Ngtv Weak Fail IAV AFFLOSS AFFTOT SUPV |', 'ABANDONMENT H4 Neg Weak Fail Noun |', 'ABATE H4Lvd Neg Psv Decr IAV TRANS SUPV |', 'ABATEMENT Lvd Noun ', 'ABDICATE H4 Neg Weak Subm Psv Finish IAV SUPV |', 'ABHOR H4 Neg Hostile Psv Arousal SV SUPV |', 'ABIDE H4 Pos Affil Actv Doctr IAV SUPV |', 'ABIDE#1 Lvd Modif ', 'ABIDE#2 Lvd SUPV ', 'ABILITY Lvd MEANS Noun ABS ABS* ', 'ABJECT H4 Neg Weak Subm Psv Vice IPadj Modif |', 'ABLE H4Lvd Pos Pstv Strng Virtue EVAL MEANS Modif | adjective: Having necessary power, skill, resources, etc.', 'ABNORMAL H4Lvd Neg Ngtv Vice NEGAFF Modif |', 'ABOARD H4Lvd Space PREP LY |', 'ABOLISH H4Lvd Neg Ngtv Hostile Strng Power Actv Intrel IAV POWOTH POWTOT SUPV |', 'ABOLITION Lvd TRANS Noun ', 'ABOMINABLE H4 Neg Strng Vice Ovrst Eval IndAdj Modif |', 'ABORTIVE Lvd POWOTH POWTOT Modif POLIT ']
#Extract all the lines that contain the Pos tag
HIDict = HIDict[1:]
print(HIDict[:5])
print(len(HIDict))
poswords = [j for j in HIDict if "Pos" in j] #using a list comprehension
poswords = [j.split()[0] for j in poswords]
poswords = [j.split("#")[0] for j in poswords]
poswords = unique(poswords)
poswords = [j.lower() for j in poswords]
print(poswords[:20])
print(len(poswords))
['A H4Lvd DET ART | article: Indefinite singular article--some or any one', 'ABANDON H4Lvd Neg Ngtv Weak Fail IAV AFFLOSS AFFTOT SUPV |', 'ABANDONMENT H4 Neg Weak Fail Noun |', 'ABATE H4Lvd Neg Psv Decr IAV TRANS SUPV |', 'ABATEMENT Lvd Noun '] 11895 ['abide', 'able', 'abound', 'absolve', 'absorbent', 'absorption', 'abundance', 'abundant', 'accede', 'accentuate', 'accept', 'acceptable', 'acceptance', 'accessible', 'accession', 'acclaim', 'acclamation', 'accolade', 'accommodate', 'accommodation'] 1646
#Extract all the lines that contain the Neg tag
negwords = [j for j in HIDict if "Neg" in j] #using a list comprehension
negwords = [j.split()[0] for j in negwords]
negwords = [j.split("#")[0] for j in negwords]
negwords = unique(negwords)
negwords = [j.lower() for j in negwords]
print(negwords[:20])
print(len(negwords))
['abandon', 'abandonment', 'abate', 'abdicate', 'abhor', 'abject', 'abnormal', 'abolish', 'abominable', 'abrasive', 'abrupt', 'abscond', 'absence', 'absent', 'absent-minded', 'absentee', 'absurd', 'absurdity', 'abuse', 'abyss'] 2120
#Pull clean lowercase version of bio as one long string
text = sanjivbio.replace('\n',' ').lower()
text
' sanjiv das is the william and janice terry professor of finance and data science at santa clara university\'s leavey school of business. he previously held faculty appointments as professor at harvard business school and uc berkeley. he holds post-graduate degrees in finance (m.phil and ph.d. from new york university), computer science (m.s. from uc berkeley), an mba from the indian institute of management, ahmedabad, b.com in accounting and economics (university of bombay, sydenham college), and is also a qualified cost and works accountant (aicwa). he is a senior editor of the journal of investment management, associate editor of management science and other academic journals, and is on the advisory board of the journal of financial data science. prior to being an academic, he worked in the derivatives business in the asia-pacific region as a vice-president at citibank. his current research interests include: portfolio theory and wealth management ,machine learning, financial networks, derivatives pricing models, the modeling of default risk, systemic risk, and venture capital. he has published over a hundred articles in academic journals, and has won numerous awards for research and teaching. his recent book "derivatives: principles and practice" was published in may 2010 (second edition 2016). sanjiv das: a short academic life history after loafing and working in many parts of asia, but never really growing up, sanjiv moved to new york to change the world, hopefully through research. he graduated in 1994 with a ph.d. from nyu, and since then spent five years in boston, and now lives in san jose, california. sanjiv loves animals, places in the world where the mountains meet the sea, riding sport motorbikes, reading, gadgets, science fiction movies, and writing cool software code. when there is time available from the excitement of daily life, sanjiv writes academic papers, which helps him relax. always the contrarian, sanjiv thinks that new york city is the most calming place in the world, after california of course. sanjiv is now a professor of finance at santa clara university. he came to scu from harvard business school and spent a year at uc berkeley. in his past life in the unreal world, sanjiv worked at citibank, n.a. in the asia-pacific region. he takes great pleasure in merging his many previous lives into his current existence, which is incredibly confused and diverse. sanjiv\'s research style is instilled with a distinct "new york state of mind" - it is chaotic, diverse, with minimal method to the madness. he has published articles on derivatives, term-structure models, mutual funds, the internet, portfolio choice, banking models, credit risk, and has unpublished articles in many other areas. some years ago, he took time off to get another degree in computer science at berkeley, confirming that an unchecked hobby can quickly become an obsession. there he learnt about the fascinating field of randomized algorithms, skills he now applies earnestly to his editorial work, and other pursuits, many of which stem from being in the epicenter of silicon valley. coastal living did a lot to mold sanjiv, who needs to live near the ocean. the many walks in greenwich village convinced him that there is no such thing as a representative investor, yet added many unique features to his personal utility function. he learnt that it is important to open the academic door to the ivory tower and let the world in. academia is a real challenge, given that he has to reconcile many more opinions than ideas. he has been known to have turned down many offers from mad magazine to publish his academic work. as he often explains, you never really finish your education - "you can check out any time you like, but you can never leave." which is why he is doomed to a lifetime in hotel california. and he believes that, if this is as bad as it gets, life is really pretty good. '
text = text.split(' ')
text
['', '', '', 'sanjiv', 'das', 'is', 'the', 'william', 'and', 'janice', 'terry', 'professor', 'of', 'finance', 'and', 'data', 'science', 'at', 'santa', 'clara', "university's", 'leavey', 'school', 'of', 'business.', 'he', 'previously', 'held', 'faculty', 'appointments', 'as', 'professor', 'at', 'harvard', 'business', 'school', 'and', 'uc', 'berkeley.', 'he', 'holds', 'post-graduate', 'degrees', 'in', 'finance', '(m.phil', 'and', 'ph.d.', 'from', 'new', 'york', 'university),', 'computer', 'science', '(m.s.', 'from', 'uc', 'berkeley),', 'an', 'mba', 'from', 'the', 'indian', 'institute', 'of', 'management,', 'ahmedabad,', 'b.com', 'in', 'accounting', 'and', 'economics', '(university', 'of', 'bombay,', 'sydenham', 'college),', 'and', 'is', 'also', 'a', 'qualified', 'cost', 'and', 'works', 'accountant', '(aicwa).', 'he', 'is', 'a', 'senior', 'editor', 'of', 'the', 'journal', 'of', 'investment', 'management,', 'associate', 'editor', 'of', 'management', 'science', 'and', 'other', 'academic', 'journals,', 'and', 'is', 'on', 'the', 'advisory', 'board', 'of', 'the', 'journal', 'of', 'financial', 'data', 'science.', 'prior', 'to', 'being', 'an', 'academic,', 'he', 'worked', 'in', 'the', 'derivatives', 'business', 'in', 'the', 'asia-pacific', 'region', 'as', 'a', 'vice-president', 'at', 'citibank.', 'his', 'current', 'research', 'interests', 'include:', 'portfolio', 'theory', 'and', 'wealth', 'management', ',machine', 'learning,', 'financial', 'networks,', 'derivatives', 'pricing', 'models,', 'the', 'modeling', 'of', 'default', 'risk,', 'systemic', 'risk,', 'and', 'venture', 'capital.', '', 'he', 'has', 'published', 'over', 'a', 'hundred', 'articles', 'in', 'academic', 'journals,', 'and', 'has', 'won', 'numerous', 'awards', 'for', 'research', 'and', 'teaching.', 'his', 'recent', 'book', '"derivatives:', 'principles', 'and', 'practice"', 'was', 'published', 'in', 'may', '2010', '(second', 'edition', '2016).', '', '', '', '', '', 'sanjiv', 'das:', 'a', 'short', 'academic', 'life', 'history', '', '', 'after', 'loafing', 'and', 'working', 'in', 'many', 'parts', 'of', 'asia,', 'but', 'never', 'really', 'growing', 'up,', 'sanjiv', 'moved', 'to', 'new', 'york', 'to', 'change', 'the', 'world,', 'hopefully', 'through', 'research.', '', 'he', 'graduated', 'in', '1994', 'with', 'a', 'ph.d.', 'from', 'nyu,', 'and', 'since', 'then', 'spent', 'five', 'years', 'in', 'boston,', 'and', 'now', 'lives', 'in', 'san', 'jose,', 'california.', '', 'sanjiv', 'loves', 'animals,', 'places', 'in', 'the', 'world', 'where', 'the', 'mountains', 'meet', 'the', 'sea,', 'riding', 'sport', 'motorbikes,', 'reading,', 'gadgets,', 'science', 'fiction', 'movies,', 'and', 'writing', 'cool', 'software', 'code.', 'when', 'there', 'is', 'time', 'available', 'from', 'the', 'excitement', 'of', 'daily', 'life,', 'sanjiv', 'writes', 'academic', 'papers,', 'which', 'helps', 'him', 'relax.', 'always', 'the', 'contrarian,', 'sanjiv', 'thinks', 'that', 'new', 'york', 'city', 'is', 'the', 'most', 'calming', 'place', 'in', 'the', 'world,', 'after', 'california', 'of', 'course.', '', '', '', 'sanjiv', 'is', 'now', 'a', 'professor', 'of', 'finance', 'at', 'santa', 'clara', 'university.', 'he', 'came', 'to', 'scu', 'from', 'harvard', 'business', 'school', 'and', 'spent', 'a', 'year', 'at', 'uc', 'berkeley.', 'in', 'his', 'past', 'life', 'in', 'the', 'unreal', 'world,', 'sanjiv', 'worked', 'at', 'citibank,', 'n.a.', 'in', 'the', 'asia-pacific', 'region.', 'he', 'takes', 'great', 'pleasure', 'in', 'merging', 'his', 'many', 'previous', 'lives', 'into', 'his', 'current', 'existence,', 'which', 'is', 'incredibly', 'confused', 'and', 'diverse.', '', '', '', "sanjiv's", 'research', 'style', 'is', 'instilled', 'with', 'a', 'distinct', '"new', 'york', 'state', 'of', 'mind"', '-', 'it', 'is', 'chaotic,', 'diverse,', 'with', 'minimal', 'method', 'to', 'the', 'madness.', 'he', 'has', 'published', 'articles', 'on', 'derivatives,', 'term-structure', 'models,', 'mutual', 'funds,', 'the', 'internet,', 'portfolio', 'choice,', 'banking', 'models,', 'credit', 'risk,', 'and', 'has', 'unpublished', 'articles', 'in', 'many', 'other', 'areas.', 'some', 'years', 'ago,', 'he', 'took', 'time', 'off', 'to', 'get', 'another', 'degree', 'in', 'computer', 'science', 'at', 'berkeley,', 'confirming', 'that', 'an', 'unchecked', 'hobby', 'can', 'quickly', 'become', 'an', 'obsession.', 'there', 'he', 'learnt', 'about', 'the', 'fascinating', 'field', 'of', 'randomized', 'algorithms,', 'skills', 'he', 'now', 'applies', 'earnestly', 'to', 'his', 'editorial', 'work,', 'and', 'other', 'pursuits,', 'many', 'of', 'which', 'stem', 'from', 'being', 'in', 'the', 'epicenter', 'of', 'silicon', 'valley.', '', '', '', 'coastal', 'living', 'did', 'a', 'lot', 'to', 'mold', 'sanjiv,', 'who', 'needs', 'to', 'live', 'near', 'the', 'ocean.', '', 'the', 'many', 'walks', 'in', 'greenwich', 'village', 'convinced', 'him', 'that', 'there', 'is', 'no', 'such', 'thing', 'as', 'a', 'representative', 'investor,', 'yet', 'added', 'many', 'unique', 'features', 'to', 'his', 'personal', 'utility', 'function.', 'he', 'learnt', 'that', 'it', 'is', 'important', 'to', 'open', 'the', 'academic', 'door', 'to', 'the', 'ivory', 'tower', 'and', 'let', 'the', 'world', 'in.', 'academia', 'is', 'a', 'real', 'challenge,', 'given', 'that', 'he', 'has', 'to', 'reconcile', 'many', 'more', 'opinions', 'than', 'ideas.', 'he', 'has', 'been', 'known', 'to', 'have', 'turned', 'down', 'many', 'offers', 'from', 'mad', 'magazine', 'to', 'publish', 'his', 'academic', 'work.', 'as', 'he', 'often', 'explains,', 'you', 'never', 'really', 'finish', 'your', 'education', '-', '"you', 'can', 'check', 'out', 'any', 'time', 'you', 'like,', 'but', 'you', 'can', 'never', 'leave."', 'which', 'is', 'why', 'he', 'is', 'doomed', 'to', 'a', 'lifetime', 'in', 'hotel', 'california.', 'and', 'he', 'believes', 'that,', 'if', 'this', 'is', 'as', 'bad', 'as', 'it', 'gets,', 'life', 'is', 'really', 'pretty', 'good.', '']
#Match text to poswords, negwords, use the set operators
posmatches = set(text).intersection(set(poswords))
print(posmatches)
print(len(posmatches))
negmatches = set(text).intersection(set(negwords))
print(negmatches)
print(len(negmatches))
{'important', 'associate', 'excitement', 'unique', 'distinct', 'reconcile', 'have', 'credit', 'live', 'pretty', 'mutual', 'open', 'real', 'education', 'pleasure', 'his', 'board', 'meet', 'great', 'your'} 20 {'short', 'never', 'unchecked', 'let', 'cool', 'unreal', 'get', 'cost', 'mad', 'bad', 'default', 'board', 'no'} 13
def finScore(url,poswords,negwords):
f = requests.get(url)
text = f.text
f.close()
text = BeautifulSoup(text,'lxml').get_text()
text = text.replace('\n',' ').lower()
text = text.split(' ')
posmatches = set(text).intersection(set(poswords))
print(posmatches)
print(len(posmatches))
negmatches = set(text).intersection(set(negwords))
print(negmatches)
print(len(negmatches))
#Try this on the same data as before
url = 'http://srdas.github.io/bio-candid.html'
finScore(url,poswords,negwords)
{'important', 'associate', 'excitement', 'unique', 'distinct', 'reconcile', 'have', 'credit', 'live', 'pretty', 'mutual', 'open', 'real', 'education', 'pleasure', 'his', 'board', 'meet', 'great', 'your'} 20 {'short', 'never', 'unchecked', 'let', 'cool', 'unreal', 'get', 'cost', 'mad', 'bad', 'default', 'board', 'no'} 13
#Let's get Apple's SEC filing 10K
# https://www.sec.gov/edgar/searchedgar/companysearch.html
# https://www.sec.gov/edgar/searchedgar/cik.htm
url = 'https://d18rn0p25nwr6d.cloudfront.net/CIK-0000320193/71ac2994-85af-426b-982a-8fcc71d6fe52.html' #(2018)
#url = 'http://d18rn0p25nwr6d.cloudfront.net/CIK-0000320193/bc9269c5-539b-4a69-9054-abe7849c4242.html' #(2017)
finScore(url,poswords,negwords)
{'comprehensive', 'allowance', 'return', 'assurance', 'satisfaction', 'gain', 'repair', 'effectiveness', 'principle', 'bonus', 'even', 'knowledge', 'appropriate', 'premium', 'content', 'mutual', 'legal', 'gift', 'forward', 'equity', 'intellectual', 'offset', 'compensation', 'aid', 'primarily', 'their', 'adjustment', 'good', 'common', 'contribution', 'best', 'hope', 'upgrade', 'contribute', 'hand', 'capacity', 'principal', 'support', 'arisen', 'reconciliation', 'redemption', 'unique', 'useful', 'right', 'objective', 'make', 'significant', 'qualify', 'kind', 'renewal', 'acceptable', 'consider', 'satisfy', 'validity', 'law', 'pay', 'profit', 'guarantee', 'availability', 'outstanding', 'particular', 'office', 'actual', 'sufficient', 'utilize', 'reasonable', 'adjust', 'credit', 'security', 'benefit', 'maturity', 'improvement', 'essential', 'meet', 'important', 'free', 'health', 'company', 'persuasive', 'advance', 'back', 'approach', 'achievement', 'necessarily', 'partnership', 'cooperative', 'provide', 'successful', 'board', 'value', 'major', 'respect', 'protection', 'appeal', 'effective', 'open', 'productive', 'basic', 'obtain', 'partner', 'asset', 'normal', 'exact', 'adequate', 'able', 'better', 'authority', 'share', 'compliance', 'utilization', 'merit', 'accordance', 'agreement', 'positive', 'appreciation', 'well', 'readily', 'protect', 'have', 'award', 'settle', 'call', 'education', 'commission', 'interest', 'fair', 'consideration', 'voluntary', 'reconcile', 'mature', 'approval', 'favorable', 'aggregate', 'resolved', 'relevant', 'justice'} 136 {'false', 'make', 'discount', 'liquidation', 'nor', 'disposal', 'cost', 'unfavorable', 'neither', 'unspecified', 'indirect', 'foreign', 'insufficient', 'against', 'lower', 'negative', 'loss', 'fail', 'shortage', 'withheld', 'differ', 'even', 'not', 'shell', 'least', 'lag', 'board', 'depreciation', 'show', 'limit', 'capital', 'decrease', 'particular', 'bankruptcy', 'tax', 'cannot', 'insignificant', 'short', 'invalid', 'unconditional', 'decline', 'hand', 'hedge', 'unable', 'intangible', 'liability', 'prohibitive', 'point', 'unemployment', 'service', 'excess', 'uncertain', 'ineffective', 'expense', 'no', 'expose'} 56
The results are different, depending on the source.
#Repeat with a different URL from the SEC
url = 'https://www.sec.gov/Archives/edgar/data/320193/000032019318000145/a10-k20189292018.htm'
#url = 'https://www.sec.gov/Archives/edgar/data/320193/000032019317000070/a10-k20179302017.htm'
finScore(url,poswords,negwords)
{'travel', 'healthy', 'comprehensive', 'allowance', 'return', 'assurance', 'meaningful', 'redeem', 'gain', 'repair', 'responsibility', 'effectiveness', 'principle', 'bonus', 'beneficial', 'even', 'knowledge', 'appropriate', 'premium', 'desirable', 'content', 'mutual', 'legal', 'gift', 'post', 'real', 'attract', 'forward', 'smart', 'equity', 'intellectual', 'offset', 'enhance', 'aid', 'compensation', 'primarily', 'sensitive', 'suitable', 'adjustment', 'their', 'conjunction', 'good', 'common', 'contribution', 'best', 'upgrade', 'capacity', 'principal', 'support', 'arisen', 'reconciliation', 'virtue', 'redemption', 'privacy', 'traditional', 'unique', 'useful', 'right', 'objective', 'make', 'significant', 'jointly', 'advantage', 'improve', 'renewal', 'solution', 'acceptable', 'superior', 'simplify', 'portable', 'consider', 'satisfy', 'validity', 'law', 'pay', 'clarify', 'profit', 'guarantee', 'availability', 'order', 'outstanding', 'sophisticated', 'particular', 'office', 'actual', 'generate', 'sufficient', 'competence', 'intelligent', 'devote', 'create', 'utilize', 'home', 'reasonable', 'adjust', 'trust', 'credit', 'unlimited', 'super', 'security', 'benefit', 'maturity', 'improvement', 'essential', 'assistance', 'meet', 'collaborate', 'important', 'free', 'health', 'company', 'integrity', 'quality', 'persuasive', 'innovative', 'advance', 'achievement', 'approach', 'confidence', 'necessarily', 'success', 'responsible', 'relief', 'natural', 'continuity', 'buy', 'provide', 'successful', 'community', 'board', 'major', 'value', 'respect', 'protection', 'safety', 'offer', 'communicate', 'appeal', 'permit', 'effective', 'educational', 'open', 'complement', 'basic', 'obtain', 'partner', 'asset', 'normal', 'independent', 'adequate', 'reliability', 'able', 'better', 'authority', 'share', 'experience', 'definitive', 'pro', 'compliance', 'resolve', 'merit', 'our', 'ensure', 'accordance', 'enable', 'agreement', 'stimulate', 'allow', 'safe', 'positive', 'reward', 'lead', 'my', 'appreciation', 'help', 'his', 'fitness', 'well', 'commitment', 'protect', 'indicative', 'have', 'sensitivity', 'award', 'contact', 'settle', 'attractive', 'achieve', 'secure', 'education', 'compatible', 'reliable', 'matter', 'commission', 'conclusive', 'interest', 'fair', 'reconcile', 'dynamic', 'approval', 'understand', 'favorable', 'behalf', 'relevant', 'her', 'justice', 'sound', 'aggregate', 'resolved'} 209 {'severe', 'suffer', 'impair', 'foreign', 'force', 'against', 'serve', 'impossible', 'unsafe', 'defect', 'even', 'shell', 'least', 'distracting', 'expensive', 'cancellation', 'breach', 'risky', 'error', 'poor', 'volatility', 'uncertainty', 'inability', 'lose', 'decline', 'intangible', 'distraction', 'point', 'service', 'excess', 'expose', 'lost', 'redundancy', 'make', 'dissatisfied', 'terrorism', 'dark', 'hostile', 'malicious', 'unspecified', 'insufficient', 'loss', 'not', 'unpredictable', 'cut', 'theft', 'competition', 'order', 'particular', 'restrict', 'cannot', 'short', 'interruption', 'charge', 'hedge', 'unable', 'unlimited', 'unqualified', 'unemployment', 'competitive', 'instability', 'ineffective', 'expense', 'violation', 'fix', 'involve', 'delay', 'discount', 'impede', 'disrupt', 'neither', 'suspicious', 'disruption', 'lower', 'shortage', 'withheld', 'differ', 'oversight', 'accident', 'close', 'raise', 'exception', 'board', 'need', 'complex', 'depreciation', 'capital', 'delinquent', 'obsolete', 'abrupt', 'volatile', 'liability', 'prohibitive', 'harm', 'interfere', 'vice', 'difficult', 'no', 'unfavorable', 'nor', 'unexpected', 'cost', 'failure', 'liable', 'infringement', 'indirect', 'execute', 'negative', 'compete', 'avoid', 'adverse', 'turn', 'inadequate', 'unusual', 'show', 'limit', 'decrease', 'press', 'low', 'violate', 'damage', 'disaster', 'tax', 'stringent', 'mix', 'aggressive', 'matter', 'unexpectedly', 'division', 'unconditional', 'uncertain', 'help', 'invalid'} 133
https://www.cs.toronto.edu/~frank/csc2501/Tutorials/cs485_nltk_krish_tutorial1.pdf
Please install the nltk package:
pip install nltk
Also NLTK has packages that may need packages to be installed from within it, so use nltk.download() to do so, in case you get the following error when using NLTK.
LookupError:
Resource 'tokenizers/punkt/PY3/english.pickle' not found. Please use the NLTK Downloader to obtain the resource: >>> nltk.download() Searched in:
- '/Users/srdas/nltk_data'
- '/usr/share/nltk_data'
- '/usr/local/share/nltk_data'
- '/usr/lib/nltk_data'
- '/usr/local/lib/nltk_data'
- ''
import nltk
#Run if needed to install a package from within nltk.
#nltk.download()
text = "Ask not what your country can do for you, \
but ask what you can do for your country."
nltk.word_tokenize(text)
['Ask', 'not', 'what', 'your', 'country', 'can', 'do', 'for', 'you', ',', 'but', 'ask', 'what', 'you', 'can', 'do', 'for', 'your', 'country', '.']
We explore using the Twitter API here.
We can set up keys and tokens at: https://apps.twitter.com/
import tweepy
#Authentication
consumer_key = 'tRby6pJGgzaN1Y9OOFU8nOzCV'
consumer_secret = 'aL7BAVZ4UwBQ1HyffIxsCG2da8BdJTcFD3WziDe3mePFFLoA2u'
access_token = '18666236-DmDE1wwbpvPbDcw9kwt9yThGeyYhjfpVVywrHuhOQ'
access_token_secret = 'cttbpxpTtqJn7wrCP36I59omNI5GQHXXgV41sKwUgc'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
#Get all tweets from any user
id = 'realDonaldtrump'
new_tweets = api.user_timeline(screen_name = id,count=20)
print(len(new_tweets))
print(new_tweets)
20 [Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 02:02:19 +0000 2019', 'id': 1181751715437170689, 'id_str': '1181751715437170689', 'text': 'RT @senatemajldr: The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and across the…', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'senatemajldr', 'name': 'Leader McConnell', 'id': 1249982359, 'id_str': '1249982359', 'indices': [3, 16]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'retweeted_status': {'created_at': 'Thu Sep 26 16:07:22 +0000 2019', 'id': 1177253334891278342, 'id_str': '1177253334891278342', 'text': 'The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and acros… https://t.co/eM00HR7pTu', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eM00HR7pTu', 'expanded_url': 'https://twitter.com/i/web/status/1177253334891278342', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 2787, 'favorite_count': 8105, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'is_quote_status': False, 'retweet_count': 2787, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 2, 2, 19), id=1181751715437170689, id_str='1181751715437170689', text='RT @senatemajldr: The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and across the…', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'senatemajldr', 'name': 'Leader McConnell', 'id': 1249982359, 'id_str': '1249982359', 'indices': [3, 16]}], 'urls': []}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, retweeted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Thu Sep 26 16:07:22 +0000 2019', 'id': 1177253334891278342, 'id_str': '1177253334891278342', 'text': 'The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and acros… https://t.co/eM00HR7pTu', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eM00HR7pTu', 'expanded_url': 'https://twitter.com/i/web/status/1177253334891278342', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 2787, 'favorite_count': 8105, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 9, 26, 16, 7, 22), id=1177253334891278342, id_str='1177253334891278342', text='The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and acros… https://t.co/eM00HR7pTu', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eM00HR7pTu', 'expanded_url': 'https://twitter.com/i/web/status/1177253334891278342', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter Web App', source_url='https://mobile.twitter.com', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=2787, favorite_count=8105, favorited=False, retweeted=False, lang='en'), is_quote_status=False, retweet_count=2787, favorite_count=0, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 02:00:39 +0000 2019', 'id': 1181751294693969920, 'id_str': '1181751294693969920', 'text': 'The Greatest Witch Hunt in the history of the USA! https://t.co/6FW11oLBv3', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/6FW11oLBv3', 'expanded_url': 'https://twitter.com/senatemajldr/status/1181704952273657857', 'display_url': 'twitter.com/senatemajldr/s…', 'indices': [51, 74]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': True, 'quoted_status_id': 1181704952273657857, 'quoted_status_id_str': '1181704952273657857', 'quoted_status': {'created_at': 'Tue Oct 08 22:56:30 +0000 2019', 'id': 1181704952273657857, 'id_str': '1181704952273657857', 'text': 'Overturning the results of an American election requires the highest level of fairness and due process, as it strik… https://t.co/DuKzSoyQ5k', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/DuKzSoyQ5k', 'expanded_url': 'https://twitter.com/i/web/status/1181704952273657857', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 1950, 'favorite_count': 6350, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'retweet_count': 1318, 'favorite_count': 4262, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 2, 0, 39), id=1181751294693969920, id_str='1181751294693969920', text='The Greatest Witch Hunt in the history of the USA! https://t.co/6FW11oLBv3', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/6FW11oLBv3', 'expanded_url': 'https://twitter.com/senatemajldr/status/1181704952273657857', 'display_url': 'twitter.com/senatemajldr/s…', 'indices': [51, 74]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=True, quoted_status_id=1181704952273657857, quoted_status_id_str='1181704952273657857', quoted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 22:56:30 +0000 2019', 'id': 1181704952273657857, 'id_str': '1181704952273657857', 'text': 'Overturning the results of an American election requires the highest level of fairness and due process, as it strik… https://t.co/DuKzSoyQ5k', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/DuKzSoyQ5k', 'expanded_url': 'https://twitter.com/i/web/status/1181704952273657857', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 1950, 'favorite_count': 6350, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 22, 56, 30), id=1181704952273657857, id_str='1181704952273657857', text='Overturning the results of an American election requires the highest level of fairness and due process, as it strik… https://t.co/DuKzSoyQ5k', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/DuKzSoyQ5k', 'expanded_url': 'https://twitter.com/i/web/status/1181704952273657857', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=1950, favorite_count=6350, favorited=False, retweeted=False, lang='en'), retweet_count=1318, favorite_count=4262, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 01:59:12 +0000 2019', 'id': 1181750932444520448, 'id_str': '1181750932444520448', 'text': 'RT @senatemajldr: The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Democrats…', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'senatemajldr', 'name': 'Leader McConnell', 'id': 1249982359, 'id_str': '1249982359', 'indices': [3, 16]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'retweeted_status': {'created_at': 'Mon Sep 30 13:48:39 +0000 2019', 'id': 1178667979728461829, 'id_str': '1178667979728461829', 'text': 'The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Demo… https://t.co/eLVW1fKn2Y', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eLVW1fKn2Y', 'expanded_url': 'https://twitter.com/i/web/status/1178667979728461829', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 7099, 'favorite_count': 19736, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, 'is_quote_status': False, 'retweet_count': 7099, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 1, 59, 12), id=1181750932444520448, id_str='1181750932444520448', text='RT @senatemajldr: The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Democrats…', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'senatemajldr', 'name': 'Leader McConnell', 'id': 1249982359, 'id_str': '1249982359', 'indices': [3, 16]}], 'urls': []}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, retweeted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Mon Sep 30 13:48:39 +0000 2019', 'id': 1178667979728461829, 'id_str': '1178667979728461829', 'text': 'The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Demo… https://t.co/eLVW1fKn2Y', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eLVW1fKn2Y', 'expanded_url': 'https://twitter.com/i/web/status/1178667979728461829', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 7099, 'favorite_count': 19736, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 9, 30, 13, 48, 39), id=1178667979728461829, id_str='1178667979728461829', text='The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Demo… https://t.co/eLVW1fKn2Y', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/eLVW1fKn2Y', 'expanded_url': 'https://twitter.com/i/web/status/1178667979728461829', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 1249982359, 'id_str': '1249982359', 'name': 'Leader McConnell', 'screen_name': 'senatemajldr', 'location': 'Washington, DC', 'description': 'U.S. Senate Majority Leader Mitch McConnell', 'url': 'https://t.co/J5RQpHiTgo', 'entities': {'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1044440, 'friends_count': 104, 'listed_count': 4686, 'created_at': 'Thu Mar 07 20:21:15 +0000 2013', 'favourites_count': 94, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3757, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '0066CC', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1249982359/1563547854', 'profile_link_color': 'AD0000', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=1249982359, id_str='1249982359', name='Leader McConnell', screen_name='senatemajldr', location='Washington, DC', description='U.S. Senate Majority Leader Mitch McConnell', url='https://t.co/J5RQpHiTgo', entities={'url': {'urls': [{'url': 'https://t.co/J5RQpHiTgo', 'expanded_url': 'http://republicanleader.senate.gov', 'display_url': 'republicanleader.senate.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1044440, friends_count=104, listed_count=4686, created_at=datetime.datetime(2013, 3, 7, 20, 21, 15), favourites_count=94, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3757, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='0066CC', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/732596482336002049/JYMrr9_4_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/1249982359/1563547854', profile_link_color='AD0000', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=7099, favorite_count=19736, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), is_quote_status=False, retweet_count=7099, favorite_count=0, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 01:57:35 +0000 2019', 'id': 1181750525596983296, 'id_str': '1181750525596983296', 'text': 'Gasoline Prices in the State of California are MUCH HIGHER than anywhere else in the Nation ($2.50 vs. $4.50). I gu… https://t.co/HK3QJCIwqz', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/HK3QJCIwqz', 'expanded_url': 'https://twitter.com/i/web/status/1181750525596983296', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 2461, 'favorite_count': 8757, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 1, 57, 35), id=1181750525596983296, id_str='1181750525596983296', text='Gasoline Prices in the State of California are MUCH HIGHER than anywhere else in the Nation ($2.50 vs. $4.50). I gu… https://t.co/HK3QJCIwqz', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/HK3QJCIwqz', 'expanded_url': 'https://twitter.com/i/web/status/1181750525596983296', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=2461, favorite_count=8757, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 01:48:16 +0000 2019', 'id': 1181748180066738176, 'id_str': '1181748180066738176', 'text': 'RT @RepMarkMeadows: Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwing a…', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'RepMarkMeadows', 'name': 'Mark Meadows', 'id': 963480595, 'id_str': '963480595', 'indices': [3, 18]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'retweeted_status': {'created_at': 'Tue Oct 08 23:54:25 +0000 2019', 'id': 1181719527916212224, 'id_str': '1181719527916212224', 'text': 'Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwi… https://t.co/pxkKW0yli3', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/pxkKW0yli3', 'expanded_url': 'https://twitter.com/i/web/status/1181719527916212224', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 963480595, 'id_str': '963480595', 'name': 'Mark Meadows', 'screen_name': 'RepMarkMeadows', 'location': 'Jackson County, NC', 'description': "Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", 'url': 'https://t.co/awcfuLlfst', 'entities': {'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 394254, 'friends_count': 960, 'listed_count': 2524, 'created_at': 'Thu Nov 22 02:20:50 +0000 2012', 'favourites_count': 411, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3013, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/963480595/1392915093', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'FFFFFF', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 4039, 'favorite_count': 11045, 'favorited': False, 'retweeted': False, 'lang': 'en'}, 'is_quote_status': False, 'retweet_count': 4039, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 1, 48, 16), id=1181748180066738176, id_str='1181748180066738176', text='RT @RepMarkMeadows: Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwing a…', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'RepMarkMeadows', 'name': 'Mark Meadows', 'id': 963480595, 'id_str': '963480595', 'indices': [3, 18]}], 'urls': []}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, retweeted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 23:54:25 +0000 2019', 'id': 1181719527916212224, 'id_str': '1181719527916212224', 'text': 'Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwi… https://t.co/pxkKW0yli3', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/pxkKW0yli3', 'expanded_url': 'https://twitter.com/i/web/status/1181719527916212224', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 963480595, 'id_str': '963480595', 'name': 'Mark Meadows', 'screen_name': 'RepMarkMeadows', 'location': 'Jackson County, NC', 'description': "Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", 'url': 'https://t.co/awcfuLlfst', 'entities': {'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 394254, 'friends_count': 960, 'listed_count': 2524, 'created_at': 'Thu Nov 22 02:20:50 +0000 2012', 'favourites_count': 411, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3013, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/963480595/1392915093', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'FFFFFF', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 4039, 'favorite_count': 11045, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 23, 54, 25), id=1181719527916212224, id_str='1181719527916212224', text='Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwi… https://t.co/pxkKW0yli3', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/pxkKW0yli3', 'expanded_url': 'https://twitter.com/i/web/status/1181719527916212224', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 963480595, 'id_str': '963480595', 'name': 'Mark Meadows', 'screen_name': 'RepMarkMeadows', 'location': 'Jackson County, NC', 'description': "Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", 'url': 'https://t.co/awcfuLlfst', 'entities': {'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 394254, 'friends_count': 960, 'listed_count': 2524, 'created_at': 'Thu Nov 22 02:20:50 +0000 2012', 'favourites_count': 411, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3013, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/963480595/1392915093', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'FFFFFF', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=963480595, id_str='963480595', name='Mark Meadows', screen_name='RepMarkMeadows', location='Jackson County, NC', description="Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", url='https://t.co/awcfuLlfst', entities={'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=394254, friends_count=960, listed_count=2524, created_at=datetime.datetime(2012, 11, 22, 2, 20, 50), favourites_count=411, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3013, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='C0DEED', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=False, profile_image_url='http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/963480595/1392915093', profile_link_color='0084B4', profile_sidebar_border_color='FFFFFF', profile_sidebar_fill_color='DDEEF6', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 963480595, 'id_str': '963480595', 'name': 'Mark Meadows', 'screen_name': 'RepMarkMeadows', 'location': 'Jackson County, NC', 'description': "Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", 'url': 'https://t.co/awcfuLlfst', 'entities': {'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 394254, 'friends_count': 960, 'listed_count': 2524, 'created_at': 'Thu Nov 22 02:20:50 +0000 2012', 'favourites_count': 411, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 3013, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/963480595/1392915093', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'FFFFFF', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=963480595, id_str='963480595', name='Mark Meadows', screen_name='RepMarkMeadows', location='Jackson County, NC', description="Businessman, husband, and father proudly representing North Carolina's 11th Congressional District. Former Chairman of @freedomcaucus.", url='https://t.co/awcfuLlfst', entities={'url': {'urls': [{'url': 'https://t.co/awcfuLlfst', 'expanded_url': 'http://meadows.house.gov/', 'display_url': 'meadows.house.gov', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=394254, friends_count=960, listed_count=2524, created_at=datetime.datetime(2012, 11, 22, 2, 20, 50), favourites_count=411, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=3013, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='C0DEED', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=False, profile_image_url='http://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/827624420923539456/rcp86XAS_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/963480595/1392915093', profile_link_color='0084B4', profile_sidebar_border_color='FFFFFF', profile_sidebar_fill_color='DDEEF6', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=4039, favorite_count=11045, favorited=False, retweeted=False, lang='en'), is_quote_status=False, retweet_count=4039, favorite_count=0, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 01:43:15 +0000 2019', 'id': 1181746918474440705, 'id_str': '1181746918474440705', 'text': '....If there is a Runoff in Louisiana, you will have a great new Republican Governor who will Cut your Taxes and Ca… https://t.co/k2MjEi0AzB', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/k2MjEi0AzB', 'expanded_url': 'https://twitter.com/i/web/status/1181746918474440705', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': 1181746916981379072, 'in_reply_to_status_id_str': '1181746916981379072', 'in_reply_to_user_id': 25073877, 'in_reply_to_user_id_str': '25073877', 'in_reply_to_screen_name': 'realDonaldTrump', 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 2602, 'favorite_count': 8967, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 1, 43, 15), id=1181746918474440705, id_str='1181746918474440705', text='....If there is a Runoff in Louisiana, you will have a great new Republican Governor who will Cut your Taxes and Ca… https://t.co/k2MjEi0AzB', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/k2MjEi0AzB', 'expanded_url': 'https://twitter.com/i/web/status/1181746918474440705', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=1181746916981379072, in_reply_to_status_id_str='1181746916981379072', in_reply_to_user_id=25073877, in_reply_to_user_id_str='25073877', in_reply_to_screen_name='realDonaldTrump', author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=2602, favorite_count=8967, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Wed Oct 09 01:43:15 +0000 2019', 'id': 1181746916981379072, 'id_str': '1181746916981379072', 'text': 'Big Rally in Louisiana on Friday night. Must force a runoff with a Liberal Democrat Governor, John Bel Edwards, who… https://t.co/caYQNV2rEQ', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/caYQNV2rEQ', 'expanded_url': 'https://twitter.com/i/web/status/1181746916981379072', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 3478, 'favorite_count': 11820, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 9, 1, 43, 15), id=1181746916981379072, id_str='1181746916981379072', text='Big Rally in Louisiana on Friday night. Must force a runoff with a Liberal Democrat Governor, John Bel Edwards, who… https://t.co/caYQNV2rEQ', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/caYQNV2rEQ', 'expanded_url': 'https://twitter.com/i/web/status/1181746916981379072', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=3478, favorite_count=11820, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 22:28:56 +0000 2019', 'id': 1181698015423275010, 'id_str': '1181698015423275010', 'text': 'This is just the beginning, thank you to @ByronYork! https://t.co/1ceplqe5MZ', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'ByronYork', 'name': 'Byron York', 'id': 47739450, 'id_str': '47739450', 'indices': [41, 51]}], 'urls': [{'url': 'https://t.co/1ceplqe5MZ', 'expanded_url': 'https://www.washingtonexaminer.com/news/whistleblower-had-professional-tie-to-2020-democratic-candidate', 'display_url': 'washingtonexaminer.com/news/whistlebl…', 'indices': [53, 76]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 13686, 'favorite_count': 39206, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 22, 28, 56), id=1181698015423275010, id_str='1181698015423275010', text='This is just the beginning, thank you to @ByronYork! https://t.co/1ceplqe5MZ', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'ByronYork', 'name': 'Byron York', 'id': 47739450, 'id_str': '47739450', 'indices': [41, 51]}], 'urls': [{'url': 'https://t.co/1ceplqe5MZ', 'expanded_url': 'https://www.washingtonexaminer.com/news/whistleblower-had-professional-tie-to-2020-democratic-candidate', 'display_url': 'washingtonexaminer.com/news/whistlebl…', 'indices': [53, 76]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=13686, favorite_count=39206, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 18:54:45 +0000 2019', 'id': 1181644113092980737, 'id_str': '1181644113092980737', 'text': 'The U.S. Border is SECURE! https://t.co/h9EPUPL1uS', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], 'media': [{'id': 1181644072647303168, 'id_str': '1181644072647303168', 'indices': [27, 50], 'media_url': 'http://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'media_url_https': 'https://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'url': 'https://t.co/h9EPUPL1uS', 'display_url': 'pic.twitter.com/h9EPUPL1uS', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181644113092980737/photo/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1024, 'h': 512, 'resize': 'fit'}, 'small': {'w': 680, 'h': 340, 'resize': 'fit'}, 'large': {'w': 1024, 'h': 512, 'resize': 'fit'}}}]}, 'extended_entities': {'media': [{'id': 1181644072647303168, 'id_str': '1181644072647303168', 'indices': [27, 50], 'media_url': 'http://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'media_url_https': 'https://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'url': 'https://t.co/h9EPUPL1uS', 'display_url': 'pic.twitter.com/h9EPUPL1uS', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181644113092980737/photo/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1024, 'h': 512, 'resize': 'fit'}, 'small': {'w': 680, 'h': 340, 'resize': 'fit'}, 'large': {'w': 1024, 'h': 512, 'resize': 'fit'}}}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 13537, 'favorite_count': 44344, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 18, 54, 45), id=1181644113092980737, id_str='1181644113092980737', text='The U.S. Border is SECURE! https://t.co/h9EPUPL1uS', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], 'media': [{'id': 1181644072647303168, 'id_str': '1181644072647303168', 'indices': [27, 50], 'media_url': 'http://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'media_url_https': 'https://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'url': 'https://t.co/h9EPUPL1uS', 'display_url': 'pic.twitter.com/h9EPUPL1uS', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181644113092980737/photo/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1024, 'h': 512, 'resize': 'fit'}, 'small': {'w': 680, 'h': 340, 'resize': 'fit'}, 'large': {'w': 1024, 'h': 512, 'resize': 'fit'}}}]}, extended_entities={'media': [{'id': 1181644072647303168, 'id_str': '1181644072647303168', 'indices': [27, 50], 'media_url': 'http://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'media_url_https': 'https://pbs.twimg.com/media/EGYLBgEWoAAWIsF.jpg', 'url': 'https://t.co/h9EPUPL1uS', 'display_url': 'pic.twitter.com/h9EPUPL1uS', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181644113092980737/photo/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1024, 'h': 512, 'resize': 'fit'}, 'small': {'w': 680, 'h': 340, 'resize': 'fit'}, 'large': {'w': 1024, 'h': 512, 'resize': 'fit'}}}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=13537, favorite_count=44344, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 18:40:40 +0000 2019', 'id': 1181640571334647814, 'id_str': '1181640571334647814', 'text': '....In fact, the “Cops For Trump” T-shirt Web Site CRASHED because of incredible volume, but is now back up and run… https://t.co/ViBGfbd5bU', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/ViBGfbd5bU', 'expanded_url': 'https://twitter.com/i/web/status/1181640571334647814', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': 1181640563696820224, 'in_reply_to_status_id_str': '1181640563696820224', 'in_reply_to_user_id': 25073877, 'in_reply_to_user_id_str': '25073877', 'in_reply_to_screen_name': 'realDonaldTrump', 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 13442, 'favorite_count': 50461, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 18, 40, 40), id=1181640571334647814, id_str='1181640571334647814', text='....In fact, the “Cops For Trump” T-shirt Web Site CRASHED because of incredible volume, but is now back up and run… https://t.co/ViBGfbd5bU', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/ViBGfbd5bU', 'expanded_url': 'https://twitter.com/i/web/status/1181640571334647814', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=1181640563696820224, in_reply_to_status_id_str='1181640563696820224', in_reply_to_user_id=25073877, in_reply_to_user_id_str='25073877', in_reply_to_screen_name='realDonaldTrump', author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=13442, favorite_count=50461, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 18:40:38 +0000 2019', 'id': 1181640563696820224, 'id_str': '1181640563696820224', 'text': 'Radical Left Dem Mayor of Minneapolis, Jacob Frey, is doing everything possible to stifle Free Speech despite a rec… https://t.co/iYbQlIajvw', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/iYbQlIajvw', 'expanded_url': 'https://twitter.com/i/web/status/1181640563696820224', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 15907, 'favorite_count': 56447, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 18, 40, 38), id=1181640563696820224, id_str='1181640563696820224', text='Radical Left Dem Mayor of Minneapolis, Jacob Frey, is doing everything possible to stifle Free Speech despite a rec… https://t.co/iYbQlIajvw', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/iYbQlIajvw', 'expanded_url': 'https://twitter.com/i/web/status/1181640563696820224', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=15907, favorite_count=56447, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 17:30:50 +0000 2019', 'id': 1181622998228508672, 'id_str': '1181622998228508672', 'text': 'Friday night in Louisiana will be Great. Big crowd expected. Republicans must get out and vote for either of our tw… https://t.co/32ODeKyBYa', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/32ODeKyBYa', 'expanded_url': 'https://twitter.com/i/web/status/1181622998228508672', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': True, 'quoted_status_id': 1181559221453819904, 'quoted_status_id_str': '1181559221453819904', 'quoted_status': {'created_at': 'Tue Oct 08 13:17:25 +0000 2019', 'id': 1181559221453819904, 'id_str': '1181559221453819904', 'text': 'President @realDonaldTrump will host a Keep America Great rally on Friday, October 11 at 7:00 pm CDT at the James E… https://t.co/VXC75AzWbP', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'realDonaldTrump', 'name': 'Donald J. Trump', 'id': 25073877, 'id_str': '25073877', 'indices': [10, 26]}], 'urls': [{'url': 'https://t.co/VXC75AzWbP', 'expanded_url': 'https://twitter.com/i/web/status/1181559221453819904', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 729676086632656900, 'id_str': '729676086632656900', 'name': 'Team Trump', 'screen_name': 'TeamTrump', 'location': 'USA', 'description': 'Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', 'url': 'https://t.co/mZB2hymxC9', 'entities': {'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1210163, 'friends_count': 77, 'listed_count': 3114, 'created_at': 'Mon May 09 14:15:10 +0000 2016', 'favourites_count': 2614, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 14822, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '000000', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', 'profile_link_color': 'CB0606', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': False, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 3126, 'favorite_count': 7410, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, 'retweet_count': 11472, 'favorite_count': 34747, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 17, 30, 50), id=1181622998228508672, id_str='1181622998228508672', text='Friday night in Louisiana will be Great. Big crowd expected. Republicans must get out and vote for either of our tw… https://t.co/32ODeKyBYa', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/32ODeKyBYa', 'expanded_url': 'https://twitter.com/i/web/status/1181622998228508672', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=True, quoted_status_id=1181559221453819904, quoted_status_id_str='1181559221453819904', quoted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 13:17:25 +0000 2019', 'id': 1181559221453819904, 'id_str': '1181559221453819904', 'text': 'President @realDonaldTrump will host a Keep America Great rally on Friday, October 11 at 7:00 pm CDT at the James E… https://t.co/VXC75AzWbP', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'realDonaldTrump', 'name': 'Donald J. Trump', 'id': 25073877, 'id_str': '25073877', 'indices': [10, 26]}], 'urls': [{'url': 'https://t.co/VXC75AzWbP', 'expanded_url': 'https://twitter.com/i/web/status/1181559221453819904', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="https://mobile.twitter.com" rel="nofollow">Twitter Web App</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 729676086632656900, 'id_str': '729676086632656900', 'name': 'Team Trump', 'screen_name': 'TeamTrump', 'location': 'USA', 'description': 'Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', 'url': 'https://t.co/mZB2hymxC9', 'entities': {'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1210163, 'friends_count': 77, 'listed_count': 3114, 'created_at': 'Mon May 09 14:15:10 +0000 2016', 'favourites_count': 2614, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 14822, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '000000', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', 'profile_link_color': 'CB0606', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': False, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 3126, 'favorite_count': 7410, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 13, 17, 25), id=1181559221453819904, id_str='1181559221453819904', text='President @realDonaldTrump will host a Keep America Great rally on Friday, October 11 at 7:00 pm CDT at the James E… https://t.co/VXC75AzWbP', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'realDonaldTrump', 'name': 'Donald J. Trump', 'id': 25073877, 'id_str': '25073877', 'indices': [10, 26]}], 'urls': [{'url': 'https://t.co/VXC75AzWbP', 'expanded_url': 'https://twitter.com/i/web/status/1181559221453819904', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter Web App', source_url='https://mobile.twitter.com', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 729676086632656900, 'id_str': '729676086632656900', 'name': 'Team Trump', 'screen_name': 'TeamTrump', 'location': 'USA', 'description': 'Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', 'url': 'https://t.co/mZB2hymxC9', 'entities': {'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1210163, 'friends_count': 77, 'listed_count': 3114, 'created_at': 'Mon May 09 14:15:10 +0000 2016', 'favourites_count': 2614, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 14822, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '000000', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', 'profile_link_color': 'CB0606', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': False, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=729676086632656900, id_str='729676086632656900', name='Team Trump', screen_name='TeamTrump', location='USA', description='Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', url='https://t.co/mZB2hymxC9', entities={'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1210163, friends_count=77, listed_count=3114, created_at=datetime.datetime(2016, 5, 9, 14, 15, 10), favourites_count=2614, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=14822, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='000000', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=False, profile_image_url='http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', profile_link_color='CB0606', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=False, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 729676086632656900, 'id_str': '729676086632656900', 'name': 'Team Trump', 'screen_name': 'TeamTrump', 'location': 'USA', 'description': 'Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', 'url': 'https://t.co/mZB2hymxC9', 'entities': {'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 1210163, 'friends_count': 77, 'listed_count': 3114, 'created_at': 'Mon May 09 14:15:10 +0000 2016', 'favourites_count': 2614, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 14822, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': '000000', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': False, 'profile_image_url': 'http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', 'profile_link_color': 'CB0606', 'profile_sidebar_border_color': '000000', 'profile_sidebar_fill_color': '000000', 'profile_text_color': '000000', 'profile_use_background_image': False, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=729676086632656900, id_str='729676086632656900', name='Team Trump', screen_name='TeamTrump', location='USA', description='Welcome to Team Trump, the official Twitter for the Trump Campaign. Together, we will KEEP AMERICA GREAT! 🇺🇸', url='https://t.co/mZB2hymxC9', entities={'url': {'urls': [{'url': 'https://t.co/mZB2hymxC9', 'expanded_url': 'http://www.DonaldJTrump.com', 'display_url': 'DonaldJTrump.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=1210163, friends_count=77, listed_count=3114, created_at=datetime.datetime(2016, 5, 9, 14, 15, 10), favourites_count=2614, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=14822, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='000000', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=False, profile_image_url='http://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/745768799849308160/KrZhjkpH_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/729676086632656900/1564436211', profile_link_color='CB0606', profile_sidebar_border_color='000000', profile_sidebar_fill_color='000000', profile_text_color='000000', profile_use_background_image=False, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=3126, favorite_count=7410, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), retweet_count=11472, favorite_count=34747, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 17:15:46 +0000 2019', 'id': 1181619203687751680, 'id_str': '1181619203687751680', 'text': 'RT @bennyjohnson: Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted by a lo…', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'bennyjohnson', 'name': 'Benny', 'id': 15212187, 'id_str': '15212187', 'indices': [3, 16]}], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'retweeted_status': {'created_at': 'Sat Oct 05 16:45:20 +0000 2019', 'id': 1180524380985679872, 'id_str': '1180524380985679872', 'text': 'Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted b… https://t.co/7kn4GQkP5v', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/7kn4GQkP5v', 'expanded_url': 'https://twitter.com/i/web/status/1180524380985679872', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 15212187, 'id_str': '15212187', 'name': 'Benny', 'screen_name': 'bennyjohnson', 'location': 'WashingtonDC/ New York City', 'description': 'Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', 'url': 'https://t.co/8gi1LppSDA', 'entities': {'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 168651, 'friends_count': 1550, 'listed_count': 1882, 'created_at': 'Mon Jun 23 21:33:20 +0000 2008', 'favourites_count': 9544, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': True, 'statuses_count': 37973, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/15212187/1542303332', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 27652, 'favorite_count': 71266, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, 'is_quote_status': False, 'retweet_count': 27652, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 17, 15, 46), id=1181619203687751680, id_str='1181619203687751680', text='RT @bennyjohnson: Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted by a lo…', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'bennyjohnson', 'name': 'Benny', 'id': 15212187, 'id_str': '15212187', 'indices': [3, 16]}], 'urls': []}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, retweeted_status=Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Sat Oct 05 16:45:20 +0000 2019', 'id': 1180524380985679872, 'id_str': '1180524380985679872', 'text': 'Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted b… https://t.co/7kn4GQkP5v', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/7kn4GQkP5v', 'expanded_url': 'https://twitter.com/i/web/status/1180524380985679872', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 15212187, 'id_str': '15212187', 'name': 'Benny', 'screen_name': 'bennyjohnson', 'location': 'WashingtonDC/ New York City', 'description': 'Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', 'url': 'https://t.co/8gi1LppSDA', 'entities': {'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 168651, 'friends_count': 1550, 'listed_count': 1882, 'created_at': 'Mon Jun 23 21:33:20 +0000 2008', 'favourites_count': 9544, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': True, 'statuses_count': 37973, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/15212187/1542303332', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 27652, 'favorite_count': 71266, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 5, 16, 45, 20), id=1180524380985679872, id_str='1180524380985679872', text='Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted b… https://t.co/7kn4GQkP5v', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/7kn4GQkP5v', 'expanded_url': 'https://twitter.com/i/web/status/1180524380985679872', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 15212187, 'id_str': '15212187', 'name': 'Benny', 'screen_name': 'bennyjohnson', 'location': 'WashingtonDC/ New York City', 'description': 'Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', 'url': 'https://t.co/8gi1LppSDA', 'entities': {'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 168651, 'friends_count': 1550, 'listed_count': 1882, 'created_at': 'Mon Jun 23 21:33:20 +0000 2008', 'favourites_count': 9544, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': True, 'statuses_count': 37973, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/15212187/1542303332', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=15212187, id_str='15212187', name='Benny', screen_name='bennyjohnson', location='WashingtonDC/ New York City', description='Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', url='https://t.co/8gi1LppSDA', entities={'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=168651, friends_count=1550, listed_count=1882, created_at=datetime.datetime(2008, 6, 23, 21, 33, 20), favourites_count=9544, utc_offset=None, time_zone=None, geo_enabled=False, verified=True, statuses_count=37973, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='C0DEED', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/15212187/1542303332', profile_link_color='0084B4', profile_sidebar_border_color='C0DEED', profile_sidebar_fill_color='DDEEF6', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 15212187, 'id_str': '15212187', 'name': 'Benny', 'screen_name': 'bennyjohnson', 'location': 'WashingtonDC/ New York City', 'description': 'Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', 'url': 'https://t.co/8gi1LppSDA', 'entities': {'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 168651, 'friends_count': 1550, 'listed_count': 1882, 'created_at': 'Mon Jun 23 21:33:20 +0000 2008', 'favourites_count': 9544, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': True, 'statuses_count': 37973, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'C0DEED', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/15212187/1542303332', 'profile_link_color': '0084B4', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, id=15212187, id_str='15212187', name='Benny', screen_name='bennyjohnson', location='WashingtonDC/ New York City', description='Love my Family, God and Pipe Tobacco; not necessarily in that order. @tpusa Chief Creative Officer Benny@tpusa.com', url='https://t.co/8gi1LppSDA', entities={'url': {'urls': [{'url': 'https://t.co/8gi1LppSDA', 'expanded_url': 'http://www.tpusa.com', 'display_url': 'tpusa.com', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=168651, friends_count=1550, listed_count=1882, created_at=datetime.datetime(2008, 6, 23, 21, 33, 20), favourites_count=9544, utc_offset=None, time_zone=None, geo_enabled=False, verified=True, statuses_count=37973, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=False, profile_background_color='C0DEED', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/1028825307258617856/hwu5zhmx_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/15212187/1542303332', profile_link_color='0084B4', profile_sidebar_border_color='C0DEED', profile_sidebar_fill_color='DDEEF6', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='none'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=27652, favorite_count=71266, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), is_quote_status=False, retweet_count=27652, favorite_count=0, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 16:06:26 +0000 2019', 'id': 1181601756347797505, 'id_str': '1181601756347797505', 'text': 'Hasn’t Adam Schiff been fully discredited by now? Do we have to continue listening to his lies?', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': []}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 21481, 'favorite_count': 84850, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 16, 6, 26), id=1181601756347797505, id_str='1181601756347797505', text='Hasn’t Adam Schiff been fully discredited by now? Do we have to continue listening to his lies?', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': []}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=21481, favorite_count=84850, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 15:06:17 +0000 2019', 'id': 1181586618983034880, 'id_str': '1181586618983034880', 'text': 'https://t.co/bh1FyxfUiA', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], 'media': [{'id': 1181582268831272960, 'id_str': '1181582268831272960', 'indices': [0, 23], 'media_url': 'http://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'media_url_https': 'https://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'url': 'https://t.co/bh1FyxfUiA', 'display_url': 'pic.twitter.com/bh1FyxfUiA', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181586618983034880/video/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1200, 'h': 675, 'resize': 'fit'}, 'small': {'w': 680, 'h': 383, 'resize': 'fit'}, 'large': {'w': 1280, 'h': 720, 'resize': 'fit'}}}]}, 'extended_entities': {'media': [{'id': 1181582268831272960, 'id_str': '1181582268831272960', 'indices': [0, 23], 'media_url': 'http://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'media_url_https': 'https://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'url': 'https://t.co/bh1FyxfUiA', 'display_url': 'pic.twitter.com/bh1FyxfUiA', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181586618983034880/video/1', 'type': 'video', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1200, 'h': 675, 'resize': 'fit'}, 'small': {'w': 680, 'h': 383, 'resize': 'fit'}, 'large': {'w': 1280, 'h': 720, 'resize': 'fit'}}, 'video_info': {'aspect_ratio': [16, 9], 'duration_millis': 214617, 'variants': [{'bitrate': 2176000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/1280x720/N7n_vMAuHAyCqrIM.mp4?tag=13'}, {'content_type': 'application/x-mpegURL', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/pl/mk9oMHU0hN5sdI_3.m3u8?tag=13'}, {'bitrate': 288000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/480x270/8OiAqON8w8oLpVHS.mp4?tag=13'}, {'bitrate': 832000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/640x360/xheJHTNip1f14xKy.mp4?tag=13'}]}, 'additional_media_info': {'title': 'COPS FOR TRUMP SHIRTS!', 'description': '', 'embeddable': True, 'monetizable': False}}]}, 'source': '<a href="https://studio.twitter.com" rel="nofollow">Twitter Media Studio</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 12329, 'favorite_count': 35366, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'und'}, created_at=datetime.datetime(2019, 10, 8, 15, 6, 17), id=1181586618983034880, id_str='1181586618983034880', text='https://t.co/bh1FyxfUiA', truncated=False, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [], 'media': [{'id': 1181582268831272960, 'id_str': '1181582268831272960', 'indices': [0, 23], 'media_url': 'http://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'media_url_https': 'https://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'url': 'https://t.co/bh1FyxfUiA', 'display_url': 'pic.twitter.com/bh1FyxfUiA', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181586618983034880/video/1', 'type': 'photo', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1200, 'h': 675, 'resize': 'fit'}, 'small': {'w': 680, 'h': 383, 'resize': 'fit'}, 'large': {'w': 1280, 'h': 720, 'resize': 'fit'}}}]}, extended_entities={'media': [{'id': 1181582268831272960, 'id_str': '1181582268831272960', 'indices': [0, 23], 'media_url': 'http://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'media_url_https': 'https://pbs.twimg.com/amplify_video_thumb/1181582268831272960/img/dzhfI4Oo83R2B4oo.jpg', 'url': 'https://t.co/bh1FyxfUiA', 'display_url': 'pic.twitter.com/bh1FyxfUiA', 'expanded_url': 'https://twitter.com/realDonaldTrump/status/1181586618983034880/video/1', 'type': 'video', 'sizes': {'thumb': {'w': 150, 'h': 150, 'resize': 'crop'}, 'medium': {'w': 1200, 'h': 675, 'resize': 'fit'}, 'small': {'w': 680, 'h': 383, 'resize': 'fit'}, 'large': {'w': 1280, 'h': 720, 'resize': 'fit'}}, 'video_info': {'aspect_ratio': [16, 9], 'duration_millis': 214617, 'variants': [{'bitrate': 2176000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/1280x720/N7n_vMAuHAyCqrIM.mp4?tag=13'}, {'content_type': 'application/x-mpegURL', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/pl/mk9oMHU0hN5sdI_3.m3u8?tag=13'}, {'bitrate': 288000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/480x270/8OiAqON8w8oLpVHS.mp4?tag=13'}, {'bitrate': 832000, 'content_type': 'video/mp4', 'url': 'https://video.twimg.com/amplify_video/1181582268831272960/vid/640x360/xheJHTNip1f14xKy.mp4?tag=13'}]}, 'additional_media_info': {'title': 'COPS FOR TRUMP SHIRTS!', 'description': '', 'embeddable': True, 'monetizable': False}}]}, source='Twitter Media Studio', source_url='https://studio.twitter.com', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=12329, favorite_count=35366, favorited=False, retweeted=False, possibly_sensitive=False, lang='und'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 14:35:57 +0000 2019', 'id': 1181578987191095298, 'id_str': '1181578987191095298', 'text': 'Get your great T-Shirts, “Cops for Trump,” at https://t.co/pmhDDXsIlx REALLY NICE! Thank you to Minneapolis Police… https://t.co/34pPVxdxb5', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/pmhDDXsIlx', 'expanded_url': 'http://WWW.MPDFEDERATION.COM', 'display_url': 'MPDFEDERATION.COM', 'indices': [46, 69]}, {'url': 'https://t.co/34pPVxdxb5', 'expanded_url': 'https://twitter.com/i/web/status/1181578987191095298', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 11722, 'favorite_count': 38417, 'favorited': False, 'retweeted': False, 'possibly_sensitive': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 14, 35, 57), id=1181578987191095298, id_str='1181578987191095298', text='Get your great T-Shirts, “Cops for Trump,” at https://t.co/pmhDDXsIlx REALLY NICE! Thank you to Minneapolis Police… https://t.co/34pPVxdxb5', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/pmhDDXsIlx', 'expanded_url': 'http://WWW.MPDFEDERATION.COM', 'display_url': 'MPDFEDERATION.COM', 'indices': [46, 69]}, {'url': 'https://t.co/34pPVxdxb5', 'expanded_url': 'https://twitter.com/i/web/status/1181578987191095298', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=11722, favorite_count=38417, favorited=False, retweeted=False, possibly_sensitive=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 14:31:08 +0000 2019', 'id': 1181577775246905344, 'id_str': '1181577775246905344', 'text': 'Someone please tell the Radical Left Mayor of Minneapolis that he can’t price out Free Speech. Probably illegal! I… https://t.co/KAncmV8QwQ', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/KAncmV8QwQ', 'expanded_url': 'https://twitter.com/i/web/status/1181577775246905344', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [116, 139]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 19359, 'favorite_count': 69963, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 14, 31, 8), id=1181577775246905344, id_str='1181577775246905344', text='Someone please tell the Radical Left Mayor of Minneapolis that he can’t price out Free Speech. Probably illegal! I… https://t.co/KAncmV8QwQ', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/KAncmV8QwQ', 'expanded_url': 'https://twitter.com/i/web/status/1181577775246905344', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [116, 139]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=19359, favorite_count=69963, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 14:25:06 +0000 2019', 'id': 1181576256904744964, 'id_str': '1181576256904744964', 'text': 'Thank you to Lt. Bob Kroll of the great Minneapolis Police Department for your kind words on @foxandfriends. The Po… https://t.co/5XSdJ5uofn', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'foxandfriends', 'name': 'FOX & friends', 'id': 15513604, 'id_str': '15513604', 'indices': [93, 107]}], 'urls': [{'url': 'https://t.co/5XSdJ5uofn', 'expanded_url': 'https://twitter.com/i/web/status/1181576256904744964', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 14172, 'favorite_count': 52152, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 14, 25, 6), id=1181576256904744964, id_str='1181576256904744964', text='Thank you to Lt. Bob Kroll of the great Minneapolis Police Department for your kind words on @foxandfriends. The Po… https://t.co/5XSdJ5uofn', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [{'screen_name': 'foxandfriends', 'name': 'FOX & friends', 'id': 15513604, 'id_str': '15513604', 'indices': [93, 107]}], 'urls': [{'url': 'https://t.co/5XSdJ5uofn', 'expanded_url': 'https://twitter.com/i/web/status/1181576256904744964', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=14172, favorite_count=52152, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 14:06:29 +0000 2019', 'id': 1181571571787403265, 'id_str': '1181571571787403265', 'text': 'I think that Crooked Hillary Clinton should enter the race to try and steal it away from Uber Left Elizabeth Warren… https://t.co/KwhW2ge0Kp', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/KwhW2ge0Kp', 'expanded_url': 'https://twitter.com/i/web/status/1181571571787403265', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 27478, 'favorite_count': 101063, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 14, 6, 29), id=1181571571787403265, id_str='1181571571787403265', text='I think that Crooked Hillary Clinton should enter the race to try and steal it away from Uber Left Elizabeth Warren… https://t.co/KwhW2ge0Kp', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/KwhW2ge0Kp', 'expanded_url': 'https://twitter.com/i/web/status/1181571571787403265', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [117, 140]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=None, in_reply_to_status_id_str=None, in_reply_to_user_id=None, in_reply_to_user_id_str=None, in_reply_to_screen_name=None, author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=27478, favorite_count=101063, favorited=False, retweeted=False, lang='en'), Status(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'created_at': 'Tue Oct 08 13:23:35 +0000 2019', 'id': 1181560772255719424, 'id_str': '1181560772255719424', 'text': '....to see. Importantly, Ambassador Sondland’s tweet, which few report, stated, “I believe you are incorrect about… https://t.co/4qtYbM0kH6', 'truncated': True, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/4qtYbM0kH6', 'expanded_url': 'https://twitter.com/i/web/status/1181560772255719424', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [116, 139]}]}, 'source': '<a href="http://twitter.com/download/iphone" rel="nofollow">Twitter for iPhone</a>', 'in_reply_to_status_id': 1181560708808486914, 'in_reply_to_status_id_str': '1181560708808486914', 'in_reply_to_user_id': 25073877, 'in_reply_to_user_id_str': '25073877', 'in_reply_to_screen_name': 'realDonaldTrump', 'user': {'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 13687, 'favorite_count': 52490, 'favorited': False, 'retweeted': False, 'lang': 'en'}, created_at=datetime.datetime(2019, 10, 8, 13, 23, 35), id=1181560772255719424, id_str='1181560772255719424', text='....to see. Importantly, Ambassador Sondland’s tweet, which few report, stated, “I believe you are incorrect about… https://t.co/4qtYbM0kH6', truncated=True, entities={'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': [{'url': 'https://t.co/4qtYbM0kH6', 'expanded_url': 'https://twitter.com/i/web/status/1181560772255719424', 'display_url': 'twitter.com/i/web/status/1…', 'indices': [116, 139]}]}, source='Twitter for iPhone', source_url='http://twitter.com/download/iphone', in_reply_to_status_id=1181560708808486914, in_reply_to_status_id_str='1181560708808486914', in_reply_to_user_id=25073877, in_reply_to_user_id_str='25073877', in_reply_to_screen_name='realDonaldTrump', author=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), user=User(_api=<tweepy.api.API object at 0x000001E663E3ED68>, _json={'id': 25073877, 'id_str': '25073877', 'name': 'Donald J. Trump', 'screen_name': 'realDonaldTrump', 'location': 'Washington, DC', 'description': '45th President of the United States of America🇺🇸', 'url': 'https://t.co/OMxB0x7xC5', 'entities': {'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, 'protected': False, 'followers_count': 65422131, 'friends_count': 47, 'listed_count': 109564, 'created_at': 'Wed Mar 18 13:46:38 +0000 2009', 'favourites_count': 6, 'utc_offset': None, 'time_zone': None, 'geo_enabled': True, 'verified': True, 'statuses_count': 45000, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': True, 'profile_background_color': '6D5C18', 'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png', 'profile_background_tile': True, 'profile_image_url': 'http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_image_url_https': 'https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', 'profile_banner_url': 'https://pbs.twimg.com/profile_banners/25073877/1560920145', 'profile_link_color': '1B95E0', 'profile_sidebar_border_color': 'BDDCAD', 'profile_sidebar_fill_color': 'C5CEC0', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': False, 'default_profile': False, 'default_profile_image': False, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'regular'}, id=25073877, id_str='25073877', name='Donald J. Trump', screen_name='realDonaldTrump', location='Washington, DC', description='45th President of the United States of America🇺🇸', url='https://t.co/OMxB0x7xC5', entities={'url': {'urls': [{'url': 'https://t.co/OMxB0x7xC5', 'expanded_url': 'http://www.Instagram.com/realDonaldTrump', 'display_url': 'Instagram.com/realDonaldTrump', 'indices': [0, 23]}]}, 'description': {'urls': []}}, protected=False, followers_count=65422131, friends_count=47, listed_count=109564, created_at=datetime.datetime(2009, 3, 18, 13, 46, 38), favourites_count=6, utc_offset=None, time_zone=None, geo_enabled=True, verified=True, statuses_count=45000, lang=None, contributors_enabled=False, is_translator=False, is_translation_enabled=True, profile_background_color='6D5C18', profile_background_image_url='http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https='https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile=True, profile_image_url='http://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_image_url_https='https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_normal.jpg', profile_banner_url='https://pbs.twimg.com/profile_banners/25073877/1560920145', profile_link_color='1B95E0', profile_sidebar_border_color='BDDCAD', profile_sidebar_fill_color='C5CEC0', profile_text_color='333333', profile_use_background_image=True, has_extended_profile=False, default_profile=False, default_profile_image=False, following=False, follow_request_sent=False, notifications=False, translator_type='regular'), geo=None, coordinates=None, place=None, contributors=None, is_quote_status=False, retweet_count=13687, favorite_count=52490, favorited=False, retweeted=False, lang='en')]
See Malafosse (2019): FastText sentiment analysis for tweets: A straightforward guide; pdf.
import json
tweets = []
for tw in new_tweets:
tweets.append(tw.text)
print(tweets)
['RT @senatemajldr: The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and across the…', 'The Greatest Witch Hunt in the history of the USA! https://t.co/6FW11oLBv3', 'RT @senatemajldr: The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Democrats…', 'Gasoline Prices in the State of California are MUCH HIGHER than anywhere else in the Nation ($2.50 vs. $4.50). I gu… https://t.co/HK3QJCIwqz', 'RT @RepMarkMeadows: Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwing a…', '....If there is a Runoff in Louisiana, you will have a great new Republican Governor who will Cut your Taxes and Ca… https://t.co/k2MjEi0AzB', 'Big Rally in Louisiana on Friday night. Must force a runoff with a Liberal Democrat Governor, John Bel Edwards, who… https://t.co/caYQNV2rEQ', 'This is just the beginning, thank you to @ByronYork! https://t.co/1ceplqe5MZ', 'The U.S. Border is SECURE! https://t.co/h9EPUPL1uS', '....In fact, the “Cops For Trump” T-shirt Web Site CRASHED because of incredible volume, but is now back up and run… https://t.co/ViBGfbd5bU', 'Radical Left Dem Mayor of Minneapolis, Jacob Frey, is doing everything possible to stifle Free Speech despite a rec… https://t.co/iYbQlIajvw', 'Friday night in Louisiana will be Great. Big crowd expected. Republicans must get out and vote for either of our tw… https://t.co/32ODeKyBYa', 'RT @bennyjohnson: Mahalet was born in Ethiopia.\nAbandoned by her parents, she lived as an impoverished orphan.\n\nMahalet was adopted by a lo…', 'Hasn’t Adam Schiff been fully discredited by now? Do we have to continue listening to his lies?', 'https://t.co/bh1FyxfUiA', 'Get your great T-Shirts, “Cops for Trump,” at https://t.co/pmhDDXsIlx REALLY NICE! Thank you to Minneapolis Police… https://t.co/34pPVxdxb5', 'Someone please tell the Radical Left Mayor of Minneapolis that he can’t price out Free Speech. Probably illegal! I… https://t.co/KAncmV8QwQ', 'Thank you to Lt. Bob Kroll of the great Minneapolis Police Department for your kind words on @foxandfriends. The Po… https://t.co/5XSdJ5uofn', 'I think that Crooked Hillary Clinton should enter the race to try and steal it away from Uber Left Elizabeth Warren… https://t.co/KwhW2ge0Kp', '....to see. Importantly, Ambassador Sondland’s tweet, which few report, stated, “I believe you are incorrect about… https://t.co/4qtYbM0kH6']
#Cleaner display
df_tweets = pd.DataFrame(tweets)
df_tweets
0 | |
---|---|
0 | RT @senatemajldr: The time for excuses is over... |
1 | The Greatest Witch Hunt in the history of the ... |
2 | RT @senatemajldr: The USMCA would create 176,0... |
3 | Gasoline Prices in the State of California are... |
4 | RT @RepMarkMeadows: Reminder that while House ... |
5 | ....If there is a Runoff in Louisiana, you wil... |
6 | Big Rally in Louisiana on Friday night. Must f... |
7 | This is just the beginning, thank you to @Byro... |
8 | The U.S. Border is SECURE! https://t.co/h9EPUP... |
9 | ....In fact, the “Cops For Trump” T-shirt Web ... |
10 | Radical Left Dem Mayor of Minneapolis, Jacob F... |
11 | Friday night in Louisiana will be Great. Big c... |
12 | RT @bennyjohnson: Mahalet was born in Ethiopia... |
13 | Hasn’t Adam Schiff been fully discredited by n... |
14 | https://t.co/bh1FyxfUiA |
15 | Get your great T-Shirts, “Cops for Trump,” at ... |
16 | Someone please tell the Radical Left Mayor of ... |
17 | Thank you to Lt. Bob Kroll of the great Minnea... |
18 | I think that Crooked Hillary Clinton should en... |
19 | ....to see. Importantly, Ambassador Sondland’s... |
When using tweets, it may be a good idea to install the Twython library: "pip3 install -U nltk[twitter]" (You can also simply use pip instead of pip3.)
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
for tw in tweets:
print(tw)
print(sid.polarity_scores(tw))
RT @senatemajldr: The time for excuses is over. The USMCA needs to move this fall. Workers and small businesses in Kentucky and across the… {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} The Greatest Witch Hunt in the history of the USA! https://t.co/6FW11oLBv3 {'neg': 0.156, 'neu': 0.563, 'pos': 0.281, 'compound': 0.4574} RT @senatemajldr: The USMCA would create 176,000 jobs for American workers and generate $68 billion in wealth for America. House Democrats… {'neg': 0.0, 'neu': 0.782, 'pos': 0.218, 'compound': 0.6486} Gasoline Prices in the State of California are MUCH HIGHER than anywhere else in the Nation ($2.50 vs. $4.50). I gu… https://t.co/HK3QJCIwqz {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} RT @RepMarkMeadows: Reminder that while House Democrats have spent basically their entire first year as a majority this Congress throwing a… {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} ....If there is a Runoff in Louisiana, you will have a great new Republican Governor who will Cut your Taxes and Ca… https://t.co/k2MjEi0AzB {'neg': 0.083, 'neu': 0.754, 'pos': 0.163, 'compound': 0.4588} Big Rally in Louisiana on Friday night. Must force a runoff with a Liberal Democrat Governor, John Bel Edwards, who… https://t.co/caYQNV2rEQ {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} This is just the beginning, thank you to @ByronYork! https://t.co/1ceplqe5MZ {'neg': 0.0, 'neu': 0.763, 'pos': 0.237, 'compound': 0.4199} The U.S. Border is SECURE! https://t.co/h9EPUPL1uS {'neg': 0.0, 'neu': 0.593, 'pos': 0.407, 'compound': 0.5307} ....In fact, the “Cops For Trump” T-shirt Web Site CRASHED because of incredible volume, but is now back up and run… https://t.co/ViBGfbd5bU {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} Radical Left Dem Mayor of Minneapolis, Jacob Frey, is doing everything possible to stifle Free Speech despite a rec… https://t.co/iYbQlIajvw {'neg': 0.0, 'neu': 0.845, 'pos': 0.155, 'compound': 0.5106} Friday night in Louisiana will be Great. Big crowd expected. Republicans must get out and vote for either of our tw… https://t.co/32ODeKyBYa {'neg': 0.0, 'neu': 0.837, 'pos': 0.163, 'compound': 0.6249} RT @bennyjohnson: Mahalet was born in Ethiopia. Abandoned by her parents, she lived as an impoverished orphan. Mahalet was adopted by a lo… {'neg': 0.125, 'neu': 0.875, 'pos': 0.0, 'compound': -0.4588} Hasn’t Adam Schiff been fully discredited by now? Do we have to continue listening to his lies? {'neg': 0.298, 'neu': 0.702, 'pos': 0.0, 'compound': -0.7471} https://t.co/bh1FyxfUiA {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} Get your great T-Shirts, “Cops for Trump,” at https://t.co/pmhDDXsIlx REALLY NICE! Thank you to Minneapolis Police… https://t.co/34pPVxdxb5 {'neg': 0.0, 'neu': 0.53, 'pos': 0.47, 'compound': 0.925} Someone please tell the Radical Left Mayor of Minneapolis that he can’t price out Free Speech. Probably illegal! I… https://t.co/KAncmV8QwQ {'neg': 0.136, 'neu': 0.642, 'pos': 0.222, 'compound': 0.3164} Thank you to Lt. Bob Kroll of the great Minneapolis Police Department for your kind words on @foxandfriends. The Po… https://t.co/5XSdJ5uofn {'neg': 0.0, 'neu': 0.643, 'pos': 0.357, 'compound': 0.875} I think that Crooked Hillary Clinton should enter the race to try and steal it away from Uber Left Elizabeth Warren… https://t.co/KwhW2ge0Kp {'neg': 0.138, 'neu': 0.862, 'pos': 0.0, 'compound': -0.4939} ....to see. Importantly, Ambassador Sondland’s tweet, which few report, stated, “I believe you are incorrect about… https://t.co/4qtYbM0kH6 {'neg': 0.0, 'neu': 0.874, 'pos': 0.126, 'compound': 0.3182}
htag = '#Brexit'
tweets = []
for tw in tweepy.Cursor(api.search,q=htag).items(10):
tweets.append(tw.text)
scores = []
for tw in tweets:
print(tw)
score = sid.polarity_scores(tw)
scores.append(score)
print(score)
RT @gletherby: Johnson's blame game well and truly full steam ahead and supported by hideously offensive meme by Leave EU #NotInMyName I r… {'neg': 0.221, 'neu': 0.535, 'pos': 0.244, 'compound': 0.1779} RT @DidierDelmer: I ❤️ My Wife. She voted Leave #Brexit She looks after our family of #Brexiteers so well, while I work to pay rent and s… {'neg': 0.095, 'neu': 0.805, 'pos': 0.1, 'compound': 0.2827} Britain's proposals for @BorderIrish are 'beneath contempt' and a recipe for permanent division. @EamonDerry join… https://t.co/c0XiKH6bPp {'neg': 0.213, 'neu': 0.787, 'pos': 0.0, 'compound': -0.5859} RT @TreasuryMog: Update on current #Brexit status. https://t.co/LI1Zm0NOGi {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} RT @alexstubb: @FraserNelson @Telegraph And if I may add, it is rather sad that some are making their utmost to look for someone else to bl… {'neg': 0.114, 'neu': 0.886, 'pos': 0.0, 'compound': -0.4767} RT @seery_o: Can you believe this? My Cousin in Ireland is furious with #PritiPatel. In a #Brexit interview she said that the last thing th… {'neg': 0.139, 'neu': 0.861, 'pos': 0.0, 'compound': -0.5719} RT @CarolineFlintMP: I & 18 Labour colleagues have written to Jean Claude Junker & Donald Tusk urging the EU Commission, EU27 with the U.K.… {'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound': 0.0} John Major reveals that the price of Fortnite Costumes will increase by 22% in the event of CRASH OUT no deal Brexit #BREXIT {'neg': 0.202, 'neu': 0.716, 'pos': 0.082, 'compound': -0.516} Også rigtig god stemning i selve Storbritannien efter telefonsamtalen mellem Merkel og Johnson i går.. #Brexit… https://t.co/7N5pe0wZE8 {'neg': 0.0, 'neu': 0.87, 'pos': 0.13, 'compound': 0.2732} RT @SloughForEU: Johnson's constant bleating that we will leave on 31st October doesn't seem to be working as well as he hoped. Perhaps nob… {'neg': 0.045, 'neu': 0.781, 'pos': 0.175, 'compound': 0.5423}
df = pd.DataFrame(scores)
df
compound | neg | neu | pos | |
---|---|---|---|---|
0 | 0.1779 | 0.221 | 0.535 | 0.244 |
1 | 0.2827 | 0.095 | 0.805 | 0.100 |
2 | -0.5859 | 0.213 | 0.787 | 0.000 |
3 | 0.0000 | 0.000 | 1.000 | 0.000 |
4 | -0.4767 | 0.114 | 0.886 | 0.000 |
5 | -0.5719 | 0.139 | 0.861 | 0.000 |
6 | 0.0000 | 0.000 | 1.000 | 0.000 |
7 | -0.5160 | 0.202 | 0.716 | 0.082 |
8 | 0.2732 | 0.000 | 0.870 | 0.130 |
9 | 0.5423 | 0.045 | 0.781 | 0.175 |
x = ['neg','neu','pos']
bar(x, df[x].mean())
grid()
Let's read in the top news from the ET main page.
You also want to get SelectorGadget: http://selectorgadget.com/
import requests
from lxml.html import fromstring
#Copy the URL from the web site
url = 'https://economictimes.indiatimes.com'
html = requests.get(url, timeout=10).text
#See: http://infohost.nmt.edu/~shipman/soft/pylxml/web/etree-fromstring.html
doc = fromstring(html)
#http://lxml.de/cssselect.html#the-cssselect-method
doc.cssselect(".active")
[<Element li at 0x18d89a24e58>, <Element section at 0x18d89a24e08>, <Element h2 at 0x18d89a4ce08>, <Element li at 0x18d89a58048>, <Element li at 0x18d89a58098>, <Element div at 0x18d89a580e8>, <Element li at 0x18d89a58138>, <Element li at 0x18d89a58188>, <Element li at 0x18d89a581d8>, <Element span at 0x18d89a58228>, <Element span at 0x18d89a58278>, <Element span at 0x18d89a582c8>, <Element li at 0x18d89a58318>, <Element li at 0x18d89a58368>, <Element li at 0x18d89a583b8>, <Element li at 0x18d89a58408>, <Element li at 0x18d89a58458>, <Element li at 0x18d89a584a8>, <Element li at 0x18d89a584f8>, <Element li at 0x18d89a58548>, <Element li at 0x18d89a58598>, <Element a at 0x18d89a585e8>, <Element a at 0x18d89a58638>, <Element li at 0x18d89a58688>, <Element li at 0x18d89a586d8>, <Element li at 0x18d89a58728>]
x = doc.cssselect(".active li") #Try a, h2, section if you like
headlines = [x[j].text_content() for j in range(len(x))]
headlines = headlines[:20] #Needed to exclude any other stuff that was not needed.
print(headlines)
["RCom set to make history but Ambanis won't like it", "PMC's HDIL loan stands at Rs 6,500 crore", "'MTech fee hiked to discourage non-serious students'", 'Boston to host conference on contributions of Hindus', 'Minor planet named after Indian musician Pandit Jasraj', 'Starship could fly people next year: Elon Musk', 'WhatsApp to stop working on these iPhones from 2020', 'Realtors slash ad spends by over 50% as sales plunge', 'IRCTC offers attractive prospects going forward', "Lessons to learn from Masayoshi Son's latest sermon", 'China harvesting organs from minorities: Activists', 'Grofers to add 700 kirana stores onto network', 'China to send its top trade negotiator to US for talks', "The unsung hero of India's aviation story", 'JSPL to reduce debt by over Rs 10,000 crore', 'Govt to set up working group on new industrial policy', 'Delhi-Katra Vande Bharat Express to start from Oct 5', 'White goods firms see good sales in festive season', 'Ad: Blockbuster Deals on Clothing, Shoes & More', 'There should be just 3 GST rates: Bibek Debroy']
#Sentiment scoring
## Here we will read in an entire dictionary from Harvard Inquirer
f = open('DSTMAA_data/inqdict.txt')
HIDict = f.read()
HIDict = HIDict.splitlines()
HIDict = HIDict[1:]
print(HIDict[:5])
print(len(HIDict))
#Extract all the lines that contain the Pos tag
poswords = [j for j in HIDict if "Pos" in j] #using a list comprehension
poswords = [j.split()[0] for j in poswords]
poswords = [j.split("#")[0] for j in poswords]
poswords = unique(poswords)
poswords = [j.lower() for j in poswords]
print(poswords[:20])
print(len(poswords))
#Extract all the lines that contain the Neg tag
negwords = [j for j in HIDict if "Neg" in j] #using a list comprehension
negwords = [j.split()[0] for j in negwords]
negwords = [j.split("#")[0] for j in negwords]
negwords = unique(negwords)
negwords = [j.lower() for j in negwords]
print(negwords[:20])
print(len(negwords))
['A H4Lvd DET ART | article: Indefinite singular article--some or any one', 'ABANDON H4Lvd Neg Ngtv Weak Fail IAV AFFLOSS AFFTOT SUPV |', 'ABANDONMENT H4 Neg Weak Fail Noun |', 'ABATE H4Lvd Neg Psv Decr IAV TRANS SUPV |', 'ABATEMENT Lvd Noun '] 11895 ['abide', 'able', 'abound', 'absolve', 'absorbent', 'absorption', 'abundance', 'abundant', 'accede', 'accentuate', 'accept', 'acceptable', 'acceptance', 'accessible', 'accession', 'acclaim', 'acclamation', 'accolade', 'accommodate', 'accommodation'] 1646 ['abandon', 'abandonment', 'abate', 'abdicate', 'abhor', 'abject', 'abnormal', 'abolish', 'abominable', 'abrasive', 'abrupt', 'abscond', 'absence', 'absent', 'absent-minded', 'absentee', 'absurd', 'absurdity', 'abuse', 'abyss'] 2120
#Create a sentiment scoring function
def textSentiment(text,poswords,negwords):
text.lower(); print(text)
text = text.split(' ')
posmatches = set(text).intersection(set(poswords)); print(posmatches)
negmatches = set(text).intersection(set(negwords)); print(negmatches)
return [len(posmatches),len(negmatches)]
for h in headlines:
s = textSentiment(h,poswords,negwords)
print(s)
RCom set to make history but Ambanis won't like it {'make', 'like'} {"won't", 'make'} [2, 2] PMC's HDIL loan stands at Rs 6,500 crore set() set() [0, 0] 'MTech fee hiked to discourage non-serious students' set() {'discourage'} [0, 1] Boston to host conference on contributions of Hindus set() set() [0, 0] Minor planet named after Indian musician Pandit Jasraj set() set() [0, 0] Starship could fly people next year: Elon Musk set() set() [0, 0] WhatsApp to stop working on these iPhones from 2020 set() set() [0, 0] Realtors slash ad spends by over 50% as sales plunge set() {'slash'} [0, 1] IRCTC offers attractive prospects going forward {'forward', 'attractive'} set() [2, 0] Lessons to learn from Masayoshi Son's latest sermon {'learn'} set() [1, 0] China harvesting organs from minorities: Activists set() set() [0, 0] Grofers to add 700 kirana stores onto network set() set() [0, 0] China to send its top trade negotiator to US for talks set() set() [0, 0] The unsung hero of India's aviation story {'hero'} set() [1, 0] JSPL to reduce debt by over Rs 10,000 crore set() set() [0, 0] Govt to set up working group on new industrial policy set() set() [0, 0] Delhi-Katra Vande Bharat Express to start from Oct 5 set() set() [0, 0] White goods firms see good sales in festive season {'festive', 'good'} set() [2, 0] Ad: Blockbuster Deals on Clothing, Shoes & More set() set() [0, 0] There should be just 3 GST rates: Bibek Debroy {'just'} set() [1, 0]
import string
def removePuncStr(s):
for c in string.punctuation:
s = s.replace(c," ")
return s
def removePunc(text_array):
return [removePuncStr(h) for h in text_array]
headlines = removePunc(headlines)
headlines
['RCom set to make history but Ambanis won t like it', 'PMC s HDIL loan stands at Rs 6 500 crore', ' MTech fee hiked to discourage non serious students ', 'Boston to host conference on contributions of Hindus', 'Minor planet named after Indian musician Pandit Jasraj', 'Starship could fly people next year Elon Musk', 'WhatsApp to stop working on these iPhones from 2020', 'Realtors slash ad spends by over 50 as sales plunge', 'IRCTC offers attractive prospects going forward', 'Lessons to learn from Masayoshi Son s latest sermon', 'China harvesting organs from minorities Activists', 'Grofers to add 700 kirana stores onto network', 'China to send its top trade negotiator to US for talks', 'The unsung hero of India s aviation story', 'JSPL to reduce debt by over Rs 10 000 crore', 'Govt to set up working group on new industrial policy', 'Delhi Katra Vande Bharat Express to start from Oct 5', 'White goods firms see good sales in festive season', 'Ad Blockbuster Deals on Clothing Shoes More', 'There should be just 3 GST rates Bibek Debroy']
def removeNumbersStr(s):
for c in range(10):
n = str(c)
s = s.replace(n," ")
return s
def removeNumbers(text_array):
return [removeNumbersStr(h) for h in text_array]
headlines = removeNumbers(headlines)
headlines
['RCom set to make history but Ambanis won t like it', 'PMC s HDIL loan stands at Rs crore', ' MTech fee hiked to discourage non serious students ', 'Boston to host conference on contributions of Hindus', 'Minor planet named after Indian musician Pandit Jasraj', 'Starship could fly people next year Elon Musk', 'WhatsApp to stop working on these iPhones from ', 'Realtors slash ad spends by over as sales plunge', 'IRCTC offers attractive prospects going forward', 'Lessons to learn from Masayoshi Son s latest sermon', 'China harvesting organs from minorities Activists', 'Grofers to add kirana stores onto network', 'China to send its top trade negotiator to US for talks', 'The unsung hero of India s aviation story', 'JSPL to reduce debt by over Rs crore', 'Govt to set up working group on new industrial policy', 'Delhi Katra Vande Bharat Express to start from Oct ', 'White goods firms see good sales in festive season', 'Ad Blockbuster Deals on Clothing Shoes More', 'There should be just GST rates Bibek Debroy']
from nltk.stem import PorterStemmer
from nltk.tokenize import sent_tokenize, word_tokenize
def stemText(text_array):
stemmed_text = []
for h in text_array:
words = word_tokenize(h)
h2 = ''
for w in words:
h2 = h2 + ' ' + PorterStemmer().stem(w)
stemmed_text.append(h2)
return stemmed_text
stemmed_headlines = stemText(headlines)
stemmed_headlines
[' rcom set to make histori but ambani won t like it', ' pmc s hdil loan stand at Rs crore', ' mtech fee hike to discourag non seriou student', ' boston to host confer on contribut of hindu', ' minor planet name after indian musician pandit jasraj', ' starship could fli peopl next year elon musk', ' whatsapp to stop work on these iphon from', ' realtor slash ad spend by over as sale plung', ' irctc offer attract prospect go forward', ' lesson to learn from masayoshi son s latest sermon', ' china harvest organ from minor activist', ' grofer to add kirana store onto network', ' china to send it top trade negoti to US for talk', ' the unsung hero of india s aviat stori', ' jspl to reduc debt by over Rs crore', ' govt to set up work group on new industri polici', ' delhi katra vand bharat express to start from oct', ' white good firm see good sale in festiv season', ' Ad blockbust deal on cloth shoe more', ' there should be just gst rate bibek debroy']
Reference: https://pythonprogramming.net/stop-words-nltk-tutorial/
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
def stopText(text_array):
stop_words = set(stopwords.words('english'))
stopped_text = []
for h in text_array:
words = word_tokenize(h)
h2 = ''
for w in words:
if w not in stop_words:
h2 = h2 + ' ' + w
stopped_text.append(h2)
return stopped_text
stopped_headlines = stopText(headlines)
stopped_headlines
[' RCom set make history Ambanis like', ' PMC HDIL loan stands Rs crore', ' MTech fee hiked discourage non serious students', ' Boston host conference contributions Hindus', ' Minor planet named Indian musician Pandit Jasraj', ' Starship could fly people next year Elon Musk', ' WhatsApp stop working iPhones', ' Realtors slash ad spends sales plunge', ' IRCTC offers attractive prospects going forward', ' Lessons learn Masayoshi Son latest sermon', ' China harvesting organs minorities Activists', ' Grofers add kirana stores onto network', ' China send top trade negotiator US talks', ' The unsung hero India aviation story', ' JSPL reduce debt Rs crore', ' Govt set working group new industrial policy', ' Delhi Katra Vande Bharat Express start Oct', ' White goods firms see good sales festive season', ' Ad Blockbuster Deals Clothing Shoes More', ' There GST rates Bibek Debroy']
def write2textfile(s,filename):
text_file = open(filename, "w")
text_file.write(s)
text_file.close()
os.system('mkdir CTEXT')
j = 0
for h in headlines:
j = j + 1
fname = "CTEXT/" + str(j) + ".ctxt" #using "ctxt" to denote a corpus related file
write2textfile(h,fname)
#Read in the corpus
import nltk
from nltk.corpus import PlaintextCorpusReader
corpus_root = 'CTEXT/'
ctext = PlaintextCorpusReader(corpus_root, '.*')
ctext
<PlaintextCorpusReader in 'C:\\Users\\srdas\\Google Drive\\Books_Writings\\ML_Book\\CTEXT'>
ctext.fileids()[:6]
['1.ctxt', '10.ctxt', '11.ctxt', '12.ctxt', '13.ctxt', '14.ctxt']
ctext.words('1.ctxt')
['RCom', 'set', 'to', 'make', 'history', 'but', ...]
ctext.words('2.ctxt')
['PMC', 's', 'HDIL', 'loan', 'stands', 'at', 'Rs', ...]
nb_setup.images_hconcat(["DSTMAA_images/tdm.png"], width=500)
from sklearn.feature_extraction.text import CountVectorizer
docs = headlines
vec = CountVectorizer()
X = vec.fit_transform(docs)
df = pd.DataFrame(X.toarray(), columns=vec.get_feature_names())
tdm = df.T
print(tdm.info())
print(tdm)
<class 'pandas.core.frame.DataFrame'> Index: 136 entries, activists to year Data columns (total 20 columns): 0 136 non-null int64 1 136 non-null int64 2 136 non-null int64 3 136 non-null int64 4 136 non-null int64 5 136 non-null int64 6 136 non-null int64 7 136 non-null int64 8 136 non-null int64 9 136 non-null int64 10 136 non-null int64 11 136 non-null int64 12 136 non-null int64 13 136 non-null int64 14 136 non-null int64 15 136 non-null int64 16 136 non-null int64 17 136 non-null int64 18 136 non-null int64 19 136 non-null int64 dtypes: int64(20) memory usage: 22.3+ KB None 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \ activists 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 ad 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 add 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 after 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 ambanis 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 as 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 at 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 attractive 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 aviation 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 be 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bharat 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bibek 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 blockbuster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 boston 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 but 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 by 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 china 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 clothing 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 conference 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 contributions 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 could 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 crore 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 deals 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 debroy 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 debt 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 delhi 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 discourage 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 elon 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 express 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fee 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ... .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. sermon 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 set 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 shoes 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 should 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 slash 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 son 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 spends 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 stands 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 starship 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 start 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 stop 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 stores 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 story 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 students 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 talks 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 the 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 there 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 these 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 to 1 0 1 1 0 0 1 0 0 1 0 1 2 0 1 1 top 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 trade 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 unsung 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 up 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 us 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 vande 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 whatsapp 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 white 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 won 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 working 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 year 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 16 17 18 19 activists 0 0 0 0 ad 0 0 1 0 add 0 0 0 0 after 0 0 0 0 ambanis 0 0 0 0 as 0 0 0 0 at 0 0 0 0 attractive 0 0 0 0 aviation 0 0 0 0 be 0 0 0 1 bharat 1 0 0 0 bibek 0 0 0 1 blockbuster 0 0 1 0 boston 0 0 0 0 but 0 0 0 0 by 0 0 0 0 china 0 0 0 0 clothing 0 0 1 0 conference 0 0 0 0 contributions 0 0 0 0 could 0 0 0 0 crore 0 0 0 0 deals 0 0 1 0 debroy 0 0 0 1 debt 0 0 0 0 delhi 1 0 0 0 discourage 0 0 0 0 elon 0 0 0 0 express 1 0 0 0 fee 0 0 0 0 ... .. .. .. .. sermon 0 0 0 0 set 0 0 0 0 shoes 0 0 1 0 should 0 0 0 1 slash 0 0 0 0 son 0 0 0 0 spends 0 0 0 0 stands 0 0 0 0 starship 0 0 0 0 start 1 0 0 0 stop 0 0 0 0 stores 0 0 0 0 story 0 0 0 0 students 0 0 0 0 talks 0 0 0 0 the 0 0 0 0 there 0 0 0 1 these 0 0 0 0 to 1 0 0 0 top 0 0 0 0 trade 0 0 0 0 unsung 0 0 0 0 up 0 0 0 0 us 0 0 0 0 vande 1 0 0 0 whatsapp 0 0 0 0 white 0 1 0 0 won 0 0 0 0 working 0 0 0 0 year 0 0 0 0 [136 rows x 20 columns]
This is a weighting scheme provided to sharpen the importance of rare words in a document, relative to the frequency of these words in the corpus. It is based on simple calculations and even though it does not have strong theoretical foundations, it is still very useful in practice. The TF-IDF is the importance of a word w in a document d in a corpus C. Therefore it is a function of all these three, i.e., we write it as $TFIDF(w,d,C)$, and is the product of term frequency (TF) and inverse document frequency (IDF).
The frequency of a word in a document is defined as
$$ f(w,d)=\frac{\#w \in d}{|d|} $$where $|d|$ is the number of words in the document. We usually normalize word frequency so that
$$ TF(w,d)=ln[f(w,d)] $$This is log normalization. Another form of normalization is known as double normalization and is as follows:
$$ TF(w,d)=\frac{1}{2} + \frac{1}{2} \cdot \frac{f(w,d)}{\max_{w \in d} f(w,d)} $$Note that normalization is not necessary, but it tends to help shrink the difference between counts of words.
Inverse document frequency is as follows:
$$ IDF(w,C)=\ln\left[\frac{|C|}{|d_{w \in d}|}\right] $$That is, we compute the ratio of the number of documents in the corpus $C$ divided by the number of documents with word $w$ in the corpus.
Finally, we have the weighting score for a given word $w$ in document $d$ in corpus $C$:
$$ TFIDF(w,d,C)=TF(w,d) \times IDF(w,C) $$from sklearn.feature_extraction.text import TfidfVectorizer
tfidf = TfidfVectorizer(headlines)
tfs = tfidf.fit_transform(headlines)
tfs
<20x136 sparse matrix of type '<class 'numpy.float64'>' with 161 stored elements in Compressed Sparse Row format>
# Make TDM
tdm_mat = tfs.toarray().T
print(tdm_mat.shape)
tdm_mat
(136, 20)
array([[0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0.35019127, 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], ..., [0.33307305, 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ], [0. , 0. , 0. , ..., 0. , 0. , 0. ]])
text = ''
for h in headlines:
text = text + ' ' + h
print(text)
RCom set to make history but Ambanis won t like it PMC s HDIL loan stands at Rs crore MTech fee hiked to discourage non serious students Boston to host conference on contributions of Hindus Minor planet named after Indian musician Pandit Jasraj Starship could fly people next year Elon Musk WhatsApp to stop working on these iPhones from Realtors slash ad spends by over as sales plunge IRCTC offers attractive prospects going forward Lessons to learn from Masayoshi Son s latest sermon China harvesting organs from minorities Activists Grofers to add kirana stores onto network China to send its top trade negotiator to US for talks The unsung hero of India s aviation story JSPL to reduce debt by over Rs crore Govt to set up working group on new industrial policy Delhi Katra Vande Bharat Express to start from Oct White goods firms see good sales in festive season Ad Blockbuster Deals on Clothing Shoes More There should be just GST rates Bibek Debroy
from wordcloud import WordCloud
wordcloud = WordCloud().generate(text)
#Use pyplot from matplotlib
figure(figsize=(20,10))
pyplot.imshow(wordcloud, interpolation='bilinear')
pyplot.axis("off")
(-0.5, 399.5, 199.5, -0.5)
In this segment we will learn some popular functions on text that are used in practice. One of the first things we like to do is to find similar text or like sentences (think of web search as one application). Since documents are vectors in the TDM, we may want to find the closest vectors or compute the distance between vectors.
$$ \cos(\theta) = \frac{A \cdot B}{||A|| \cdot ||B||} $$where $||A|| = \sqrt{A \cdot A}$, is the dot product of $A$ with itself, also known as the norm of $A$. This gives the cosine of the angle between the two vectors and is zero for orthogonal vectors and 1 for identical vectors.
#COSINE DISTANCE OR SIMILARITY
A = array([0,3,4,1,7,0,1])
B = array([0,4,3,0,6,1,1])
cos = A.dot(B)/(sqrt(A.dot(A)) * sqrt(B.dot(B)))
print('Cosine similarity = ',cos)
#Using sklearn
from sklearn.metrics.pairwise import cosine_similarity
cosine_similarity([A, B], dense_output=True)
Cosine similarity = 0.9682727993019339
array([[1. , 0.9682728], [0.9682728, 1. ]])
Or, how to grade text!
In recent years, the SAT exams added a new essay section. While the test aimed at assessing original writing, it also introduced automated grading. A goal of the test is to assess the writing level of the student. This is associated with the notion of readability.
“Readability” is a metric of how easy it is to comprehend text. Given a goal of efficient markets, regulators want to foster transparency by making sure financial documents that are disseminated to the investing public are readable. Hence, metrics for readability are very important and are recently gaining traction.
Gunning (1952) developed the Fog index. The index estimates the years of formal education needed to understand text on a first reading. A fog index of 12 requires the reading level of a U.S. high school senior (around 18 years old). The index is based on the idea that poor readability is associated with longer sentences and complex words. Complex words are those that have more than two syllables. The formula for the Fog index is
$$ 0.4 \left[\frac{\#words}{\#sentences} + 100 \cdot \frac{\#complex words}{\#words} \right] $$Alternative readability scores use similar ideas. The Flesch Reading Ease Score and the Flesch-Kincaid Grade Level also use counts of words, syllables, and sentences. See http://en.wikipedia.org/wiki/Flesch-Kincaid_readability_tests. The Flesch Reading Ease Score is defined as
$$ 206.835−1.015 \cdot \frac{\#words}{\#sentences} − 84.6 \cdot \frac{\#syllables}{\#words} $$With a range of 90-100 easily accessible by a 11-year old, 60-70 being easy to understand for 13-15 year olds, and 0-30 for university graduates.
This is defined as
$$ 0.39 \cdot \frac{\#words}{\#sentences} + 11.8 \cdot \frac{\#syllables}{\#words} − 15.59 $$which gives a number that corresponds to the grade level. As expected these two measures are negatively correlated. Various other measures of readability use the same ideas as in the Fog index. For example the Coleman and Liau (1975) index does not even require a count of syllables, as follows:
$$ CLI=0.0588L−0.296S−15.8 $$where $L$ is the average number of letters per hundred words and $S$ is the average number of sentences per hundred words.
Standard readability metrics may not work well for financial text. Loughran and McDonald (2014) find that the Fog index is inferior to simply looking at 10-K file size.
References
M. Coleman and T. L. Liau. (1975). A computer readability formula designed for machine scoring. Journal of Applied Psychology 60, 283-284.
T. Loughran and W. McDonald, (2014). Measuring readability in financial disclosures, The Journal of Finance 69, 1643-1671.
R package koRpus for readability scoring here. http://www.inside-r.org/packages/cran/koRpus/docs/readability
First, let’s grab some text from my web site.
%%R
library(rvest)
url = "http://srdas.github.io/bio-candid.html"
doc.html = read_html(url)
text = doc.html %>% html_nodes("p") %>% html_text()
text = gsub("[\t\n]"," ",text)
text = gsub('"'," ",text) #removes single backslash
text = paste(text, collapse=" ")
print(text)
[1] " Sanjiv Das: A Short Academic Life History After loafing and working in many parts of Asia, but never really growing up, Sanjiv moved to New York to change the world, hopefully through research. He graduated in 1994 with a Ph.D. from NYU, and since then spent five years in Boston, and now lives in San Jose, California. Sanjiv loves animals, places in the world where the mountains meet the sea, riding sport motorbikes, reading, gadgets, science fiction movies, and writing cool software code. When there is time available from the excitement of daily life, Sanjiv writes academic papers, which helps him relax. Always the contrarian, Sanjiv thinks that New York City is the most calming place in the world, after California of course. Sanjiv is now a Professor of Finance at Santa Clara University. He came to SCU from Harvard Business School and spent a year at UC Berkeley. In his past life in the unreal world, Sanjiv worked at Citibank, N.A. in the Asia-Pacific region. He takes great pleasure in merging his many previous lives into his current existence, which is incredibly confused and diverse. Sanjiv's research style is instilled with a distinct New York state of mind - it is chaotic, diverse, with minimal method to the madness. He has published articles on derivatives, term-structure models, mutual funds, the internet, portfolio choice, banking models, credit risk, and has unpublished articles in many other areas. Some years ago, he took time off to get another degree in computer science at Berkeley, confirming that an unchecked hobby can quickly become an obsession. There he learnt about the fascinating field of Randomized Algorithms, skills he now applies earnestly to his editorial work, and other pursuits, many of which stem from being in the epicenter of Silicon Valley. Coastal living did a lot to mold Sanjiv, who needs to live near the ocean. The many walks in Greenwich village convinced him that there is no such thing as a representative investor, yet added many unique features to his personal utility function. He learnt that it is important to open the academic door to the ivory tower and let the world in. Academia is a real challenge, given that he has to reconcile many more opinions than ideas. He has been known to have turned down many offers from Mad magazine to publish his academic work. As he often explains, you never really finish your education - you can check out any time you like, but you can never leave. Which is why he is doomed to a lifetime in Hotel California. And he believes that, if this is as bad as it gets, life is really pretty good. "
%%R
# install the language support package for the first time
#install.koRpus.lang("en")
# load the package
library(koRpus.lang.en)
%%R
library(koRpus)
write(text,file="textvec.txt")
#text_tokens = tokenize("textvec.txt",tag=FALSE)
text_tokens = tokenize("textvec.txt",lang="en")
print(text_tokens)
print(c("Number of sentences: ",text_tokens@desc$sentences))
token tag lemma lttr wclass 1 Sanjiv word.kRp 6 word 2 Das word.kRp 3 word 3 : .kRp 1 fullstop 4 A word.kRp 1 word 5 Short word.kRp 5 word 6 Academic word.kRp 8 word [...] 508 life word.kRp 4 word 509 is word.kRp 2 word 510 really word.kRp 6 word 511 pretty word.kRp 6 word 512 good word.kRp 4 word 513 . .kRp 1 fullstop desc stop stem 1 Word (kRp internal) <NA> <NA> 2 Word (kRp internal) <NA> <NA> 3 Sentence ending punctuation (kRp internal) <NA> <NA> 4 Word (kRp internal) <NA> <NA> 5 Word (kRp internal) <NA> <NA> 6 Word (kRp internal) <NA> <NA> 508 Word (kRp internal) <NA> <NA> 509 Word (kRp internal) <NA> <NA> 510 Word (kRp internal) <NA> <NA> 511 Word (kRp internal) <NA> <NA> 512 Word (kRp internal) <NA> <NA> 513 Sentence ending punctuation (kRp internal) <NA> <NA> [1] "Number of sentences: " "24"
%%R
print(readability(text_tokens))
|======================================================================| 100% Automated Readability Index (ARI) Parameters: default Grade: 9.88 Coleman-Liau Parameters: default ECP: 47% (estimted cloze percentage) Grade: 10.09 Grade: 10.1 (short formula) Danielson-Bryan Parameters: default DB1: 7.63 DB2: 48.67 Grade: 9-12 Dickes-Steiwer's Handformel Parameters: default TTR: 0.58 Score: 42.76 Easy Listening Formula Parameters: default Exsyls: 149 Score: 6.21 Farr-Jenkins-Paterson Parameters: default RE: 56.1 Grade: >= 10 (high school) Flesch Reading Ease Parameters: en (Flesch) RE: 59.75 Grade: >= 10 (high school) Flesch-Kincaid Grade Level Parameters: default Grade: 9.54 Age: 14.54 Gunning Frequency of Gobbledygook (FOG) Parameters: default Grade: 12.55 FORCAST Parameters: default Grade: 10.01 Age: 15.01 Fucks' Stilcharakteristik Score: 86.88 Grade: 9.32 Linsear Write Parameters: default Easy words: 87 Hard words: 13 Grade: 11.71 Error in callback <bound method RWinOutWatcher.post_execute of <RWinOut.RWinOutWatcher object at 0x0000018DF90296A0>> (for post_execute):
--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) ~\Google Drive\Books_Writings\ML_Book\RWinOut.py in post_execute(self) 13 self.printROut = False 14 __RROUT__ = robjects.r['..RROUT..'] ---> 15 for line in __RROUT__: 16 print(line) 17 ~\Anaconda3\lib\site-packages\rpy2-2.9.4-py3.6-win-amd64.egg\rpy2\robjects\vectors.py in __getitem__(self, i) 273 274 def __getitem__(self, i): --> 275 res = super(Vector, self).__getitem__(i) 276 277 if isinstance(res, Sexp): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 1: invalid continuation byte
A document $D$ is comprised of $m$ sentences $s_i,i=1,2,...,m$, where each $s_i$ is a set of words. We compute the pairwise overlap between sentences using the Jaccard similarity index:
$$ J_{ij} = J(s_i,s_j)=\frac{|s_i \cap s_j|}{|s_i \cup s_j|} = J_{ji} $$The overlap is the ratio of the size of the intersect of the two word sets in sentences $s_i$ and $s_j$, divided by the size of the union of the two sets. The similarity score of each sentence is computed as the row sums of the Jaccard similarity matrix.
$$ S_i=\sum_{j=1}^m J_{ij} $$Once the row sums are obtained, they are sorted and the summary is the first $n$ sentences based on the $S_i$ values.
%%R
# FUNCTION TO RETURN n SENTENCE SUMMARY
# Input: array of sentences (text)
# Output: n most common intersecting sentences
text_summary = function(text, n) {
m = length(text) # No of sentences in input
jaccard = matrix(0,m,m) #Store match index
for (i in 1:m) {
for (j in i:m) {
a = text[i]; aa = unlist(strsplit(a," "))
b = text[j]; bb = unlist(strsplit(b," "))
jaccard[i,j] = length(intersect(aa,bb))/
length(union(aa,bb))
jaccard[j,i] = jaccard[i,j]
}
}
similarity_score = rowSums(jaccard)
res = sort(similarity_score, index.return=TRUE,
decreasing=TRUE)
idx = res$ix[1:n]
summary = text[idx]
}
%%R
library(tm)
library(stringr)
#READ IN TEXT FOR ANALYSIS, PUT IT IN A CORPUS, OR ARRAY, OR FLAT STRING
#cstem=1, if stemming needed
#cstop=1, if stopwords to be removed
#ccase=1 for lower case, ccase=2 for upper case
#cpunc=1, if punctuation to be removed
#cflat=1 for flat text wanted, cflat=2 if text array, else returns corpus
read_web_page = function(url,cstem=0,cstop=0,ccase=0,cpunc=0,cflat=0) {
text = readLines(url)
text = text[setdiff(seq(1,length(text)),grep("<",text))]
text = text[setdiff(seq(1,length(text)),grep(">",text))]
text = text[setdiff(seq(1,length(text)),grep("]",text))]
text = text[setdiff(seq(1,length(text)),grep("}",text))]
text = text[setdiff(seq(1,length(text)),grep("_",text))]
text = text[setdiff(seq(1,length(text)),grep("\\/",text))]
ctext = Corpus(VectorSource(text))
if (cstem==1) { ctext = tm_map(ctext, stemDocument) }
if (cstop==1) { ctext = tm_map(ctext, removeWords, stopwords("english"))}
if (cpunc==1) { ctext = tm_map(ctext, removePunctuation) }
if (ccase==1) { ctext = tm_map(ctext, tolower) }
if (ccase==2) { ctext = tm_map(ctext, toupper) }
text = ctext
#CONVERT FROM CORPUS IF NEEDED
if (cflat>0) {
text = NULL
for (j in 1:length(ctext)) {
temp = ctext[[j]]$content
if (temp!="") { text = c(text,temp) }
}
text = as.array(text)
}
if (cflat==1) {
text = paste(text,collapse="\n")
text = str_replace_all(text, "[\r\n]" , " ")
}
result = text
}
We will use a sample of text that I took from Bloomberg news. It is about the need for data scientists.
%%R
url = "DSTMAA_data/dstext_sample.txt" #You can put any text file or URL here
text = read_web_page(url,cstem=0,cstop=0,ccase=0,cpunc=0,cflat=1)
print(length(text[[1]]))
[1] 1
%%R
print(text)
Error in callback <bound method RWinOutWatcher.post_execute of <RWinOut.RWinOutWatcher object at 0x0000018DF90296A0>> (for post_execute):
--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) ~\Google Drive\Books_Writings\ML_Book\RWinOut.py in post_execute(self) 13 self.printROut = False 14 __RROUT__ = robjects.r['..RROUT..'] ---> 15 for line in __RROUT__: 16 print(line) 17 ~\Anaconda3\lib\site-packages\rpy2-2.9.4-py3.6-win-amd64.egg\rpy2\robjects\vectors.py in __getitem__(self, i) 273 274 def __getitem__(self, i): --> 275 res = super(Vector, self).__getitem__(i) 276 277 if isinstance(res, Sexp): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 55: invalid continuation byte
%%R
text2 = strsplit(text,". ",fixed=TRUE) #Special handling of the period.
text2 = text2[[1]]
print(text2)
%%R
res = text_summary(text2,5)
print(res)
Error in callback <bound method RWinOutWatcher.post_execute of <RWinOut.RWinOutWatcher object at 0x0000018DF90296A0>> (for post_execute):
--------------------------------------------------------------------------- UnicodeDecodeError Traceback (most recent call last) ~\Google Drive\Books_Writings\ML_Book\RWinOut.py in post_execute(self) 13 self.printROut = False 14 __RROUT__ = robjects.r['..RROUT..'] ---> 15 for line in __RROUT__: 16 print(line) 17 ~\Anaconda3\lib\site-packages\rpy2-2.9.4-py3.6-win-amd64.egg\rpy2\robjects\vectors.py in __getitem__(self, i) 273 274 def __getitem__(self, i): --> 275 res = super(Vector, self).__getitem__(i) 276 277 if isinstance(res, Sexp): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 33: invalid continuation byte
https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/packages/corpora/reuters.zip
The Reuters-21578 benchmark corpus, ApteMod
id: reuters; size: 6378691; author: ; copyright: ; license: The copyright for the text of newswire articles and Reuters annotations in the Reuters-21578 collection resides with Reuters Ltd. Reuters Ltd. and Carnegie Group, Inc. have agreed to allow the free distribution of this data for research purposes only. If you publish results based on this data set, please acknowledge its use, refer to the data set by the name 'Reuters-21578, Distribution 1.0', and inform your readers of the current location of the data set.;
#Read in the corpus
import nltk
from nltk.corpus import PlaintextCorpusReader
corpus_root = 'reuters/training/'
ctext = PlaintextCorpusReader(corpus_root, '.*')
%%time
#How many docs, paragraphs, sentences, words, characters?
print(len(ctext.fileids()))
print(len(ctext.paras()))
print(len(ctext.sents()))
print(len(ctext.words()))
print(len(ctext.raw()))
7768 8470 40276 1253599 6478128 Wall time: 1min 46s
#Convert corpus to text array with a full string for each doc
def merge_arrays(word_lists):
wordlist = []
for wl in word_lists:
wordlist = wordlist + wl
doc = ' '.join(wordlist)
return doc
#Run this through the corpus to get a word array for each doc
text_array = []
for p in ctext.paras():
doc = merge_arrays(p)
text_array.append(doc)
#Show the array sample
print(len(text_array))
text_array[:2]
8470
['BAHIA COCOA REVIEW Showers continued throughout the week in the Bahia cocoa zone , alleviating the drought since early January and improving prospects for the coming temporao , although normal humidity levels have not been restored , Comissaria Smith said in its weekly review . The dry period means the temporao will be late this year . Arrivals for the week ended February 22 were 155 , 221 bags of 60 kilos making a cumulative total for the season of 5 . 93 mln against 5 . 81 at the same stage last year . Again it seems that cocoa delivered earlier on consignment was included in the arrivals figures . Comissaria Smith said there is still some doubt as to how much old crop cocoa is still available as harvesting has practically come to an end . With total Bahia crop estimates around 6 . 4 mln bags and sales standing at almost 6 . 2 mln there are a few hundred thousand bags still in the hands of farmers , middlemen , exporters and processors . There are doubts as to how much of this cocoa would be fit for export as shippers are now experiencing dificulties in obtaining + Bahia superior + certificates . In view of the lower quality over recent weeks farmers have sold a good part of their cocoa held on consignment . Comissaria Smith said spot bean prices rose to 340 to 350 cruzados per arroba of 15 kilos . Bean shippers were reluctant to offer nearby shipment and only limited sales were booked for March shipment at 1 , 750 to 1 , 780 dlrs per tonne to ports to be named . New crop sales were also light and all to open ports with June / July going at 1 , 850 and 1 , 880 dlrs and at 35 and 45 dlrs under New York july , Aug / Sept at 1 , 870 , 1 , 875 and 1 , 880 dlrs per tonne FOB . Routine sales of butter were made . March / April sold at 4 , 340 , 4 , 345 and 4 , 350 dlrs . April / May butter went at 2 . 27 times New York May , June / July at 4 , 400 and 4 , 415 dlrs , Aug / Sept at 4 , 351 to 4 , 450 dlrs and at 2 . 27 and 2 . 28 times New York Sept and Oct / Dec at 4 , 480 dlrs and 2 . 27 times New York Dec , Comissaria Smith said . Destinations were the U . S ., Covertible currency areas , Uruguay and open ports . Cake sales were registered at 785 to 995 dlrs for March / April , 785 dlrs for May , 753 dlrs for Aug and 0 . 39 times New York Dec for Oct / Dec . Buyers were the U . S ., Argentina , Uruguay and convertible currency areas . Liquor sales were limited with March / April selling at 2 , 325 and 2 , 380 dlrs , June / July at 2 , 375 dlrs and at 1 . 25 times New York July , Aug / Sept at 2 , 400 dlrs and at 1 . 25 times New York Sept and Oct / Dec at 1 . 25 times New York Dec , Comissaria Smith said . Total Bahia sales are currently estimated at 6 . 13 mln bags against the 1986 / 87 crop and 1 . 06 mln bags against the 1987 / 88 crop . Final figures for the period to February 28 are expected to be published by the Brazilian Cocoa Trade Commission after carnival which ends midday on February 27 .', "COMPUTER TERMINAL SYSTEMS & lt ; CPML > COMPLETES SALE Computer Terminal Systems Inc said it has completed the sale of 200 , 000 shares of its common stock , and warrants to acquire an additional one mln shares , to & lt ; Sedio N . V .> of Lugano , Switzerland for 50 , 000 dlrs . The company said the warrants are exercisable for five years at a purchase price of . 125 dlrs per share . Computer Terminal said Sedio also has the right to buy additional shares and increase its total holdings up to 40 pct of the Computer Terminal ' s outstanding common stock under certain circumstances involving change of control at the company . The company said if the conditions occur the warrants would be exercisable at a price equal to 75 pct of its common stock ' s market price at the time , not to exceed 1 . 50 dlrs per share . Computer Terminal also said it sold the technolgy rights to its Dot Matrix impact technology , including any future improvements , to & lt ; Woodco Inc > of Houston , Tex . for 200 , 000 dlrs . But , it said it would continue to be the exclusive worldwide licensee of the technology for Woodco . The company said the moves were part of its reorganization plan and would help pay current operation costs and ensure product delivery . Computer Terminal makes computer generated labels , forms , tags and ticket printers and terminals ."]
#Clean up the docs using the previous functions
news = text_array
news = removePunc(news)
news = removeNumbers(news)
news = stopText(news)
#news = stemText(news)
news = [j.lower() for j in news]
news[:10]
[' bahia cocoa review showers continued throughout week bahia cocoa zone alleviating drought since early january improving prospects coming temporao although normal humidity levels restored comissaria smith said weekly review the dry period means temporao late year arrivals week ended february bags kilos making cumulative total season mln stage last year again seems cocoa delivered earlier consignment included arrivals figures comissaria smith said still doubt much old crop cocoa still available harvesting practically come end with total bahia crop estimates around mln bags sales standing almost mln hundred thousand bags still hands farmers middlemen exporters processors there doubts much cocoa would fit export shippers experiencing dificulties obtaining bahia superior certificates in view lower quality recent weeks farmers sold good part cocoa held consignment comissaria smith said spot bean prices rose cruzados per arroba kilos bean shippers reluctant offer nearby shipment limited sales booked march shipment dlrs per tonne ports named new crop sales also light open ports june july going dlrs dlrs new york july aug sept dlrs per tonne fob routine sales butter made march april sold dlrs april may butter went times new york may june july dlrs aug sept dlrs times new york sept oct dec dlrs times new york dec comissaria smith said destinations u s covertible currency areas uruguay open ports cake sales registered dlrs march april dlrs may dlrs aug times new york dec oct dec buyers u s argentina uruguay convertible currency areas liquor sales limited march april selling dlrs june july dlrs times new york july aug sept dlrs times new york sept oct dec times new york dec comissaria smith said total bahia sales currently estimated mln bags crop mln bags crop final figures period february expected published brazilian cocoa trade commission carnival ends midday february', ' computer terminal systems lt cpml completes sale computer terminal systems inc said completed sale shares common stock warrants acquire additional one mln shares lt sedio n v lugano switzerland dlrs the company said warrants exercisable five years purchase price dlrs per share computer terminal said sedio also right buy additional shares increase total holdings pct computer terminal outstanding common stock certain circumstances involving change control company the company said conditions occur warrants would exercisable price equal pct common stock market price time exceed dlrs per share computer terminal also said sold technolgy rights dot matrix impact technology including future improvements lt woodco inc houston tex dlrs but said would continue exclusive worldwide licensee technology woodco the company said moves part reorganization plan would help pay current operation costs ensure product delivery computer terminal makes computer generated labels forms tags ticket printers terminals', ' n z trading bank deposit growth rises slightly new zealand trading bank seasonally adjusted deposit growth rose pct january compared rise pct december reserve bank said year year total deposits rose pct compared pct increase december year pct rise year ago period said weekly statistical release total deposits rose billion n z dlrs january compared billion december billion january', ' national amusements again ups viacom lt via bid viacom international inc said lt national amusements inc raised value offer viacom publicly held stock the company said special committee board plans meet later today consider offer one submitted march one lt mcv holdings inc a spokeswoman unable say committee met planned yesterday viacom said national amusements arsenal holdings inc subsidiary raised amount cash offering viacom share cts dlrs value fraction share exchangeable arsenal holdings preferred included raised cts dlrs national amusements already owns pct viacom stock', ' rogers lt rog sees st qtr net up significantly rogers corp said first quarter earnings significantly earnings dlrs four cts share quarter last year the company said expects revenues first quarter somewhat higher revenues mln dlrs posted year ago quarter rogers said reached agreement sale molded switch circuit product line major supplier the sale terms disclosed completed early second quarter rogers said', ' island telephone share split approved lt island telephone co ltd said previously announced two one common share split approved shareholders annual meeting', ' u k growing impatient with japan thatcher prime minister margaret thatcher said u k was growing impatient japanese trade barriers warned would soon new powers countries offering reciprocal access markets she told parliament bid u k cable wireless plc lt cawl l enter japanese telecommunications market regarded government test case i wrote prime minister japan mr nakasone fourth march express interest cable wireless bid i yet reply we see test open japanese market really thatcher said thatcher told parliament shortly we shall powers example powers financial services act banking act become available shall able take action cases countries offer full access financial services cable wireless seeking stake proposed japanese telecommunications rival kokusai denshin denwa but japanese minister post telecommunications reported saying opposed cable wireless managerial role new company', ' questech inc lt qtec year net shr loss nil vs profit cts net loss vs profit revs mln vs mln year shr profit cts vs profit cts net profit vs profit revs mln vs mln note current year net includes charge discontinued operations dlrs', ' canada oil exports rise pct in canadian oil exports rose pct previous year mln cubic meters oil imports soared pct mln cubic meters statistics canada said production meanwhile unchanged previous year mln cubic feet natural gas exports plunged pct billion cubic meters canadian sales slipped pct billion cubic meters the federal agency said december oil production fell pct mln cubic meters exports rose pct mln cubic meters imports rose pct mln cubic meters natural gas exports fell pct month billion cubic meters canadian sales eased pct billion cubic meters', ' coffee sugar and cocoa exchange names chairman the new york coffee sugar cocoa exchange csce elected former first vice chairman gerald clancy two year term chairman board managers replacing previous chairman howard katz katz chairman since remain board member clancy currently serves exchange board managers chairman appeals executive pension political action committees the csce also elected charles nastro executive vice president shearson lehman bros first vice chairman anthony maccia vice president woodhouse drake carey named second vice chairman clifford evans president demico futures elected treasurer']
#Make it into a TFIDF matrix
from sklearn.feature_extraction.text import TfidfVectorizer
tfidf = TfidfVectorizer(text_array)
tfs = tfidf.fit_transform(text_array)
tdm_mat = tfs.toarray().T
print(tdm_mat.shape)
(26283, 8470)
#Create plain TDM
from sklearn.feature_extraction.text import CountVectorizer
docs = news
vec = CountVectorizer()
X = vec.fit_transform(docs)
df = pd.DataFrame(X.toarray(), columns=vec.get_feature_names())
tdm = df.T
tdm.shape
(24670, 8470)
tdm.iloc[2030:2050,0:20]
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
baytown | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bayvet | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbb | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbc | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbca | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbcz | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbd | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbdo | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbe | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbec | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbks | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbl | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbls | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbn | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbnk | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbrc | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bbusx | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bc | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bcc | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bced | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
This is a nice article that has most of what is needed: https://www.analyticsvidhya.com/blog/2016/08/beginners-guide-to-topic-modeling-in-python/
Latent Dirichlet Allocation (LDA) was created by David Blei, Andrew Ng, and Michael Jordan in 2003, see their paper titled "Latent Dirichlet Allocation" in the Journal of Machine Learning Research, pp 993--1022.
The simplest way to think about LDA is as a probability model that connects documents with words and topics. The components are:
Next, we connect the above objects to $K$ topics, indexed by $l$, i.e., $t_l$. We will see that LDA is encapsulated in two matrices: Matrix $A$ and Matrix $B$.
where $\Gamma(\cdot)$ is the Gamma function.
The goal is to maximize this likelihood by picking the vector $\alpha$ and the probabilities in the matrix $B$. (Note that were a Dirichlet distribution not used, then we could directly pick values in Matrices $A$ and $B$.)
The computation is undertaken using MCMC with Gibbs sampling.
#Clean and process news documents into shape for LDA
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
import string
stop = set(stopwords.words('english'))
exclude = set(string.punctuation)
lemma = WordNetLemmatizer()
def clean(doc):
stop_free = " ".join([i for i in doc.lower().split() if i not in stop])
punc_free = ''.join(ch for ch in stop_free if ch not in exclude)
normalized = " ".join(lemma.lemmatize(word) for word in punc_free.split())
return normalized
doc_clean = [clean(doc).split() for doc in news]
print(len(doc_clean))
type(doc_clean)
8470
list
doc_clean[:10]
[['bahia', 'cocoa', 'review', 'shower', 'continued', 'throughout', 'week', 'bahia', 'cocoa', 'zone', 'alleviating', 'drought', 'since', 'early', 'january', 'improving', 'prospect', 'coming', 'temporao', 'although', 'normal', 'humidity', 'level', 'restored', 'comissaria', 'smith', 'said', 'weekly', 'review', 'dry', 'period', 'mean', 'temporao', 'late', 'year', 'arrival', 'week', 'ended', 'february', 'bag', 'kilo', 'making', 'cumulative', 'total', 'season', 'mln', 'stage', 'last', 'year', 'seems', 'cocoa', 'delivered', 'earlier', 'consignment', 'included', 'arrival', 'figure', 'comissaria', 'smith', 'said', 'still', 'doubt', 'much', 'old', 'crop', 'cocoa', 'still', 'available', 'harvesting', 'practically', 'come', 'end', 'total', 'bahia', 'crop', 'estimate', 'around', 'mln', 'bag', 'sale', 'standing', 'almost', 'mln', 'hundred', 'thousand', 'bag', 'still', 'hand', 'farmer', 'middleman', 'exporter', 'processor', 'doubt', 'much', 'cocoa', 'would', 'fit', 'export', 'shipper', 'experiencing', 'dificulties', 'obtaining', 'bahia', 'superior', 'certificate', 'view', 'lower', 'quality', 'recent', 'week', 'farmer', 'sold', 'good', 'part', 'cocoa', 'held', 'consignment', 'comissaria', 'smith', 'said', 'spot', 'bean', 'price', 'rose', 'cruzados', 'per', 'arroba', 'kilo', 'bean', 'shipper', 'reluctant', 'offer', 'nearby', 'shipment', 'limited', 'sale', 'booked', 'march', 'shipment', 'dlrs', 'per', 'tonne', 'port', 'named', 'new', 'crop', 'sale', 'also', 'light', 'open', 'port', 'june', 'july', 'going', 'dlrs', 'dlrs', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'per', 'tonne', 'fob', 'routine', 'sale', 'butter', 'made', 'march', 'april', 'sold', 'dlrs', 'april', 'may', 'butter', 'went', 'time', 'new', 'york', 'may', 'june', 'july', 'dlrs', 'aug', 'sept', 'dlrs', 'time', 'new', 'york', 'sept', 'oct', 'dec', 'dlrs', 'time', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'destination', 'u', 'covertible', 'currency', 'area', 'uruguay', 'open', 'port', 'cake', 'sale', 'registered', 'dlrs', 'march', 'april', 'dlrs', 'may', 'dlrs', 'aug', 'time', 'new', 'york', 'dec', 'oct', 'dec', 'buyer', 'u', 'argentina', 'uruguay', 'convertible', 'currency', 'area', 'liquor', 'sale', 'limited', 'march', 'april', 'selling', 'dlrs', 'june', 'july', 'dlrs', 'time', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'time', 'new', 'york', 'sept', 'oct', 'dec', 'time', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'total', 'bahia', 'sale', 'currently', 'estimated', 'mln', 'bag', 'crop', 'mln', 'bag', 'crop', 'final', 'figure', 'period', 'february', 'expected', 'published', 'brazilian', 'cocoa', 'trade', 'commission', 'carnival', 'end', 'midday', 'february'], ['computer', 'terminal', 'system', 'lt', 'cpml', 'completes', 'sale', 'computer', 'terminal', 'system', 'inc', 'said', 'completed', 'sale', 'share', 'common', 'stock', 'warrant', 'acquire', 'additional', 'one', 'mln', 'share', 'lt', 'sedio', 'n', 'v', 'lugano', 'switzerland', 'dlrs', 'company', 'said', 'warrant', 'exercisable', 'five', 'year', 'purchase', 'price', 'dlrs', 'per', 'share', 'computer', 'terminal', 'said', 'sedio', 'also', 'right', 'buy', 'additional', 'share', 'increase', 'total', 'holding', 'pct', 'computer', 'terminal', 'outstanding', 'common', 'stock', 'certain', 'circumstance', 'involving', 'change', 'control', 'company', 'company', 'said', 'condition', 'occur', 'warrant', 'would', 'exercisable', 'price', 'equal', 'pct', 'common', 'stock', 'market', 'price', 'time', 'exceed', 'dlrs', 'per', 'share', 'computer', 'terminal', 'also', 'said', 'sold', 'technolgy', 'right', 'dot', 'matrix', 'impact', 'technology', 'including', 'future', 'improvement', 'lt', 'woodco', 'inc', 'houston', 'tex', 'dlrs', 'said', 'would', 'continue', 'exclusive', 'worldwide', 'licensee', 'technology', 'woodco', 'company', 'said', 'move', 'part', 'reorganization', 'plan', 'would', 'help', 'pay', 'current', 'operation', 'cost', 'ensure', 'product', 'delivery', 'computer', 'terminal', 'make', 'computer', 'generated', 'label', 'form', 'tag', 'ticket', 'printer', 'terminal'], ['n', 'z', 'trading', 'bank', 'deposit', 'growth', 'rise', 'slightly', 'new', 'zealand', 'trading', 'bank', 'seasonally', 'adjusted', 'deposit', 'growth', 'rose', 'pct', 'january', 'compared', 'rise', 'pct', 'december', 'reserve', 'bank', 'said', 'year', 'year', 'total', 'deposit', 'rose', 'pct', 'compared', 'pct', 'increase', 'december', 'year', 'pct', 'rise', 'year', 'ago', 'period', 'said', 'weekly', 'statistical', 'release', 'total', 'deposit', 'rose', 'billion', 'n', 'z', 'dlrs', 'january', 'compared', 'billion', 'december', 'billion', 'january'], ['national', 'amusement', 'ups', 'viacom', 'lt', 'via', 'bid', 'viacom', 'international', 'inc', 'said', 'lt', 'national', 'amusement', 'inc', 'raised', 'value', 'offer', 'viacom', 'publicly', 'held', 'stock', 'company', 'said', 'special', 'committee', 'board', 'plan', 'meet', 'later', 'today', 'consider', 'offer', 'one', 'submitted', 'march', 'one', 'lt', 'mcv', 'holding', 'inc', 'spokeswoman', 'unable', 'say', 'committee', 'met', 'planned', 'yesterday', 'viacom', 'said', 'national', 'amusement', 'arsenal', 'holding', 'inc', 'subsidiary', 'raised', 'amount', 'cash', 'offering', 'viacom', 'share', 'ct', 'dlrs', 'value', 'fraction', 'share', 'exchangeable', 'arsenal', 'holding', 'preferred', 'included', 'raised', 'ct', 'dlrs', 'national', 'amusement', 'already', 'owns', 'pct', 'viacom', 'stock'], ['rogers', 'lt', 'rog', 'see', 'st', 'qtr', 'net', 'significantly', 'rogers', 'corp', 'said', 'first', 'quarter', 'earnings', 'significantly', 'earnings', 'dlrs', 'four', 'ct', 'share', 'quarter', 'last', 'year', 'company', 'said', 'expects', 'revenue', 'first', 'quarter', 'somewhat', 'higher', 'revenue', 'mln', 'dlrs', 'posted', 'year', 'ago', 'quarter', 'rogers', 'said', 'reached', 'agreement', 'sale', 'molded', 'switch', 'circuit', 'product', 'line', 'major', 'supplier', 'sale', 'term', 'disclosed', 'completed', 'early', 'second', 'quarter', 'rogers', 'said'], ['island', 'telephone', 'share', 'split', 'approved', 'lt', 'island', 'telephone', 'co', 'ltd', 'said', 'previously', 'announced', 'two', 'one', 'common', 'share', 'split', 'approved', 'shareholder', 'annual', 'meeting'], ['u', 'k', 'growing', 'impatient', 'japan', 'thatcher', 'prime', 'minister', 'margaret', 'thatcher', 'said', 'u', 'k', 'growing', 'impatient', 'japanese', 'trade', 'barrier', 'warned', 'would', 'soon', 'new', 'power', 'country', 'offering', 'reciprocal', 'access', 'market', 'told', 'parliament', 'bid', 'u', 'k', 'cable', 'wireless', 'plc', 'lt', 'cawl', 'l', 'enter', 'japanese', 'telecommunication', 'market', 'regarded', 'government', 'test', 'case', 'wrote', 'prime', 'minister', 'japan', 'mr', 'nakasone', 'fourth', 'march', 'express', 'interest', 'cable', 'wireless', 'bid', 'yet', 'reply', 'see', 'test', 'open', 'japanese', 'market', 'really', 'thatcher', 'said', 'thatcher', 'told', 'parliament', 'shortly', 'shall', 'power', 'example', 'power', 'financial', 'service', 'act', 'banking', 'act', 'become', 'available', 'shall', 'able', 'take', 'action', 'case', 'country', 'offer', 'full', 'access', 'financial', 'service', 'cable', 'wireless', 'seeking', 'stake', 'proposed', 'japanese', 'telecommunication', 'rival', 'kokusai', 'denshin', 'denwa', 'japanese', 'minister', 'post', 'telecommunication', 'reported', 'saying', 'opposed', 'cable', 'wireless', 'managerial', 'role', 'new', 'company'], ['questech', 'inc', 'lt', 'qtec', 'year', 'net', 'shr', 'loss', 'nil', 'v', 'profit', 'ct', 'net', 'loss', 'v', 'profit', 'rev', 'mln', 'v', 'mln', 'year', 'shr', 'profit', 'ct', 'v', 'profit', 'ct', 'net', 'profit', 'v', 'profit', 'rev', 'mln', 'v', 'mln', 'note', 'current', 'year', 'net', 'includes', 'charge', 'discontinued', 'operation', 'dlrs'], ['canada', 'oil', 'export', 'rise', 'pct', 'canadian', 'oil', 'export', 'rose', 'pct', 'previous', 'year', 'mln', 'cubic', 'meter', 'oil', 'import', 'soared', 'pct', 'mln', 'cubic', 'meter', 'statistic', 'canada', 'said', 'production', 'meanwhile', 'unchanged', 'previous', 'year', 'mln', 'cubic', 'foot', 'natural', 'gas', 'export', 'plunged', 'pct', 'billion', 'cubic', 'meter', 'canadian', 'sale', 'slipped', 'pct', 'billion', 'cubic', 'meter', 'federal', 'agency', 'said', 'december', 'oil', 'production', 'fell', 'pct', 'mln', 'cubic', 'meter', 'export', 'rose', 'pct', 'mln', 'cubic', 'meter', 'import', 'rose', 'pct', 'mln', 'cubic', 'meter', 'natural', 'gas', 'export', 'fell', 'pct', 'month', 'billion', 'cubic', 'meter', 'canadian', 'sale', 'eased', 'pct', 'billion', 'cubic', 'meter'], ['coffee', 'sugar', 'cocoa', 'exchange', 'name', 'chairman', 'new', 'york', 'coffee', 'sugar', 'cocoa', 'exchange', 'csce', 'elected', 'former', 'first', 'vice', 'chairman', 'gerald', 'clancy', 'two', 'year', 'term', 'chairman', 'board', 'manager', 'replacing', 'previous', 'chairman', 'howard', 'katz', 'katz', 'chairman', 'since', 'remain', 'board', 'member', 'clancy', 'currently', 'serf', 'exchange', 'board', 'manager', 'chairman', 'appeal', 'executive', 'pension', 'political', 'action', 'committee', 'csce', 'also', 'elected', 'charles', 'nastro', 'executive', 'vice', 'president', 'shearson', 'lehman', 'bros', 'first', 'vice', 'chairman', 'anthony', 'maccia', 'vice', 'president', 'woodhouse', 'drake', 'carey', 'named', 'second', 'vice', 'chairman', 'clifford', 'evans', 'president', 'demico', 'future', 'elected', 'treasurer']]
# Importing Gensim
import gensim
from gensim import corpora
# Creating the term dictionary of our corpus, every unique term is assigned an index.
dictionary = corpora.Dictionary(doc_clean)
# Converting list of documents (corpus) into Document Term Matrix using dictionary above.
doc_term_matrix = [dictionary.doc2bow(doc) for doc in doc_clean]
size(doc_term_matrix)
8470
%%time
#RUN THE MODEL
# Creating the object for LDA model using gensim library
Lda = gensim.models.ldamodel.LdaModel
# Running and Trainign LDA model on the document term matrix.
ldamodel = Lda(doc_term_matrix, num_topics=3, id2word = dictionary, passes=50)
CPU times: user 6min 47s, sys: 2.05 s, total: 6min 50s Wall time: 4min 42s
#Results
print(ldamodel.print_topics(num_topics=3, num_words=5))
[(0, 'nan*"somc" + nan*"golf" + nan*"severed" + nan*"shadow" + nan*"monetarist"'), (1, 'nan*"somc" + nan*"golf" + nan*"severed" + nan*"shadow" + nan*"monetarist"'), (2, 'nan*"somc" + nan*"golf" + nan*"severed" + nan*"shadow" + nan*"monetarist"')]
In a number of Natural Language Processing (NLP) applications classic methods for language modeling that represent words as high-dimensional, sparse vectors have been replaced by Neural Language models that learn word embeddings, i.e., low-dimensional representations of words, often through the use of neural networks.
https://machinelearningmastery.com/develop-word-embeddings-python-gensim/
Google's word2vec page: https://code.google.com/archive/p/word2vec/
Original word2vec paper: https://arxiv.org/pdf/1301.3781.pdf; and the improved skip-gram model: https://arxiv.org/pdf/1310.4546.pdf
A simple exposition: https://skymind.ai/wiki/word2vec
Word2Vec Made Easy: https://towardsdatascience.com/word2vec-made-easy-139a31a4b8ae; https://drive.google.com/file/d/1PqdcFsonU6jNu_BN7dXzcaKD-Yj56eH7/view?usp=sharing
Word embeddings have proven to be a useful way to do meta analysis and generate new findings from extant literature as shown in Tshitoyan et al (2019); pdf.
Words have multiple degrees of similarity, such as syntactic similarity and semantic similarity. Word embeddings have been found to pick up both types of similarity. These similarities have been found to support algebraic operations on words, as in the famous word2vec example where vector("Man") + vector("King") - vector("Queen") equals vector("Woman").
The output of word2vec is an input to many natural language models using deep learning, such as sentence completion, parsing, information retrieval, document classification, question answering, and named entity recognition.
There are two approaches to word2vec, discussed below.
nb_setup.images_hconcat(["DSTMAA_images/cbow_skipgram.png"],width=600)
Given a sequence of words $w_1,...,w_T$ (i.e., $T$ terms), the quantity of interest in the skip-gram model is the conditional probability:
$$ p(w_{t+j} | w_t), \quad -c ≤ j ≤ c, j ≠ 0 $$Here $c$ is a window around the current word $w_t$ in the text, and $c$ may also be a function of $w_t$. This is what is depicted in the graphic above. The objective function is to maxmize the log conditional probability:
$$ L = \frac{1}{T} \sum_{t=1}^T \left[\sum_{-c ≤ j ≤ c, j ≠ 0} \log p(w_{t+j} | w_t) \right] $$Assume a vocabulary of $W$ words. Let each word $w$ be represented by a word vector $v(w)$ of dimension $N$. Then the skip-gram model assumes that the conditional probabilities come from a softmax function as follows:
$$ p(w_j | w_i) = \frac{\exp(v(w_j)^⊤ · v(w_i))}{\sum_{w=1}^W \exp(v(w)^⊤ · v(w_i))} $$It requires gradients for each element of the vectors $v(w)$, which is onerous and is of order $O(W)$. Instead of softmax, hierarchical softmax is used, which is of order $O(log W)$. An alternative is negative sampling, specifically Noise Contrastive Estimation (NCE) as this approximates softmax with logistic functions. Explanation of these approximations and speedups is beyond the scope of these notes, but the reader is referred to Mikolov et al (2013), or see this simpler exposition.
Training is done with neural nets containing a single hidden layer of dimension $N$. The input and output layers are of the same size, and this is your essential autoencoder.
A matrix factorization representation of word2vec from Stanford is called GloVe. This is unsupervised learning. I highly recommend reading this page, it is one of the most beautiful and succint presentations of an algorithmic idea I have encountered.
This is not the first matrix factorization idea, Latent Semantic Analysis (LSA) has been around for some time. LSA factorizes a term-document matrix into lower dimension. But it has its drawbacks and does poorly on word analogy tasks, for which word2vec does much better. GloVe is an approach that marries the ideas in LSA and word2vec in a computationally efficient manner.
As usual, the output from a word embedding model is an embedding matrix $E$ of size $V × N$, where $V$ is the size of the vocabulary (number of words) and $N$ is the dimension of the embedding.
GloVe is based on the co-occurrence matrix of words $X$ of size $V × V$. This matrix depends on the "window" chosen for co-occurrence. The matrix values are also scaled depending on the closeness within the window, resulting in all values in the matrix in $(0,1)$. This matrix is then factorized to get the embedding matrix $E$. This is an extremely high-level sketch of the GloVe algorithm. See Jeffrey Pennington, Richard Socher, and Christopher D. Manning (2014); pdf.
Technically, GloVe is faster than word2vec, but requires more memory. Also, once the word co-occurrence matrix has been prepared, then $E$ can be quickly generated for any chosen $N$, whereas in word2vec, an entirely fresh neural net has to be estimated, because the hidden layer of the autoencoder has changed in dimension.
For large text corpora, one can intuitively imagine that word embeddings should be roughly similar if the texts are from the same domain. This suggests that pre-trained embeddings $E$ might be a good way to go for NLP applications.
Given the word co-occurrence matrix $X$, let $X_i = \sum_k X_{ik}$ be the number of times any word occurs in the context of word $i$. We can then define the conditional probability, also known as co-occurrence probabilities.
$$ P_{ij} = P(j | i) = \frac{X_{ij}}{X_i} $$What's the difference between a word co-occurring and a word appearing "in the context of" another word? In the context of is represented by a conditional probability, whereas co-occurence is a correlation.
For a sample word $k$, the ratio $P_{ik}/P_{jk}$ will be large if word $i$ occurs more in the context of $k$ than does word $j$. If both words $i$ and $j$ are not related to word $k$, then we'd expect this ratio to be close to 1. This suggests that the variable we should model is the ratio of co-occurrence probabilities rather than the probabilities themselves. Since these ratios are functions of three words, we may write $$ F(w_i,w_j,w_k) = \frac{P_{ik}}{P_{jk}} $$ where $w_i, w_j, w_k ∈ {\cal R}^d$ are word vectors.
This function may depend on a parameter set. It is desired to have the following properties:
$F$ should be encoded in the word vector space. It may be easier to work with the form $F(w_i-w_j,w_k) = P_{ik}/P_{jk}$ instead.
$F$ is a scalar function and may be approximated with a neural net (nonlinear mapping) or a simpler linear mapping, i.e., if we assume that $F(\cdot)=\exp(\cdot)$, then $F$ is defined as follows: $$ F((w_i-w_j)^⊤ · w_k) = \frac{F(w_i^⊤ · w_k)}{F(w_j^⊤ · w_k)} = \frac{P_{ik}}{P_{jk}} = \frac{X_{ik}/X_i}{X_{jk}/X_j} $$ which follows from the choice of $F$ as an exponential function.
It also follows that $$ w_i^⊤ · w_k = log(P_{ik}) = log(X_{ik}) - log(X_i) $$ This implies that the entries in the co-occurrence matrix $X$ are related to the word vectors $w$, and that too, globally, hence the "GloVe" nomenclature.
The factorization is implemented using a least-squares fitting procedure (see the paper for details). Because the main element of the computations is a dot product, $w_i^⊤ · w_k$ and there is a similar dot product in the softmax of word2vec, it is not surprising that these models are analogous.
Similar factorizations occur in recommendation engines where non-negative matrix factorization (NMF) is undertaken.
The embeddings idea may be extend to many other cases where co-occurrences exist. For example, user search histories over AirBnB in a search session may be converted into embeddings, see Grbovic and Cheng (2018); pdf.
We are now ready to discuss the actual fitting of the word2vec model with neural nets. The neural net is simple. As before assume that the vocabulary is of size $V$ and the embedding is of size $N$. To make things more concrete, let $V=10,000$ and $N=100$. The neural net will have $V$ nodes in the input and output layers, and $N$ nodes in the single hidden layer. If you are familiar with autoencoders, then this is a common NN of that type. The number of parameters (ignoring a bias term) in the NN are $VN = 1,000,000$ for the hidden layer, and, for the output layer (with a bias term), $NV=1,000,100$, i.e., over 2 million parameters to be fit. This is a fairly large NN.
The inputs to the model are based on a window of text around the "target" word, $w$. Suppose the window is of size $c=2$, then $w$ may have up to 4 possible co-occurrence words---2 ahead (denoted $w_1, w_2$) and 2 before (denoted $w_{-1},w_{-2}$) in the window. This leads to 4 rows of input data. How? The input $X$ in all 4 rows is a one-hot vector of $V-1$ zeros and a single 1 in the position indexed by $w$. The label $Y$ is a one-hot vector with $V-1$ zeros and a 1 in the position where the leading or lagging word appears. Because a large corpus will have several words, each with up to $2c$ co-occurrence words, the size of the data may also run into the millions or even billions.
The coefficient matrix for the hidden layer is of dimension $V × N$---that is, for every word in the vocabulary, we have a $N$-vector representing it. This indeed, is the entire matrix of word embeddings. Just as an autoencoder compresses the original input, in this case, the neural net projects all the words onto a $N$-dimensional space. We are interested here in the weights matrix of the hidden layer, not the predicted output itself.
However, fitting this NN is no easy task, with millions of parameters, and possibly, billions of observations of data. To reduce the computational load, two simple additional techniques (hacks) are applied.
Subsampling: We get rid of words that occur too frequently. So we only keep a subsample of words that occur less often. There is a formula for this. Let $\gamma(w)$ be the percentage of word count for $w$ among all words. This is likely to be a small number. We then sort the words based on a function of $\gamma(w)$ and put in a cutoff, where only words with smaller $\gamma(w)$ are retained. This eliminates common words like "the" and "this" and reduces computation time without much impact on the final word embeddings.
Negative sampling: NNs are usually fitted in batches. In each batch of data all the weights (parameters) are updated. This can be quite costly in computation. In the hidden layer, this would mean updating all $VN=1$ million weights in the hidden layer. Instead, we only update the target word $w$ and 5-10 words that do not co-occur with $w$. We call these words "negatives" and hence the terminology of negative sampling. Negative words are sampled with a probability that is higher if they occur more frequently in the sample.
Both these approaches work well and have resulted in great speed up in fitting the word2vec model. pdf
import gensim, logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
#Clean up the docs using the previous functions
news = text_array
news = removePunc(news)
news = removeNumbers(news)
news = stopText(news)
news = stemText(news)
news = [j.lower() for j in news]
print(len(news))
news[:3]
8470
[' bahia cocoa review shower continu throughout week bahia cocoa zone allevi drought sinc earli januari improv prospect come temporao although normal humid level restor comissaria smith said weekli review the dri period mean temporao late year arriv week end februari bag kilo make cumul total season mln stage last year again seem cocoa deliv earlier consign includ arriv figur comissaria smith said still doubt much old crop cocoa still avail harvest practic come end with total bahia crop estim around mln bag sale stand almost mln hundr thousand bag still hand farmer middlemen export processor there doubt much cocoa would fit export shipper experienc dificulti obtain bahia superior certif in view lower qualiti recent week farmer sold good part cocoa held consign comissaria smith said spot bean price rose cruzado per arroba kilo bean shipper reluct offer nearbi shipment limit sale book march shipment dlr per tonn port name new crop sale also light open port june juli go dlr dlr new york juli aug sept dlr per tonn fob routin sale butter made march april sold dlr april may butter went time new york may june juli dlr aug sept dlr time new york sept oct dec dlr time new york dec comissaria smith said destin u s covert currenc area uruguay open port cake sale regist dlr march april dlr may dlr aug time new york dec oct dec buyer u s argentina uruguay convert currenc area liquor sale limit march april sell dlr june juli dlr time new york juli aug sept dlr time new york sept oct dec time new york dec comissaria smith said total bahia sale current estim mln bag crop mln bag crop final figur period februari expect publish brazilian cocoa trade commiss carniv end midday februari', ' comput termin system lt cpml complet sale comput termin system inc said complet sale share common stock warrant acquir addit one mln share lt sedio n v lugano switzerland dlr the compani said warrant exercis five year purchas price dlr per share comput termin said sedio also right buy addit share increas total hold pct comput termin outstand common stock certain circumst involv chang control compani the compani said condit occur warrant would exercis price equal pct common stock market price time exceed dlr per share comput termin also said sold technolgi right dot matrix impact technolog includ futur improv lt woodco inc houston tex dlr but said would continu exclus worldwid license technolog woodco the compani said move part reorgan plan would help pay current oper cost ensur product deliveri comput termin make comput gener label form tag ticket printer termin', ' n z trade bank deposit growth rise slightli new zealand trade bank season adjust deposit growth rose pct januari compar rise pct decemb reserv bank said year year total deposit rose pct compar pct increas decemb year pct rise year ago period said weekli statist releas total deposit rose billion n z dlr januari compar billion decemb billion januari']
#Tokenize each document
def textTokenize(text_array):
textTokens = []
for h in text_array:
textTokens.append(h.split(' '))
return textTokens
sentences = textTokenize(news)
print(len(sentences))
print(type(sentences))
sentences[:2]
8470 <class 'list'>
[['', 'bahia', 'cocoa', 'review', 'shower', 'continu', 'throughout', 'week', 'bahia', 'cocoa', 'zone', 'allevi', 'drought', 'sinc', 'earli', 'januari', 'improv', 'prospect', 'come', 'temporao', 'although', 'normal', 'humid', 'level', 'restor', 'comissaria', 'smith', 'said', 'weekli', 'review', 'the', 'dri', 'period', 'mean', 'temporao', 'late', 'year', 'arriv', 'week', 'end', 'februari', 'bag', 'kilo', 'make', 'cumul', 'total', 'season', 'mln', 'stage', 'last', 'year', 'again', 'seem', 'cocoa', 'deliv', 'earlier', 'consign', 'includ', 'arriv', 'figur', 'comissaria', 'smith', 'said', 'still', 'doubt', 'much', 'old', 'crop', 'cocoa', 'still', 'avail', 'harvest', 'practic', 'come', 'end', 'with', 'total', 'bahia', 'crop', 'estim', 'around', 'mln', 'bag', 'sale', 'stand', 'almost', 'mln', 'hundr', 'thousand', 'bag', 'still', 'hand', 'farmer', 'middlemen', 'export', 'processor', 'there', 'doubt', 'much', 'cocoa', 'would', 'fit', 'export', 'shipper', 'experienc', 'dificulti', 'obtain', 'bahia', 'superior', 'certif', 'in', 'view', 'lower', 'qualiti', 'recent', 'week', 'farmer', 'sold', 'good', 'part', 'cocoa', 'held', 'consign', 'comissaria', 'smith', 'said', 'spot', 'bean', 'price', 'rose', 'cruzado', 'per', 'arroba', 'kilo', 'bean', 'shipper', 'reluct', 'offer', 'nearbi', 'shipment', 'limit', 'sale', 'book', 'march', 'shipment', 'dlr', 'per', 'tonn', 'port', 'name', 'new', 'crop', 'sale', 'also', 'light', 'open', 'port', 'june', 'juli', 'go', 'dlr', 'dlr', 'new', 'york', 'juli', 'aug', 'sept', 'dlr', 'per', 'tonn', 'fob', 'routin', 'sale', 'butter', 'made', 'march', 'april', 'sold', 'dlr', 'april', 'may', 'butter', 'went', 'time', 'new', 'york', 'may', 'june', 'juli', 'dlr', 'aug', 'sept', 'dlr', 'time', 'new', 'york', 'sept', 'oct', 'dec', 'dlr', 'time', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'destin', 'u', 's', 'covert', 'currenc', 'area', 'uruguay', 'open', 'port', 'cake', 'sale', 'regist', 'dlr', 'march', 'april', 'dlr', 'may', 'dlr', 'aug', 'time', 'new', 'york', 'dec', 'oct', 'dec', 'buyer', 'u', 's', 'argentina', 'uruguay', 'convert', 'currenc', 'area', 'liquor', 'sale', 'limit', 'march', 'april', 'sell', 'dlr', 'june', 'juli', 'dlr', 'time', 'new', 'york', 'juli', 'aug', 'sept', 'dlr', 'time', 'new', 'york', 'sept', 'oct', 'dec', 'time', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'total', 'bahia', 'sale', 'current', 'estim', 'mln', 'bag', 'crop', 'mln', 'bag', 'crop', 'final', 'figur', 'period', 'februari', 'expect', 'publish', 'brazilian', 'cocoa', 'trade', 'commiss', 'carniv', 'end', 'midday', 'februari'], ['', 'comput', 'termin', 'system', 'lt', 'cpml', 'complet', 'sale', 'comput', 'termin', 'system', 'inc', 'said', 'complet', 'sale', 'share', 'common', 'stock', 'warrant', 'acquir', 'addit', 'one', 'mln', 'share', 'lt', 'sedio', 'n', 'v', 'lugano', 'switzerland', 'dlr', 'the', 'compani', 'said', 'warrant', 'exercis', 'five', 'year', 'purchas', 'price', 'dlr', 'per', 'share', 'comput', 'termin', 'said', 'sedio', 'also', 'right', 'buy', 'addit', 'share', 'increas', 'total', 'hold', 'pct', 'comput', 'termin', 'outstand', 'common', 'stock', 'certain', 'circumst', 'involv', 'chang', 'control', 'compani', 'the', 'compani', 'said', 'condit', 'occur', 'warrant', 'would', 'exercis', 'price', 'equal', 'pct', 'common', 'stock', 'market', 'price', 'time', 'exceed', 'dlr', 'per', 'share', 'comput', 'termin', 'also', 'said', 'sold', 'technolgi', 'right', 'dot', 'matrix', 'impact', 'technolog', 'includ', 'futur', 'improv', 'lt', 'woodco', 'inc', 'houston', 'tex', 'dlr', 'but', 'said', 'would', 'continu', 'exclus', 'worldwid', 'license', 'technolog', 'woodco', 'the', 'compani', 'said', 'move', 'part', 'reorgan', 'plan', 'would', 'help', 'pay', 'current', 'oper', 'cost', 'ensur', 'product', 'deliveri', 'comput', 'termin', 'make', 'comput', 'gener', 'label', 'form', 'tag', 'ticket', 'printer', 'termin']]
#Train the model on Word2Vec
model = gensim.models.Word2Vec(sentences, min_count=1)
type(model)
2019-05-18 10:49:36,448 : INFO : collecting all words and their counts 2019-05-18 10:49:36,450 : INFO : PROGRESS: at sentence #0, processed 0 words, keeping 0 word types 2019-05-18 10:49:36,605 : INFO : collected 18138 word types from a corpus of 680012 raw words and 8470 sentences 2019-05-18 10:49:36,606 : INFO : Loading a fresh vocabulary 2019-05-18 10:49:36,789 : INFO : effective_min_count=1 retains 18138 unique words (100% of original 18138, drops 0) 2019-05-18 10:49:36,790 : INFO : effective_min_count=1 leaves 680012 word corpus (100% of original 680012, drops 0) 2019-05-18 10:49:36,836 : INFO : deleting the raw counts dictionary of 18138 items 2019-05-18 10:49:36,837 : INFO : sample=0.001 downsamples 42 most-common words 2019-05-18 10:49:36,838 : INFO : downsampling leaves estimated 590980 word corpus (86.9% of prior 680012) 2019-05-18 10:49:36,885 : INFO : estimated required memory for 18138 words and 100 dimensions: 23579400 bytes 2019-05-18 10:49:36,885 : INFO : resetting layer weights 2019-05-18 10:49:37,098 : INFO : training model with 3 workers on 18138 vocabulary and 100 features, using sg=0 hs=0 sample=0.001 negative=5 window=5 2019-05-18 10:49:37,518 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 10:49:37,522 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 10:49:37,526 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 10:49:37,527 : INFO : EPOCH - 1 : training on 680012 raw words (591009 effective words) took 0.4s, 1386995 effective words/s 2019-05-18 10:49:37,900 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 10:49:37,903 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 10:49:37,905 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 10:49:37,906 : INFO : EPOCH - 2 : training on 680012 raw words (591134 effective words) took 0.4s, 1575436 effective words/s 2019-05-18 10:49:38,269 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 10:49:38,272 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 10:49:38,275 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 10:49:38,276 : INFO : EPOCH - 3 : training on 680012 raw words (590954 effective words) took 0.4s, 1612924 effective words/s 2019-05-18 10:49:38,661 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 10:49:38,663 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 10:49:38,666 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 10:49:38,667 : INFO : EPOCH - 4 : training on 680012 raw words (590983 effective words) took 0.4s, 1529419 effective words/s 2019-05-18 10:49:39,043 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 10:49:39,048 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 10:49:39,049 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 10:49:39,050 : INFO : EPOCH - 5 : training on 680012 raw words (591039 effective words) took 0.4s, 1556511 effective words/s 2019-05-18 10:49:39,051 : INFO : training on a 3400060 raw words (2955119 effective words) took 2.0s, 1513630 effective words/s
gensim.models.word2vec.Word2Vec
model.wv['crop']
array([-1.5244081e+00, 1.6511822e+00, -1.2042760e+00, 4.5863870e-01, 6.1578125e-01, -1.0716602e+00, 7.0802176e-01, -7.3920351e-01, 8.4445894e-01, 1.1852486e-01, -3.3196095e-01, -1.5830903e-01, 1.1338675e+00, 2.9869246e-01, 5.3831810e-01, -9.9653840e-02, -2.4169852e-01, 1.6419883e+00, 3.2491323e-01, -7.9850996e-01, -5.2635908e-01, 8.2001291e-02, 1.1799212e+00, -1.1207160e+00, 9.4574422e-01, -5.2461690e-01, 1.8483084e-02, -3.3688363e-01, -4.7319874e-01, 1.4936355e-01, 9.2566538e-01, -1.8115382e-01, -7.9571038e-01, 1.2193074e+00, -3.3090067e-01, -9.4499481e-01, -2.2195394e-01, -1.1787609e-01, -6.2751752e-01, -1.9124401e+00, -2.4913734e-01, -3.3350626e-01, 3.5513562e-01, 1.9658601e-03, 1.4707655e+00, 1.5352504e+00, -1.3119984e-01, 1.2107234e+00, 9.3682057e-01, -5.9679002e-01, -8.6448187e-01, 8.6794712e-02, -1.6220688e+00, 4.8415753e-01, 1.3384271e-01, -8.4327328e-01, -1.1947917e+00, 1.4689125e+00, -7.3778152e-01, 9.9190658e-01, 5.4805285e-01, -3.6148131e-01, -5.5871016e-01, 5.1830739e-01, -1.7622038e+00, -8.7065405e-01, 6.5351373e-01, -9.6021372e-01, 3.3642402e-01, -6.0144717e-01, 7.3661160e-01, -3.6251688e-01, 2.3278806e-02, -3.2981056e-01, 1.8572685e+00, 3.2596631e+00, 7.2376859e-01, -3.8796693e-01, -3.2388130e-01, -1.6879773e-01, -1.5442315e+00, -4.3274289e-01, -6.9931358e-01, -8.7529790e-01, -4.8648593e-01, 1.6935018e-01, -1.1309894e+00, 2.6798210e-01, 4.4500250e-01, -1.1655588e+00, 1.1132234e+00, 6.3421172e-01, 4.2411128e-01, -8.8994879e-01, -8.3879757e-01, 6.3604558e-01, -4.0882775e-01, 7.4402738e-01, -1.3442684e+00, -6.0158062e-01], dtype=float32)
model.wv.most_similar('crop',topn=5)
2019-05-18 10:49:39,066 : INFO : precomputing L2-norms of word weight vectors /anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('harvest', 0.9403929710388184), ('winter', 0.935497522354126), ('devot', 0.8980012536048889), ('soybean', 0.8975715041160583), ('maiz', 0.8969207406044006)]
model.wv.most_similar('billion',topn=5)
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('mark', 0.7895687818527222), ('lire', 0.7813421487808228), ('mln', 0.7796597480773926), ('turnov', 0.7774637937545776), ('sheet', 0.7657306790351868)]
model.wv.similarity('sale','stock')
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
-1.0842022e-19
model.wv.most_similar('bank')
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('governmnet', 0.7392726540565491), ('banker', 0.733406662940979), ('bundesbank', 0.7231476306915283), ('central', 0.7171086668968201), ('fund', 0.7156329154968262), ('staunchli', 0.7153097987174988), ('facilti', 0.7091662883758545), ('paper', 0.69566410779953), ('england', 0.6902005672454834), ('scrambl', 0.6828998327255249)]
model.wv.most_similar(positive=['mark', 'german'], negative=['england'], topn=1)
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('remit', 0.690061092376709)]
model.wv.most_similar(positive=['mark', 'german'], negative=['french'], topn=1)
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('depreci', 0.7721059322357178)]
model.wv.most_similar(positive=['dollar', 'long'], negative=['mark'], topn=1)
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
[('pressur', 0.7601916790008545)]
This algorithm is analogous to word2vec but instead of word embeddings it generates document embeddings. Documents that are semantically similar with be closer to each other in the embedding space.
The original paper by Quoc Le and Tomas Mikolov is here: https://arxiv.org/abs/1405.4053; https://drive.google.com/file/d/1NBtLERtwRWy_RNVG5FKqRG-8oQTedSAz/view?usp=sharing
A simple blog post that offers some more explanation: https://medium.com/scaleabout/a-gentle-introduction-to-doc2vec-db3e8c0cce5e; https://drive.google.com/file/d/1GxzHpmdRac7n8wM9QqXFhmelkmBNjU8A/view?usp=sharing
Let's use the Reuters news corpus as an example.
#Recreate the documents (without stemming to retain whole words)
#Clean up the docs using the previous functions
news = text_array
news = removePunc(news)
news = removeNumbers(news)
news = stopText(news)
#news = stemText(news)
news = [j.lower() for j in news]
sentences = textTokenize(news)
print(len(sentences))
8470
from gensim.utils import simple_preprocess
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
n_news = range(len(news))
docs = [TaggedDocument(simple_preprocess(j),[i]) for j,i in zip(news,n_news)]
list(docs[:2])
[TaggedDocument(words=['bahia', 'cocoa', 'review', 'showers', 'continued', 'throughout', 'week', 'bahia', 'cocoa', 'zone', 'alleviating', 'drought', 'since', 'early', 'january', 'improving', 'prospects', 'coming', 'temporao', 'although', 'normal', 'humidity', 'levels', 'restored', 'comissaria', 'smith', 'said', 'weekly', 'review', 'the', 'dry', 'period', 'means', 'temporao', 'late', 'year', 'arrivals', 'week', 'ended', 'february', 'bags', 'kilos', 'making', 'cumulative', 'total', 'season', 'mln', 'stage', 'last', 'year', 'again', 'seems', 'cocoa', 'delivered', 'earlier', 'consignment', 'included', 'arrivals', 'figures', 'comissaria', 'smith', 'said', 'still', 'doubt', 'much', 'old', 'crop', 'cocoa', 'still', 'available', 'harvesting', 'practically', 'come', 'end', 'with', 'total', 'bahia', 'crop', 'estimates', 'around', 'mln', 'bags', 'sales', 'standing', 'almost', 'mln', 'hundred', 'thousand', 'bags', 'still', 'hands', 'farmers', 'middlemen', 'exporters', 'processors', 'there', 'doubts', 'much', 'cocoa', 'would', 'fit', 'export', 'shippers', 'experiencing', 'dificulties', 'obtaining', 'bahia', 'superior', 'certificates', 'in', 'view', 'lower', 'quality', 'recent', 'weeks', 'farmers', 'sold', 'good', 'part', 'cocoa', 'held', 'consignment', 'comissaria', 'smith', 'said', 'spot', 'bean', 'prices', 'rose', 'cruzados', 'per', 'arroba', 'kilos', 'bean', 'shippers', 'reluctant', 'offer', 'nearby', 'shipment', 'limited', 'sales', 'booked', 'march', 'shipment', 'dlrs', 'per', 'tonne', 'ports', 'named', 'new', 'crop', 'sales', 'also', 'light', 'open', 'ports', 'june', 'july', 'going', 'dlrs', 'dlrs', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'per', 'tonne', 'fob', 'routine', 'sales', 'butter', 'made', 'march', 'april', 'sold', 'dlrs', 'april', 'may', 'butter', 'went', 'times', 'new', 'york', 'may', 'june', 'july', 'dlrs', 'aug', 'sept', 'dlrs', 'times', 'new', 'york', 'sept', 'oct', 'dec', 'dlrs', 'times', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'destinations', 'covertible', 'currency', 'areas', 'uruguay', 'open', 'ports', 'cake', 'sales', 'registered', 'dlrs', 'march', 'april', 'dlrs', 'may', 'dlrs', 'aug', 'times', 'new', 'york', 'dec', 'oct', 'dec', 'buyers', 'argentina', 'uruguay', 'convertible', 'currency', 'areas', 'liquor', 'sales', 'limited', 'march', 'april', 'selling', 'dlrs', 'june', 'july', 'dlrs', 'times', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'times', 'new', 'york', 'sept', 'oct', 'dec', 'times', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'total', 'bahia', 'sales', 'currently', 'estimated', 'mln', 'bags', 'crop', 'mln', 'bags', 'crop', 'final', 'figures', 'period', 'february', 'expected', 'published', 'brazilian', 'cocoa', 'trade', 'commission', 'carnival', 'ends', 'midday', 'february'], tags=[0]), TaggedDocument(words=['computer', 'terminal', 'systems', 'lt', 'cpml', 'completes', 'sale', 'computer', 'terminal', 'systems', 'inc', 'said', 'completed', 'sale', 'shares', 'common', 'stock', 'warrants', 'acquire', 'additional', 'one', 'mln', 'shares', 'lt', 'sedio', 'lugano', 'switzerland', 'dlrs', 'the', 'company', 'said', 'warrants', 'exercisable', 'five', 'years', 'purchase', 'price', 'dlrs', 'per', 'share', 'computer', 'terminal', 'said', 'sedio', 'also', 'right', 'buy', 'additional', 'shares', 'increase', 'total', 'holdings', 'pct', 'computer', 'terminal', 'outstanding', 'common', 'stock', 'certain', 'circumstances', 'involving', 'change', 'control', 'company', 'the', 'company', 'said', 'conditions', 'occur', 'warrants', 'would', 'exercisable', 'price', 'equal', 'pct', 'common', 'stock', 'market', 'price', 'time', 'exceed', 'dlrs', 'per', 'share', 'computer', 'terminal', 'also', 'said', 'sold', 'technolgy', 'rights', 'dot', 'matrix', 'impact', 'technology', 'including', 'future', 'improvements', 'lt', 'woodco', 'inc', 'houston', 'tex', 'dlrs', 'but', 'said', 'would', 'continue', 'exclusive', 'worldwide', 'licensee', 'technology', 'woodco', 'the', 'company', 'said', 'moves', 'part', 'reorganization', 'plan', 'would', 'help', 'pay', 'current', 'operation', 'costs', 'ensure', 'product', 'delivery', 'computer', 'terminal', 'makes', 'computer', 'generated', 'labels', 'forms', 'tags', 'ticket', 'printers', 'terminals'], tags=[1])]
model = gensim.models.doc2vec.Doc2Vec(docs, min_count=1)
type(model)
2019-05-18 11:46:09,022 : INFO : collecting all words and their counts 2019-05-18 11:46:09,023 : INFO : PROGRESS: at example #0, processed 0 words (0/s), 0 word types, 0 tags 2019-05-18 11:46:09,148 : INFO : collected 24601 word types and 8470 unique tags from a corpus of 8470 examples and 656764 words 2019-05-18 11:46:09,150 : INFO : Loading a fresh vocabulary 2019-05-18 11:46:09,191 : INFO : effective_min_count=1 retains 24601 unique words (100% of original 24601, drops 0) 2019-05-18 11:46:09,192 : INFO : effective_min_count=1 leaves 656764 word corpus (100% of original 656764, drops 0) 2019-05-18 11:46:09,270 : INFO : deleting the raw counts dictionary of 24601 items 2019-05-18 11:46:09,272 : INFO : sample=0.001 downsamples 32 most-common words 2019-05-18 11:46:09,273 : INFO : downsampling leaves estimated 585653 word corpus (89.2% of prior 656764) 2019-05-18 11:46:09,337 : INFO : estimated required memory for 24601 words and 100 dimensions: 35369300 bytes 2019-05-18 11:46:09,338 : INFO : resetting layer weights 2019-05-18 11:46:09,672 : INFO : training model with 3 workers on 24601 vocabulary and 100 features, using sg=0 hs=0 sample=0.001 negative=5 window=5 2019-05-18 11:46:10,400 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 11:46:10,403 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 11:46:10,418 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 11:46:10,419 : INFO : EPOCH - 1 : training on 656764 raw words (594099 effective words) took 0.7s, 799210 effective words/s 2019-05-18 11:46:11,140 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 11:46:11,141 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 11:46:11,156 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 11:46:11,157 : INFO : EPOCH - 2 : training on 656764 raw words (593994 effective words) took 0.7s, 808585 effective words/s 2019-05-18 11:46:11,878 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 11:46:11,879 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 11:46:11,895 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 11:46:11,896 : INFO : EPOCH - 3 : training on 656764 raw words (594209 effective words) took 0.7s, 807771 effective words/s 2019-05-18 11:46:12,616 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 11:46:12,622 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 11:46:12,638 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 11:46:12,639 : INFO : EPOCH - 4 : training on 656764 raw words (594122 effective words) took 0.7s, 803490 effective words/s 2019-05-18 11:46:13,360 : INFO : worker thread finished; awaiting finish of 2 more threads 2019-05-18 11:46:13,364 : INFO : worker thread finished; awaiting finish of 1 more threads 2019-05-18 11:46:13,381 : INFO : worker thread finished; awaiting finish of 0 more threads 2019-05-18 11:46:13,382 : INFO : EPOCH - 5 : training on 656764 raw words (594120 effective words) took 0.7s, 803899 effective words/s 2019-05-18 11:46:13,382 : INFO : training on a 3283820 raw words (2970544 effective words) took 3.7s, 800743 effective words/s
gensim.models.doc2vec.Doc2Vec
#Doc vector: note here we use the original document tokens, not the tagged version
x = sentences[0]
print(x)
model.infer_vector(x)
['', 'bahia', 'cocoa', 'review', 'showers', 'continued', 'throughout', 'week', 'bahia', 'cocoa', 'zone', 'alleviating', 'drought', 'since', 'early', 'january', 'improving', 'prospects', 'coming', 'temporao', 'although', 'normal', 'humidity', 'levels', 'restored', 'comissaria', 'smith', 'said', 'weekly', 'review', 'the', 'dry', 'period', 'means', 'temporao', 'late', 'year', 'arrivals', 'week', 'ended', 'february', 'bags', 'kilos', 'making', 'cumulative', 'total', 'season', 'mln', 'stage', 'last', 'year', 'again', 'seems', 'cocoa', 'delivered', 'earlier', 'consignment', 'included', 'arrivals', 'figures', 'comissaria', 'smith', 'said', 'still', 'doubt', 'much', 'old', 'crop', 'cocoa', 'still', 'available', 'harvesting', 'practically', 'come', 'end', 'with', 'total', 'bahia', 'crop', 'estimates', 'around', 'mln', 'bags', 'sales', 'standing', 'almost', 'mln', 'hundred', 'thousand', 'bags', 'still', 'hands', 'farmers', 'middlemen', 'exporters', 'processors', 'there', 'doubts', 'much', 'cocoa', 'would', 'fit', 'export', 'shippers', 'experiencing', 'dificulties', 'obtaining', 'bahia', 'superior', 'certificates', 'in', 'view', 'lower', 'quality', 'recent', 'weeks', 'farmers', 'sold', 'good', 'part', 'cocoa', 'held', 'consignment', 'comissaria', 'smith', 'said', 'spot', 'bean', 'prices', 'rose', 'cruzados', 'per', 'arroba', 'kilos', 'bean', 'shippers', 'reluctant', 'offer', 'nearby', 'shipment', 'limited', 'sales', 'booked', 'march', 'shipment', 'dlrs', 'per', 'tonne', 'ports', 'named', 'new', 'crop', 'sales', 'also', 'light', 'open', 'ports', 'june', 'july', 'going', 'dlrs', 'dlrs', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'per', 'tonne', 'fob', 'routine', 'sales', 'butter', 'made', 'march', 'april', 'sold', 'dlrs', 'april', 'may', 'butter', 'went', 'times', 'new', 'york', 'may', 'june', 'july', 'dlrs', 'aug', 'sept', 'dlrs', 'times', 'new', 'york', 'sept', 'oct', 'dec', 'dlrs', 'times', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'destinations', 'u', 's', 'covertible', 'currency', 'areas', 'uruguay', 'open', 'ports', 'cake', 'sales', 'registered', 'dlrs', 'march', 'april', 'dlrs', 'may', 'dlrs', 'aug', 'times', 'new', 'york', 'dec', 'oct', 'dec', 'buyers', 'u', 's', 'argentina', 'uruguay', 'convertible', 'currency', 'areas', 'liquor', 'sales', 'limited', 'march', 'april', 'selling', 'dlrs', 'june', 'july', 'dlrs', 'times', 'new', 'york', 'july', 'aug', 'sept', 'dlrs', 'times', 'new', 'york', 'sept', 'oct', 'dec', 'times', 'new', 'york', 'dec', 'comissaria', 'smith', 'said', 'total', 'bahia', 'sales', 'currently', 'estimated', 'mln', 'bags', 'crop', 'mln', 'bags', 'crop', 'final', 'figures', 'period', 'february', 'expected', 'published', 'brazilian', 'cocoa', 'trade', 'commission', 'carnival', 'ends', 'midday', 'february']
array([ 0.03610306, 0.4675947 , -0.11293921, 0.01275209, 0.02118373, -0.01991585, 0.0903716 , -0.30116618, 0.393607 , 0.10620894, 0.3735147 , -0.09608354, -0.03236075, 0.2640607 , 0.22625874, 0.18729733, -0.0601288 , 0.00440659, -0.13365357, -0.15931958, -0.47695422, -0.35793763, -0.02224755, 0.14515047, 0.3916741 , -0.56137043, 0.33127272, -0.35305765, 0.04869743, 0.0112595 , -0.07757663, -0.26897618, -0.34656838, 0.5418403 , -0.08361343, 0.10836434, -0.17635383, 0.3026944 , -0.10270154, -0.23539136, 0.5550181 , -0.39617148, -0.2873986 , -0.39413577, 0.41587937, 0.3809863 , -0.09037528, 0.31573108, 0.42433524, -0.58286405, -0.02082546, -0.36957428, -0.13279356, 0.17719224, -0.07890309, 0.13383542, -0.0754401 , -0.09111372, 0.15481468, 0.4253859 , 0.15700078, -0.6438957 , 0.07334808, 0.01478348, -0.15924886, -0.4198704 , 0.04466495, -0.2670998 , -0.13409334, 0.19060026, 0.12122463, 0.09906378, -0.1638174 , 0.32702345, 0.28159162, 0.11414189, 0.28900012, -0.02620649, -0.11120996, -0.49712703, 0.00902044, 0.04763549, -0.5419336 , -0.23273303, 0.33933294, -0.01564949, -0.11969397, 0.3413236 , -0.3097591 , 0.22660622, -0.12204311, 0.1881168 , 0.22937122, -0.00277479, -0.33931175, 0.32631132, -0.09285857, 0.29002956, -0.20195127, -0.14094888], dtype=float32)
# Pick any document from the test corpus and infer a vector from the model
doc_id = 0
inferred_vector = model.infer_vector(sentences[doc_id])
sims = model.docvecs.most_similar([inferred_vector], topn=len(model.docvecs))
# Compare and print the most/median/least similar documents from the train corpus
print('Test Document ({}): «{}»\n'.format(doc_id, ' '.join(sentences[doc_id])))
print(u'SIMILAR/DISSIMILAR DOCS PER MODEL %s:\n' % model)
for label, index in [('MOST', 0), ('MEDIAN', len(sims)//2), ('LEAST', len(sims) - 1)]:
print(u'%s %s: «%s»\n' % (label, sims[index], ' '.join(docs[sims[index][0]].words)))
2019-05-18 11:46:16,961 : INFO : precomputing L2-norms of doc weight vectors
Test Document (0): « bahia cocoa review showers continued throughout week bahia cocoa zone alleviating drought since early january improving prospects coming temporao although normal humidity levels restored comissaria smith said weekly review the dry period means temporao late year arrivals week ended february bags kilos making cumulative total season mln stage last year again seems cocoa delivered earlier consignment included arrivals figures comissaria smith said still doubt much old crop cocoa still available harvesting practically come end with total bahia crop estimates around mln bags sales standing almost mln hundred thousand bags still hands farmers middlemen exporters processors there doubts much cocoa would fit export shippers experiencing dificulties obtaining bahia superior certificates in view lower quality recent weeks farmers sold good part cocoa held consignment comissaria smith said spot bean prices rose cruzados per arroba kilos bean shippers reluctant offer nearby shipment limited sales booked march shipment dlrs per tonne ports named new crop sales also light open ports june july going dlrs dlrs new york july aug sept dlrs per tonne fob routine sales butter made march april sold dlrs april may butter went times new york may june july dlrs aug sept dlrs times new york sept oct dec dlrs times new york dec comissaria smith said destinations u s covertible currency areas uruguay open ports cake sales registered dlrs march april dlrs may dlrs aug times new york dec oct dec buyers u s argentina uruguay convertible currency areas liquor sales limited march april selling dlrs june july dlrs times new york july aug sept dlrs times new york sept oct dec times new york dec comissaria smith said total bahia sales currently estimated mln bags crop mln bags crop final figures period february expected published brazilian cocoa trade commission carnival ends midday february» SIMILAR/DISSIMILAR DOCS PER MODEL Doc2Vec(dm/m,d100,n5,w5,s0.001,t3): MOST (0, 0.9320765733718872): «bahia cocoa review showers continued throughout week bahia cocoa zone alleviating drought since early january improving prospects coming temporao although normal humidity levels restored comissaria smith said weekly review the dry period means temporao late year arrivals week ended february bags kilos making cumulative total season mln stage last year again seems cocoa delivered earlier consignment included arrivals figures comissaria smith said still doubt much old crop cocoa still available harvesting practically come end with total bahia crop estimates around mln bags sales standing almost mln hundred thousand bags still hands farmers middlemen exporters processors there doubts much cocoa would fit export shippers experiencing dificulties obtaining bahia superior certificates in view lower quality recent weeks farmers sold good part cocoa held consignment comissaria smith said spot bean prices rose cruzados per arroba kilos bean shippers reluctant offer nearby shipment limited sales booked march shipment dlrs per tonne ports named new crop sales also light open ports june july going dlrs dlrs new york july aug sept dlrs per tonne fob routine sales butter made march april sold dlrs april may butter went times new york may june july dlrs aug sept dlrs times new york sept oct dec dlrs times new york dec comissaria smith said destinations covertible currency areas uruguay open ports cake sales registered dlrs march april dlrs may dlrs aug times new york dec oct dec buyers argentina uruguay convertible currency areas liquor sales limited march april selling dlrs june july dlrs times new york july aug sept dlrs times new york sept oct dec times new york dec comissaria smith said total bahia sales currently estimated mln bags crop mln bags crop final figures period february expected published brazilian cocoa trade commission carnival ends midday february» MEDIAN (3188, 0.31919094920158386): «south african firm to continue tests south africa state owned energy firm soekor said would continue tests striking oil kms miles south southwest mossel bay during production tests barrels oil five mln cubic feet gas per day produced said this oil discovery followed soon possible seismic surveys drilling should drilling tests area yield positive results oil production floating platform could considered director general mineral energy affairs louw alberts announced strike earlier said uneconomic» LEAST (679, -0.6017943024635315): «lt vista management inc to make acquisition vista management inc said agreed acquire general energy development inc dlrs cash financing come mortgage loans national auto service centers general energy operates»
/anaconda3/lib/python3.6/site-packages/gensim/matutils.py:737: FutureWarning: Conversion of the second argument of issubdtype from `int` to `np.signedinteger` is deprecated. In future, it will be treated as `np.int64 == np.dtype(int).type`. if np.issubdtype(vec.dtype, np.int):
https://srdas.github.io/MLBook/TextAnalytics.html#research-in-finance