As of now, only WhatsApp and Signal chats are supported.
- Go to the app
- Go to Settings/Chats/Chat History
- Tap Export chat
- Select the chat you want to export
- Open a Terminal
- Run
pip install signal-export
(This will install signal-export on your computer) - Run
sigexport ~/signal-chats
(This saves the Signal chats in~/signal-chats
)
The following code uses the WhatsAppParser
module to:
- Read a chatfile
- Infer its datetime format
- Parse its content into a DataFrame
- Add additonal metadata columns
from chatminer.chatparsers import WhatsAppParser
parser = WhatsAppParser(FILEPATH)
parser.parse_file_into_df()
print(parser.df.describe())
import chatminer.visualizations as vis
vis.sunburst(parser.df)
import chatminer.visualizations as vis
stopwords = ['media', 'omitted', 'missed', 'voice', 'call']
vis.wordcloud(parser.df, stopwords)