Lieven Scheire
@lievenscheireTwitteraars die in discussie gaan met @Torfsbot, ik word daar toch telkens een beetje vrolijk van.
Twitterbot automatically imitating Rik Torfs (ex-rector KU Leuven), which accidentally became Belgium's most popular Twitterbot
TorfsBot was a bot that automatically imitated the tweets of Rik Torfs on Twitter. I launched it in 2016, and it got its first hundred followers in a single night.
The bot imitated the writing style of professor Rik Torfs, a canon lawyer and the former rector of KU Leuven. His tweets are aphorisms: short, often with a quip, in complex sentences with uncommon words and sometimes unusual grammar. That often makes them sound deeper than they are, which helps a bot that only strings his words together. Some example tweets of the real Rik Torfs himself:
Rik Torfs
@torfsrikIk zou ook wel links willen zijn. Maar daarvoor zie ik mensen te graag, en wantrouw de mensheid te zeer.
This style is sometimes imitated by Twitter users on the hashtag #tweetenzoalsrik. Rik also regularly writes columns in national newspapers, which, along with his tweets, served as the training data for the bot.
TorfsBot tweeted about five times a day, at random moments. It wrote its tweets in two ways: like the autocomplete of your phone, predicting one word after another from the words Rik Torfs used after the previous ones, or by swapping words in one of Rik’s tweets for words from his columns. TorfsBot preferred shorter tweets, since these are usually more interesting.
Robot Torfs
@TorfsBotVreemd hoe, in onze tijd van profane meningen, kerkjurist met competentie wordt verward.
TorfsBot also “read” Flemish news sources, so it could comment on the news just like the real Rik Torfs.
While the real Rik Torfs almost never replies to tweets, TorfsBot answered almost everyone who replied to it or tagged it. (Twitter’s rules only let a bot reply to people who interacted with it first.) To reply, TorfsBot
Joël De Ceulaer
@jdceulaerZiezo. Zonet het grote #dubbelinterview met twee van de #invloedrijkste #intellectuelen van #Vlaanderen gefinaliseerd. Zaterdag in #DeMorgen, morgenavond alreeds online voor de schrandere #abonnees.
Patrick Anthonis
@panthonis replying to @jdceulaer@torfsrik en @TorfsBot ?
Robot Torfs
@TorfsBot replying to @panthonisHet plezier van de twee.
You can see TorfsBot pick up on the words “erger” and “ik” to reply to the tweet commenting on Rik Torfs’ rector re-election loss:
Jeroen Baert
@jbaertIk vind het eigenlijk nog erger voor @TorfsBot.
Robot Torfs
@TorfsBot replying to @jbaertHet kan erger: ik had ook in de trein had kunnen zitten.
With a low probability, TorfsBot also replied to tweets of Rik Torfs himself, giving rise to interesting (albeit one-sided) “discussions” between the two.
Rik Torfs
@torfsrikHoe meer mensen door de coronacrisis in moeilijkheden komen of financieel afhankelijk geraken, hoe sterker de voedingsbodem voor extremistische partijen. En hoe lastiger het wordt om samenleving en economie weer op gang te krijgen.
Robot Torfs
@TorfsBot replying to @torfsrikIntegendeel, dat verenigt hen. Lastiger is dat spoorstakingen of de panda’s.
TorfsBot uses two different text generators at random to write its tweets. I explain the details in this paper, in this talk at ESSLLI and, in Dutch, in this talk at KU Leuven’s Metaforum (video). TorfsBot’s code is also available on GitHub.
Your phone’s keyboard can write a text by itself. Open a chat or a note, and keep tapping one of the words it suggests above the keys: after ten or twenty taps, you have a sentence that sounds a little like you. The keyboard can do that because it counted which words you usually type after which.
TorfsBot does the same with Rik Torfs’ tweets and columns. For every two to four words in a row in his texts, it counts which word came next:
Beste, gevolgd door “followed by”
Next wordTimes
After gevolgd door (“followed by”), Rik Torfs wrote een four times in his tweets and columns, zijn twice, and iemand and acht once. TorfsBot picks one of them at random, weighted by these counts: een half of the time.
To write a tweet, TorfsBot takes the first words of one of Rik’s sentences, and then keeps picking a next word from the words Rik used after the last few. Where Rik used a few words only once, there is only one way to go, so the bot copies him for a while. Where he used the same words in several texts, the bot can jump from one text to another:
TorfsBot Beste, gevolgd door een komma. Mails om niet te herinneren.
“Dear, followed by a comma. Emails not to remember.”
After om niet te
, Rik’s tweets go on with, among others:
Rik Torfs Beste, gevolgd door een komma. Mails om niet te lezen. Hoe kun je iemands beste zijn, zonder dat je zelfs maar een naam hebt?
“Dear, followed by a comma. Emails not to read. How can you be someone’s dear without even having a name?”
Rik Torfs Rome, rechtvaardige stad. Miskende genieën zijn voor altijd vergeten. Stenen verstaan de kunst om niet te herinneren.
“Rome, righteous city. Unrecognized geniuses are forgotten forever. Stones master the art of not remembering.”
TorfsBot’s tweet starts as a tweet of Rik’s from 2017, up to om niet te (“not to”). Rik wrote other words after those three too, and the bot picked herinneren (“remember”), from a tweet about Rome. The new tweet got more likes than the two it came from together.
TorfsBot prefers looking back four words, which keeps it close to Rik’s own sentences, but sometimes looks back only three or two, which gives it more ways to go. Looking back at only door een (“by a”), it could also have written “Beste, gevolgd door een tweet.”, taking tweet from a tweet of Rik’s about replacing the thesis by a tweet. Mixing these lengths (an interpolated Markov chain) makes the bot copy less, without sounding too random.
Since every three words in a row usually appear somewhere in Rik’s writing, TorfsBot’s tweets are locally coherent. But the bot doesn’t know what it wrote more than a few words ago, so a tweet can easily derail.
You can try it yourself in the demo below, which I made for AI voor Iedereen, the interactive AI course I wrote for KU Leuven. It learned from Rik’s tweets (not his columns) which words follow every two words, and it speaks Dutch, like his tweets.
The second method keeps the form of one of Rik’s tweets, but swaps some of its key words for words from one of his columns (a dynamic template). It takes a random tweet and a random passage from a column, works out what kind of word each word is (its part of speech: a noun, a verb, an adjective…), and replaces key words in the tweet with words of the same kind from the column:
Rik Torfs Zonder brilnoun zien we beter wat er niet is.
“Without glasses, we see better what isn’t there.”
Rik Torfs Zijn twijfelnoun is methodisch, een manier om tot waarheid te komen.
“His doubt is methodical, a way to arrive at the truth.”
Swap in a word of the same kind
TorfsBot Zonder twijfel zien we beter wat er niet is.
“Without a doubt, we see better what isn’t there.”
TorfsBot swapped the noun bril (“glasses”) in Rik’s tweet for the noun twijfel (“doubt”) from a passage about Descartes in one of his columns.
Such tweets have the form of a real Rik Torfs tweet, but the new words sometimes make odd combinations with the old ones.
From June 2017 to June 2023, TorfsBot’s 8,000 tweets got 17,000 likes and retweets. On average, a tweet written by autocomplete got 35% more likes and retweets than a tweet that keeps the form of one of Rik’s: sounding right from word to word mattered more than the form of the whole tweet. The paper had found the same in 2019.
After generating a text with either method, TorfsBot cleans it up by
If the final text is not too long, and original enough compared to the texts it learned from, it is tweeted at a random moment.

