loading...

NLP, Visual Recognition and Serverless example — a chatbot moderator

lidderupk profile image Upkar Lidder Originally published at Medium on ・2 min read

NLP, Visual Recognition and Serverless example — a chatbot moderator

IBM team presenting a webinar

Lisa Jung and I presented a webinar on creating a chatbot moderator that tells people to be polite when they say something rude on Slack or post an appropriate picture. For the image bit, we changed the code to treat any dog pictures as rude pictures instead of looking for explicit pictures.

We used a couple of different IBM Services in this demo.

  1. We used IBM Natural Language Understanding to analyze text for rudeness. You can find more information here.

Analyzing a speech at the Federal Reserve Bank using IBM Natural Language Understanding service

  1. We used IBM Visual Recognition service to detect explicit pictures (pictures of a dog in this case). Read more here.

Analyzing an image with IBM Watson Visual Recognition Service

  1. Finally, we used IBM Cloud Functions as the serverless platform to glue everything together. Learn more here.

This is the flow of the use case:

  1. The user enters text or an image in a Slack channel.
  2. Slack pushes this content to the IBM Cloud Function action.
  3. If the input was text, the action invokes Watson Natural Language Understanding service to determine the rudeness.
  4. If the input was an image, the action invokes Watson Visual Recognition service to determine if it is not safe for the channel.
  5. If the input was “bad”, the action removed the image and tells the user to be more polite. It does so by posting directly in the Slack channel.

a chatbot moderator

You can view the full recording on crowdcast.io [https://www.crowdcast.io/e/a-moderator-using-nlp-vr]. You can get the complete code and try it out for yourself in this github repository. Hope that was fun! Join us for future webinars, in person meetings and workshops!

Thanks Max Katz and IBM Developer for hosting!

Posted on by:

lidderupk profile

Upkar Lidder

@lidderupk

Upkar Lidder is a Full Stack Developer and Data Wrangler with a decade of development experience in a variety of roles. Educated in Canada and currently residing in the USA. <3 Python and JS!

Discussion

pic
Editor guide