This is a slack bot which will add monitoring on the required slack channels and report the messages with details if they are found offensive.
This is implemented using
- Hubot - a scriptable chat bot
- MongoDB
- IBM Watson AlchemyLanguage API
The dashboard is implemented using
- AngularJs
- same MongoDB instance
-
Node 6.x and MongoDB have to be installed.
-
Create a bot integration in Slack web page as mentioned below:
-
Save the integration by filling the details and save the Slack token generated.
-
Run the following commands for building required node modules and starting the bot:
npm install
HUBOT_SLACK_TOKEN=xoxb-************-************ ./bin/hubot --adapter slack &
- Add the bot as a normal user in the slack channel where monitoring has to be done.
- The bot will monitor every message in the channel and checks whether it has any foul words in it. This would be first level of filtering[1].
- If any bad words are found, then the message will be sent to IBM Watson AlchemyLanguage API to get the emotion levels of the message[2].
- If the emotion results of Anger/Disgust/Fear turned out to be greater than 30%, then the users in the Slack channel will be notified with a link to report this. (The user will be unaware of the entire process)
- Upon clicking the link, the report will be submitted. (Stored in MongoDB)
Admin can login to a web application to see the submitted reports and other statistics.
User can see the usage statistics of the words entered with timely displayed graphs.
[1] . Foul Words Dataset - #link#
[2] . IBM Watson Developer Cloud - AlchemyLanguage API - https://www.ibm.com/watson/developercloud/alchemy-language.html