Categories
Uncategorized

“SwiftKey Speaks”: Playing With Natural Language Processing Algorithms

I had hoped to have this ready for the “Dork Shorts” session at THATCamp Prime this weekend, but found myself pressed for time. So here’s a belated (and probably too long) Dork Short, in text form.


SwiftKey X is a keyboard program for Android that uses natural language processing algorithms– the sort that are used for discourse analysis, spam filters, and the like– to predict your next word before you type it. By analyzing the language from your text messages, twitter posts, email, and other sources, it becomes quite good at guessing what you might be saying. If you’re texting your friend that you need to go home to walk the dog before you meet up, it will see the string “I have to run home to walk…” and predict “the,” and if you select “the,” it will know the next likely word will be “dog.” If you’re using it for a while and give access to enough of your corpus of generated text, it might even suggest “Sparky” along with “the,” because “Sparky” is the name of your dog, and you frequently refer to him by name.

Swiftkey works pretty seamlessly, and I find that it makes for a much more pleasant and efficient keyboard program than the standard Android keyboard, or even my old replacement, Swype.


However, as well as SwiftKey’s predictive algorithms work, you really need to have a person at the reigns. Letting the algorithm drive and not steering the content can lead to results that range from comical to nonsensical to the almost poetic.

I thought I was the only one who got a kick out of letting the algorithm auto-generate a sentence without context until I saw this comic in xkcd last week:

The SwiftKey team, recognizing that even being jibed a bit by a site as popular as xkcd is good press, smartly went with this, and asked their blog’s readers to post the sentences that were produced by hitting their own “central prediction key.” (SwiftKey generally presents three predictive guesses for each next word or punctuation mark. The center key is the most likely.)

The responses were amusing: “I am not allowed to tell anyone so keep that in the US,” and “I am a giant popsicle of sleep.” They also, however, highlighted the powerful personalization that comes with using the algorithm with a corpus culled from your own writing: no two seem to be alike.

Personally, I get “I am on my way sorry lost track of time, meant to be a little late.” It’s a powerful comment on my punctuality (and on the unpredictability of public transit in the Metro DC area.) My SwiftKey corpus also seems to be hungry– a very popular sentence in my SwiftKey autotexts is “I am grabbing a sandwich.”


Discovering the sentence generated with the central prediction key is a fun exercise, a nice parlor trick or conversation starter. But it doesn’t really lend itself to repeated iterations. For this reason, it’s probably inevitable that I would create something for myself like this project:

SwiftKey Speaks” is a site where I record the outcomes of a predictive-text game I have created for myself on SwiftKey. The game itself is simple: I start with a single, randomly-selected word. And then I write, each word selected from one of the three suggested next words, until I feel I have reached an end or SwiftKey gives me no choice but to end the paragraph. Sometimes I reach a dead-end, and the prose degrades to the point where it’s no longer comprehensible. Then I go back a few words and start in a different direction.

I have long been interested in the poetics of spambots, at the ways that computer-generated language can so closely resemble real communication, but still lingers in this linguistic uncanny valley. Add that to a love of language games and found poetry– and a healthy dose of technophilia– and you can see why a game like this is so much fun for me.

Likewise, I have both a predisposition toward and an intellectual interest in what Mary Flanagan has called “subversive play,” that is, play that works contra the game’s design. To put it another way, it’s hacking a game from it’s insides. It’s the ludic pleasure derived from discovering that in certain games, the Master’s tools can dismantle the Master’s house. As long as you remember that you can repurpose those tools, and that a hammer can also be a crowbar.

As a game, “SwiftKey Speaks” is deeply subversive of the technology it uses. SwiftKey X was designed to assist in writing what you think. “SwiftKey Speaks”  a complete inversion–you are not interested in communicating anything, but simply making novel sentences. It’s taking a utilitarian tool and making it an instrument of whimsy.

Moreover, it subverts the typical game dynamic. Most games set the parameters and rules, and the player has to work within these. Playing “SwiftKey Speaks,” the user is constrained by the parameters of the software, but pushes back, setting parameters for the software. The game play feels more like an interplay, a dynamic relationship, where both you and the software are changing the rules on the fly, interdependent.

It starts to feel like a cyborg equivalent of Facilitated Communication— by selecting the next word from the field of three, you’re trying to help out a buried intelligence that doesn’t fully grasp the language it wants to use. Because it uses a corpus of your own words to feed its algorithms, SwiftKey starts to feel almost human, in a strange way. You and the bot in your phone share interests, passions, tics of language, and an enjoyment of a good sandwich.

The experience of playing with it almost starts to remind me of Ted Infinity and Nabil Hijazi’s excellent short story The Peacock, a love story about a man and a sentient spambot.


…At any rate, it’s a fun little game that I can play on the Tumblr app on my phone while waiting in line or riding the subway. I’m not sure how long it will keep being fun, but I intend to keep playing, and recording the outcomes, for as long as it is. And I’m curious to see if others find the project interesting, or want to play the game themselves.

4 replies on ““SwiftKey Speaks”: Playing With Natural Language Processing Algorithms”

That’s pretty awesome! It’s always cool to see developers playing with what they make.

I thought the Jubilee update was a nice touch, too. (Not to mention how fascinating it was to look at even a rudimentary analysis of the Queen’s speech…)

That’s pretty awesome! It’s always cool to see developers playing with what they make.

I thought the Jubilee update was a nice touch, too. (Not to mention how fascinating it was to look at even a rudimentary analysis of the Queen’s speech…)

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php