
I won’t go into too much detail here as the slack documentation is good but here’s a brief explanation of how to get the chat history for a channel. I used slack as I thought it was a nice example for taking data from an arbitrary source and processing it. I ran this against a slack channel with friends. I know I don’t need to say this but obviously be careful and understand the sensitivity of your slack data. Pip install jupyter slack-sdk nltk numpy pandas matplotlib Get Data from a Slack Channel It is using pipenv to manage dependencies so if you follow the Readme and you have a recent version of python as well as pipenv installed, you should be good to go. The easiest thing to do it the clone this GitHub repository. In this article we will look at all the steps in excruciating detail so we really understand how it all works. The jupyter notebook in it also includes a lot of the instructions from here. If you just want to look at some code, this GitHub repository has everything. Prepare a docker image with our model so we can deploy and use it as a service.Test our own model and use it on the slack data.Train our own custom model with some training data.Use a pre-trained model to classify sentences from the chat as positive or negative.Use some python tools to process and inspect the chat data.Download chat history from a public slack channel (which is optional as you can really use any text).To add some level of (perhaps impractical) practicality we will look at analysing text from a Slack channel. Negative being generally critical in nature. Positive being generally complimentary in nature. We will keep it simple and only look at determining if some text is positive or negative.

Sentiment analysis, in the context of this article, is the use of natural language processing to quantify the general opinion or mood of some text. Ruairí's Blog Check the Mood of a Slack Channel using Machine LearningĪ thought, opinion, or idea based on a feeling about a situation, or a way of thinking about something
