Image for post
Image for post
Photo by Chris on Unsplash

Chatbots: When To Use NLP & When To Use NLU

Improve Chatbot NLU Resilience By Adding An Initial High-Pass NLP Layer

Introduction

Image for post
Image for post
Complex Entities Which Are Linked and Truly Contextual.

A Different Approach

Step 1: Automatic Language Detection

Step 2: Sentence Boundary Detection

Image for post
Image for post
Sentence Boundary Detection using spaCy

Step 3: Find All Named Entities

Image for post
Image for post
Extracting Named Entities from a Sentence
Image for post
Image for post
Detail On Each Named Entity Detected

Step 4: Determine Dependencies

Image for post
Image for post
Python Code To Determine Dependencies
Image for post
Image for post
Matrix Of Returned Data

Step 5: Clean Text From Any Possible Markup

Image for post
Image for post
A Visual Representation Of Dependencies
Image for post
Image for post
This Is An Example From The Documentation

Step 6: Tokens

Image for post
Image for post
A Simple Example Of A Sentence Tokenized

Conclusion

Written by

NLP/NLU, Chatbots, Voice, Conversational UI/UX, CX Designer, Developer, Ubiquitous User Interfaces. www.cobusgreyling.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store