clock menu more-arrow no yes

Want a State of the Union that's 50% Obama and 50% Jefferson? There's an app for that.

Bill Pugliano/Getty Images

There's pretty much no chance that President Obama's State of the Union address will make everyone happy.

But this tool might.

To be clear, it's not an alternative to watching or listening to the actual speech. You should definitely do that.

But, in addition, you can use the nonpartisan Sunlight Foundation's State of the Union Machine to create remarks that are specially designed for you, based on the words of your favorite presidents.

The Sunlight Foundation

The "machine" lets you adjust the amount of input from presidents from Obama, to Reagan to Roosevelt. Then, you can hover over each line of your personalized fantasy speech to see whose words inspired it.

It gets a little more technical than that. If you're as interested in things like "n-gram models" as you are in politics, you'll want to check out the Sunlight Foundation's explanation:

The State of the Union Machine uses models of language to randomly generate text based on different presidents' previous speeches. These models are called "n-gram models" or "Markov models," and are used in many places, from machine translation to DNA sequencing. There is one model for each president, and each sentence is generated using a single model, using inputs from the previous sentence as context.

The models are trained on a corpus of text, and they learn about the probability of a word given its preceding context. It's a bit like a robot that learns how to fill in the blanks. For instance: Models trained on recent presidents have learned that the words "my fellow" are frequently followed by the word "Americans."

Our models were trained on previous State of the Union deliveries, which are archived by researchers at the University of California, Santa Barbara'sAmerican Presidency Project. They were trained using the Natural Language Toolkit's language modeling tools.

Enjoy!