Soon, the speeches that we hear from political figures may be the product of an AI machine that has been specifically designed to write political discourses.
There seems to be a formula to writing speeches. For instance, political speeches sound similar and tend to have a standard format. Arguments in these political discourses seem to be repeated as well. Speeches also seem to use familiar phrases that show the speaker's certain political affiliation or ideology.
Valentin Kassarnig of the University of Massachusetts Amherst took all of these into consideration and made an AI machine to rival human speech writers.
"In this report we present a system that can generate political speeches for a desired political party," wrote Kassarnig. "Furthermore, the system allows to specify whether a speech should hold a supportive or opposing opinion."
Kassarnig said that in order to start training a machine-learning algorithm, he first built a database of around 4,000 political speech nuggets that he got from 53 Congressional floor debates in the United States. He gathered more than 50,000 sentences out of the speeches, with each sentence having 23 words on average. He also divided the speeches into categories depending on the political party (Democrat or Republican) and whether the speech is for or against a certain topic.
After trying various database analyzing techniques, Kassarnig decided to use a method based on the n-grams approach, which focuses on analyzing sequences of words or phrases.
First, he studied and tagged each word based on what part of speech it is (noun, adjective, verb, etc.).
Next, he turned to 6-grams and tried to determine all the words that can appear after the five previous ones, which include the probability of their appearance.
When these steps are accomplished, the process of creating speeches will automatically follow.
In his report "Political Speech Generation," Kassarnig also indicated the use of two underlying models from where he based the probabilities in the word sequencing. The language model handles the grammatical correctness of the speech while the topic model is aimed at achieving textual consistency.
He added that he also used both the manual and the automated approaches when evaluating the quality of AI machine-generated speeches. After performing an experimental evaluation, Kassarnig learned that in essence, generated speeches are good when it comes to correct grammar and the way the sentences would transition.
If you're curious to know whether a machine can actually generate good speeches, here is one example of a speech with a Democratic tone that was generated automatically by the AI algorithm.
"Mr. Speaker, for years, honest but unfortunate consumers have had the ability to plead their case to come under bankruptcy protection and have their reasonable and valid debts discharged. The way the system is supposed to work, the bankruptcy court evaluates various factors including income, assets and debt to determine what debts can be paid and how consumers can get back on their feet. Stand up for growth and opportunity. Pass this legislation."
While the AI algorithm shows huge potential in generating decent political speeches, Kassarnig is not limiting the potential of the algorithm to just politics. Instead, he suggests that the algorithm can also produce other types of texts, including news articles and blog posts.