Skip to main content

Generating Tweets Using Kim Kardashian’s Twitter.


Auto generate tweets, tweets generation, random twitter generator

 

For an experiment, I decided to try to generate tweets using the Markov Chains algorithm. I thought it would be interested to see the stream of words that will be picked if I fed the algorithm short and usually unrelated set of texts (Tweets). Often, when working with an algorithm like Markov Chain, you would give it a book or paragraphs that it can learn from, and it would generate some text that would fit the given input.

I want the algorithm to represent someone. Picking words from a specific person and see their vocabulary and what can be generated with it. I wanted the person to have light tweets. I didn’t want to pick a political or a controversial figure. So I thought Kim Kardashian West would be the first in my experiment, and there will be more to come. It will be interesting to see patterns and word choices in these generated tweets.

Development

Recently, I have been developing for iOS more than any other platform, and because of this swift became my go-to language for development. There are many existing implementations of Markov Chain in swift (check this link to the one I used in my application). The tweets were Kim’s most recent 2000 tweets. To retrieve the tweets, I used Twitter’s API, which offers a lot of information that can be utilized for many project ideas and data analysis.

Tweet Tweet Tweet

Now to the generated tweets. I’m not going to lie and say that it all makes 100% sense. Most of them make some sense, and then they will go in a questionable direction. Another observation that can be made is that a lot of the tweets look like advertisements for products since Kim does advertise a lot in her account. I have removed links from the generated tweets and replaced them with [link to a website]

“the Cotton Collection on the entire Body Foundation. Children have died. Children have cleaned up #KKWBEAUTY Aww I hope everyone saw Malika’s interview. [link to a website]Being an inspiration ✨ ”

As you can see from the tweet above, emojis can be a part of the text since they are considered characters. Here are more!

“the #JesusIsKing vibes [link to a website] 😂🙏🏼🤯 Kanye really want a solid alibi.”

The connection between Kanye and #JesusIsKing is clear. The probability is high between the hashtag and the person. It would be interesting to look at controversial figures’ mentions and see the hashtags that are more generated with their name.

“I hate red 🔥 ‘JESUS IS KING’ has come out and enjoy free shipping on Friday, 07.19 at it”

Looking back at the original tweets, Kim has used “and enjoy” 15 times in her most recent 2000 tweets. This is a pattern the algorithm has noticed. The probability for “enjoy” to follow “and” in her tweets is high.

“the murderer!!!! He inspires me 😂”

This one is disturbing. No other comments.

“The #ArmenianGenocide !!!!!! Stay tuned.”

When I looked back again at Kim’s original tweets, I saw that she uses a lot of exclamation points!!! and they tend to be three or more!!! Now I can’t unsee them!!!! they are everywhere in her original tweets!!!! Let’s ignore the frightening message!!!!

“the solution is short. I want to keep the solution”

Now, this could be a sign that I read too many broken tweets and now my brain is making sense of the none sense, but I can see the tweet above as a quote from a wise old man alluding to Keeping things as is. You have the solution, no need to look further.

Here are more of the ones that make some sense:

“I can’t believe he’s innocent man awaiting execution”

“I want to give us Oreos ✨ #HappyBirthdayKKW”

“I’m wearing the Cotton Collection now”

“I’ve been eating super dry. I eat sugar”

“I picked out invites for the entire world.”

Thanks!!! to fake Kim!!!! for the invites!!!!!!! and thank you for making it through the article.

Comments

Popular posts from this blog

How to Display Fractions in Swift & SwiftUI

How To Display Fractions & Special Characters in Swift & SwiftUI Using NSLocalizedString to convert double values to strings NSLocalizedString NSLocalizedString takes a key and a comment and returns a localized value of a string. You can pass Unicode characters to NSLocalizedString and have your special character displayed inside your app. Example To display a fraction, you can use a numerator Unicode, fraction slash Unicode, and a denominator Unicode. The Unicode for numerators is \u{207 x }. The x is a number in this set {0,4,5,6,7,8,9}. A fraction slash is \u{2044}. Lastly, the Unicode for denominators is \u{208 x }. Unlike the numerators, the x is a number between 0 and 9. You can create a string variable that holds the fraction 4/5 in SwiftUI with the code below: There are existing Unicode characters for common fractions such as \u{00BD} for 1/2. You can use the function below to return the common fractions. Pass a double value to the function and it will return the Unic