After I wrote twitstash, one of the first ideas I had was to build a Twitter bot to convert every tweet I sent into broken English (or “Engrish”) and repost it. The bot eventually grew into an abstract framework to run tweets through any pair of intermediate languages, with a predefined number of “back-and-forth” cycles (similar to the way the site Translation Party works) and post the output to another account. This framework was packaged into what is now called twanslationparty.
twanslationparty is a PHP script, invoked by the system cron immediately after a twitstash run has completed. The database schema is simple, maintaining a one-to-one mapping of source tweet ID and destination tweet ID. If a new tweet is found in the source table that does not have a corresponding entry in the destination table, the tweet is considered “new” and processing proceeds. If any tweets become marked
deleted in the source table, twanslationparty deletes the corresponding corrupted tweet from the destination account.
The translation uses the Microsoft Translator API, translating all input text from English to Japanese and then back to English. It repeats this cycle three times, or until the output text exactly matches the output of the previous cycle (thus rendering future translation cycles pointless). In the decade since this bot was originally created, machine translation has become much better, to the point where the output text usually matches the input text very closely. On rare occasions, however, the translation can be so laughably bad that I can’t fathom how it produced the output it did.
twanslationparty attempts to salvage URLs, @mentions, and #hashtags whenever it can, allowing the bot’s output to thread correctly in conversations between the source account and other users. This is often annoying and inappropriate, and that’s exactly the point of the project’s existence.