In 2022, I launched TorfsBot Or Not?, a Twitterbot that posted a daily poll with a tweet from either Rik Torfs or TorfsBot. It asked its followers whether they thought the tweet came from Rik Torfs or from TorfsBot. Whenever most people thought a TorfsBot tweet was originally from Rik Torfs, it told everyone that TorfsBot had passed the Turing test that day.
Is de tweet van Rik Torfs of TorfsBot?
@TorfsBotOrNotIdeologie troost. Bijvoorbeeld de ideologie dat wij maar erg weinig weten.
Is de tweet van Rik Torfs of TorfsBot?
@TorfsBotOrNot🚨 Het was een tweet van TorfsBot! TorfsBot heeft de Turingtest doorstaan!
Robot Torfs@TorfsBotIdeologie troost. Bijvoorbeeld de ideologie dat wij maar erg weinig weten.Over 602 polls, people cast 47,000 votes. 71% of the votes were right, and the majority was right in 87% of the polls: TorfsBot passed the test 68 times, and 12 real tweets of Rik Torfs were taken for TorfsBot’s. Tweets with more likes and retweets were more often taken for Rik’s: slightly for TorfsBot’s tweets, and more so for Rik’s own.
For more information, see the TorfsBot Or Not? project page or @TorfsBotOrNot on Twitter.
Hoe leer je computers humor? Slides View
Hoe werken tekstgenerators Slides View
Beter leren praten met Artificiële Intelligentie Slides View
Computational Humor: Can a machine have a sense of humor? Slides View
Computational Humor: Can a machine have a sense of humor? Slides View
Generating Philosophical Statements using Interpolated Markov Models and Dynamic Templates Slides View
Bibliotheek Middelkerke organiseert digitale belevingsbeurs: “We moeten onze inwoners helpen om bepaalde drempels te overwinnen” Read
A.I. - Lieven Scheire Clipping Read
Interview Series: In Conversation with BiblioTech Hackathon Participants Read
Twitter schrapt gratis API: het einde van (leuke) bots? Read
Maandoverzicht januari 2023 Listen
Podcast Jong Talent: Hoe herkent een computer humor? Listen
Maandoverzicht juli 2022 Listen
Maandoverzicht mei 2022 Listen
Interne Keuken: gesprek over TorfsBot en computationele humor Listen
De robot is al een grappenmaker, maar zijn samenwerking met de comedian loopt nog stroef Read
Maandoverzicht januari 2022 Listen
Maandoverzicht augustus 2020 Listen
Maandoverzicht september 2019 Listen
Student leert pc moppen tappen Clipping Read
TorfsBot Listen
Bots spelen sleutelrol in verspreiding fake news Read
#251 – De Lachkalender Olympics 3D Listen
"Tweets van Rik Torfs nabootsen is makkelijk" Clipping Read
RobBERT Humor Detection 2020 Distinguishing jokes from generated non-jokes, creating the first Dutch humor detectors
SamsonBots 2017 Six interacting Twitterbots based on Samson & Gert characters, an early multi-agent experiment
TorfsBot Or Not? 2022 Is the tweet from Rik Torfs or TorfsBot? A daily Twitter Turing test
Twitterbots 2015 Various little Twitterbots, mostly humorous @inproceedings{winters2019torfsbot,
author = {Winters, T},
booktitle = {31st European Summer School in Logic, Language and Information Student Session Proceedings},
month = {Aug},
pages = {181-189},
organization = {Riga, Latvia},
publisher = {ESSLLI},
title = {Generating Philosophical Statements using Interpolated Markov Models and Dynamic Templates},
year = {2019},
startyear = {2019},
startmonth = {Aug},
startday = {5},
finishyear = {2019},
finishmonth = {Aug},
finishday = {16},
language = {English},
conference = {European Summer School in Logic, Language and Information},
day = {5},
publicationstatus = {online-published},
}