Inspiration

Cher has a huge presence on Twitter, and her unique syntax, word choices, use of emojis and pattern of capitalization have been a beacon of hope and entertainment during the fraught years of Trump's presidency and the COVID-19 pandemic.

I wanted to take a deeper dive into the creative ways that she strings together her words/emojis and the way that she capitalizes her words, in a seemingly random yet organized way.

What it does

This project queries Cher's recent tweets.

Mapping a Word to its Next Words

After removing hashtags, @mentions and embedded links, it examines the sequence of words/emojis and maps each word to all the words that immediately follow it. Then, it graphs the relationship between these words in a network graph.

Examining capitalization

To examine the pattern of capitalization, I built a basic Markov model to compute the probability of the following word's [un]capitalization state conditional on the "current" word. Then, I created an interactive bar graph to visualize the conditional probabilities.

How we built it

I used Python to build this project. The libraries I use are: networkx, to build the network model, plotly to make graphs, pandas, and emot to handle emojis. I also used Twitter's API to get the data.

Challenges we ran into

The main challenge I ran into was the limit that Twitter sets on the number of recent tweets a non-premium/non-academic user can query. Because of that I could only query 10 tweets, which significantly limited the robustness and the power of this project.

Accomplishments that we're proud of

I'm really proud that I got to visualize the the words in a network graph and I'm really proud of the Markov model I implemented. Thinking about the conditional probabilities was very cool, and it deepened my interests in stochastic processes.

What we learned

I learned how to do more complex string manipulations and to clean the data. I learned to visualize data that uses javascript under the hood, so some of the syntax felt a bit strange.

What's next for Cher

I want to get an Academic access for Twitter's API so that I can get more tweets. With those tweets, I want to create an iOS Keyboard plug-in an NLP algorithm that can predict/suggest the next word to use in style of Cher's word/emoji choice and capitalization choice.

Built With

Share this project:

Updates