Yodifier
With you, may the force be. #Yodified
— Yodifier (@yodifier) July 30, 2017
@Yodifier is a Twitter bot I wrote that searches for tweets that contain #YodifyMe and responds to them with a "yodified" version of their original tweet. It was written in Python using the Tweepy library to interface with the Twitter API, and uses a rule-based system based on part-of-speech (POS) tagging and syntax parsing of the input to generate the yodified version.
It first determines if the tweet is "clean" enough for it (English, one full sentence, etc.), then it uses Spacy to generate the syntax and POS information. It runs through a list of rules, looking for the first pattern that matches the sentence. Each pattern has an associated function which is used to manipulate the input and create the yodified version, which is then tweeted out in response to the original tweet.
An example of tagged input and the resulting output is shown here:
It first determines if the tweet is "clean" enough for it (English, one full sentence, etc.), then it uses Spacy to generate the syntax and POS information. It runs through a list of rules, looking for the first pattern that matches the sentence. Each pattern has an associated function which is used to manipulate the input and create the yodified version, which is then tweeted out in response to the original tweet.
An example of tagged input and the resulting output is shown here: