Create a word cloud to expose your or your friend’s most common words based on your Messenger history
This repository contains an easy-to-use program, which let you easily generate a graphic with a word cloud, which displays the most frequently used words or phrases on Messenger by you or your interlocutor.
Generated sample word cloud:
It uses Python with basic libraries, this word cloud generator and matplotlib library in versions:
python==3.10.6
wordcloud==1.8.2.2
matplotlib==3.6.1
Besides, to run word-cloud.ipynb
(an alternative to word-cloud.py
) you need a program that supports jupyter notebooks.
jupyterlab==3.4.4
IPython==8.4.0
It's really easy.
-
Download the data from your Facebook account (instruction).
-
Put all unpacked data into the
data
folder. -
You can put your stopwords (words to be omitted) in the
my-stopwords.txt
file. -
Launch the program. You'll see the top 10 users with the most messages.
- Select the user for whom you want to generate a cloud of words. You can do this by entering a place in the list generated above, (e.g.
1
) or by entering any full username, such asMark DeVolay
.
That's it, the cloud should be generated and placed in the word_clouds
folder. I hope you will be satisfied with the effect.
Have fun!