/TrumpSpeechAnalysis

Various and sundry natural language assessments of Donald Trump's speech patterns

Primary LanguageMATLAB

Trump Speech Analysis

Various and sundry natural language assessments of Donald Trump's speech patterns. Not intended to be consistent or complete: just some fun comparisons between corpora. Not appropriate for scientific application. Perfectly appropriate for presidential mockery.

alt tag

Fun things I should do (feel free to add!)

Tune up the Markov model (preferably with a larger corpus) and adjust the lookback to produce more reasonable sentences/ less straight up phrase replication.

Clean up non-words in Obama corpus.

Use a better metric than z-score frequency in the breakdowns and exclude words above a certain frequency in the general English corpus/ words that are used purely for syntactic structure in English and are unlikely to be very funny (the main goal of the entire enterprise).

Trump text complexity using textstat (https://pypi.python.org/pypi/textstat/)

Flesch reading ease (see table on textstat page): 86.71

SMOG index (years of education needed to understand a piece of writing): 3.1

Grade level based on the Flesch-Kincaid Grade Formula: 3.7

Grade level based on the Coleman-Liau Index: 7.81

Grade level based on automated Readability Index: 5.3

Grade level based on the Gunning Fog: 6.0

Average grade level based on preceding tests (and some other stats included by the authors): 3th and 4th grade

Obama text complexity using textstat (https://pypi.python.org/pypi/textstat/)

Flesch reading ease (see table on textstat page): 61.67

SMOG index (years of education needed to understand a piece of writing): 3.1

Grade level based on the Flesch-Kincaid Grade Formula: 9.1

Grade level based on the Coleman-Liau Index: 10.56

Grade level based on automated Readability Index: 10.7

Grade level based on the Gunning Fog: 9.2

Average grade level based on preceding tests (and some other stats included by the authors): 10th and 11th grade

Trump sample Markov speech

That's where human beings to create jobs here in Washington. And we also recognize that government is now in jeopardy. Nearly 10 years from now, you'll look back on its miners not do this knowing that it protects, then Iran will face more than one million electric vehicles is the reason a young girl who yearns to be here with a college education more affordable health care costs, we are close, I've got such vigorous sanctions is because they shared Ted’s ideology or his office. The same social media tools, and new opportunity, and to report back to the aid of his oppressor so that the African American boys are more than just the greatest generation of veterans health care crisis, and the direct mail pieces that emerge from two wars and terror was used for peaceful solutions. And then I'll take your deposits, to take a risk and cost the American people demand it. We make sure that their basic human dignity is denied, America opposes poverty and disease. And as we gather once more -- and the better over the past week, including this morning’s news about Citigroup, has made this country -- now, everybody, I want to thank my wife, my daughters, I thought it was also important for Congress to give up on yourself, it’s quitting on your graduation. And through it all, but couldn’t engage with the G20 nations in London and Amman and Bali. What they like to welcome President Aquino earlier this year, I directed Leon Panetta, the director of the White House Correspondents Dinner -- the rights of all we’ve lost to al Qaeda is part of a long way since I last spoke here at home. This approach is to lay out what they look like previous German and American workers, and advisors -- are serious about upholding these principles. That’s what our last troops to win the bigger victories of my countrymen have come from the Business Roundtable did their own minds. Throughout, we have to act. I want to speak out on the Democratic Party; and the money Wall Street executive, but I look forward to. But then people, rightly, ask, well, what safeguards do we harness the renewable energy will have the privilege to look at impoverished parts of the heavy weight of the people of Ukraine mobilized popular protests and struggles, on the GI Bill generated a middle class than a good bill. Our program to provide some reflection and debate -- and this Administration in the next phase of economic transformation and individual opportunity that we face down the deficit. Peace in Mali, where people without prospects for the United States, and the need for further scientific analysis, delayed the greenhouse gas permitting rules for Wall Street infected nearly every American. It was here where we go forward, the United Kingdom, with Russia, China, and I also want to thank General Colt for welcoming me here today, along the fault of their 4,000 employees when the struggle of human beings. I want you to my first visit, just months after the ceremony maybe you can continue to come here. It requires everything from education to do better, grow faster, draw more investment than those who have killed thousands of teachers in every corner of the world's dangers, while seizing its promise. We’re considering every single day -- that would have been held accountable.

Obama sample Markov speech

So today, we have chosen hope over fear. Now, here's what we make difficult budget decisions while keeping an irresponsible, law-breaking few from inflicting harm. Part of that absence. To the families dealing with new workers. And change is if I decide that it’s going to face. Everyone please have a strong Security Council that includes leaders who are still inspiring us. Their feeling was these companies prove that there’s a lot more material prepared, but I intend to pursue your own sweat and blood, and sometimes just plain tricked, into buying homes they couldn’t reach a level playing field; where the U.S. Federal Aviation Administration reinstated the Philippines could take to create a safe surrender, saving those American lives. I want to thank President Hennessy for not doing a “pinprick” strike in U.S.” It came during what the U.S. auto industry that creates new incentives to move forward, we need a strategy that ensures billionaires with high-powered accountants can’t work the system that automatically equates more expensive every year. People don’t remember -- soldiers who send out Social Security and Veterans Affairs, as well as anybody -- we didn’t stop. That's right: the ability to choose revolution over tyranny. We haven’t talked to Julie -- there can be sent into harm's way overseas, I have no idea he might know a family in America should intervene at all of their hopes -- simple yet profound -- that received the best he could be more grateful for your courage. Today, we send to Congress before this crisis hasn’t been working to make it because of politics is the oldest continuously occupied military post in America -- so I don’t think that somehow by the painstaking work of keeping our high school baseball coach once remarked, “I’m surprised he still got to compete in a valley when they could ultimately achieve, they've already failed. But if you know your districts better than me. I remain ever hopeful about America; not because it was in Myanmar would not leave his head. Because our economic advisers. Well, we’ve now gotten their wish. I am not in this room were born into, or how we have to return to the same time, community colleges like this never happens again. And the fact that I think President Mays put it well: “Terror is not whether things will help millions of its stockpiles. But the truth that in this situation are never again threaten America again. That we cannot afford.

Trump word use above the SUBTLEXus frequencies

alt tag

Trump word use under the SUBTLEXus frequencies (some non-word artifacts from SUBTLEXus)

alt tag

Trump words used at frequencies greater than by President Obama

alt tag

Obama words used at frequencies greater than by President Trump

alt tag

Trump versus Obama age of word acquisition distribution

alt tag

Some stats on polarity and subjectivity

alt tag

Special thanks

https://github.com/ryanmcdermott/trump-speeches/blob/master/speeches.txt

http://www.ugent.be/pp/experimentele-psychologie/en/research/documents/subtlexus

https://raw.githubusercontent.com/samim23/obama-rnn/master/input.txt

http://crr.ugent.be/archives/806

https://github.com/jsvine/markovify

https://pypi.python.org/pypi/textstat/