galatolofederico / chat-miner

Lean parsers and visualizations for chat data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chat-miner: parsing of chat histories

License: MIT Code style: black

chat-miner parses chat logs into a pandas dataframe. As of now, WhatsApp, Signal, Telegram, and Facebook Messenger export files are supported.

Export chat data

WhatsApp (via mobile app)

Signal (via desktop app)

Telegram (via desktop app)

Facebook Messenger (via mobile app)

Usage

Following code showcases the WhatsAppParser module. The usage of SignalParser, TelegramJsonParser, and FacebookMessengerParser follows the same pattern.

from chatminer.chatparsers import WhatsAppParser

parser = WhatsAppParser(FILEPATH)
parser.parse_file_into_df()
print(parser.df.describe())

Example visualizations

import chatminer.visualizations as vis
vis.sunburst(parser.df)

Sunburst

import chatminer.visualizations as vis
stopwords = ['media', 'omitted', 'missed', 'voice', 'call']
vis.wordcloud(parser.df, stopwords)

Wordcloud

About

Lean parsers and visualizations for chat data

License:MIT License


Languages

Language:Python 100.0%