After watching James Pennebaker's TED talk on the secret life of pronouns, I was so intrigued by the power of language and how much we could analyze and understand about ourselves from what we say. So, I decided to analyze my messages. This week, I will extract and clean all the data I need. Next week, I will run words count code on my messages to get counts for pronounces. I also want to use sentiment analysis (https://learn.ml5js.org/#/reference/sentiment) to analyze conversations between my boyfriend and I or between my close friends and I to see how close we are or how much we really care about each other. It will be fun!
I tried two ways to extract the messages from my iPhone. One is a Python script I found online (https://github.com/janw/imessage-parser), which didn't work. The code has no error, but the downloaded file was empty. I asked around to see if I missed anything in the code, but everyone got the same result at the end. The code was from 6 years ago and outdated.
Another way is to use SQLite. I was able to extract all messages from my iPhone successfully. I followed this tutorial. First, I synced all my messages by enabling iCloud under settings. Once everything is synced, I opened chat.bd file in Open Database on SQLite. Also, remember to give full disk access to SQLite under Apple's security setting. This is what you will see (under text column, it's where all your messages are):
I filtered out all the messages that were sent by me with this code:
I ran the code and was able to download the cvs file!
Comments