Bots are a new way to interface with services and businesses. In today’s landscape, there’s Alexa, Facebook Messenger, Slack and more. Let’s see how we can code and test chat bots efficiently using natural language tools.
easiest way to determine the intent is to use rule-based filters on the current application • Example use case — Doctor’s appointment service • Only 2 main functions 1. getAppointments() 2. bookAppointment(datetime)
use nlp_compromise which has a parts of speech (POS) tagger • https://github.com/nlp-compromise/nlp_compromise • A POS Tagger is a piece of software that reads text and assigns parts of speech to each word or other token based on both its definition and its context — i.e., its relationship with adjacent and related words in a phrase, sentence, or paragraph. (Wikipedia) There’s A Package For That ™
• Greetings, apologizing and thank you • Remember to greet back • It’s okay to say “Sorry I don’t understand” • Use active instead of passive voice. “Your flight has been booked” is not as good as “I booked your flight.” • Be humble and polite so people won’t be frustrated
build is hard 2. You are encroaching into a personal space such as Facebook Messenger. 3. Every chat messaging system is a medium that can have special characteristics hence different APIs