without Chatbot Builder & Deep Learning bage79@gmail.com
Chatbot Builder (=Dialogue Manager),. We need different chatbot builders for various chatbot services. Chatbot builders can t call some external APIs. Deep Learning (=DL) DL can t perfectly control NLU outputs(predictions). I don t know DL. DL is hard to learn.
Messaging Platform Slack, Facebook, Dialogue Manager (DM) Rule based (Scenario based) Natural Language Understanding (NLU) Intent Classification (IC) Example based (Search-engine based) Named Entity Recognition (NER) Dictionary based (Regular-expression based) Natural Language Generation (NLG) Template based
Messaging Platform / DM ( ) NLU NLG External API
Messaging Platform DM NLU userid: bage NLG External API
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage NLG External API
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage state: T NLG External API
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage state: T NLG template: [name] [point]. External API
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage state: T NLG template: [name] [point]. External API name: point: 1000
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage output: state: T 1000. NLG template: [name] [point]. External API name: point: 1000
input: T. Messaging Platform DM NLU entity: intent: T check.remain userid: bage output: state: T 1000. NLG template: [name] [point]. External API name: point: 1000
Dialogue Manager
Scenario Messaging Platform Constants userid: bage state: T External API T. Request Actions Execute point: 1000 Conditions point > 0 True False state: T state: T
Data Structure Scenario Linked List Constants Constants Global input State Actions External API value Actions Conditions for variables Variables from User, API, NLU, NLG Conditions equal, greater, little, exists, State State.
Request from a user Inform to a user Understand NLU Generate NLG Execute external API Request Inform Messaging Platform DM Understand NLU Generate NLG Execute External API
Natural Language Understanding
Train label Train Data Test label Test Data preprocessing preprocessing classifier train/test classifier model classifier predictions
Train label Train Data Test label Test Data preprocessing preprocessing generator train/test generator classifier regular expressions tokens pattern file search engine NER IC Entity Intent predictions
Train /t [ ] T- Test /t [ ] T ~~ t- t string to pattern tokenization t\s* \s* t,-,,, tokenization t,,,,, NER IC /t [ ] predictions
Intent Classification
T ~~ T t t
t word spacing word spacing / / _t,t,,,,,,,,, _ n-gram tokens, t,,,,, word tokens morph analyzing t,,,,,, morph tokens
Train Test [ ] T- [ ] T ~~ preprocessing preprocessing t- t tokenization tokenization / / / / _t,t-,-,,,, _,_,, _ t,-,,, t,,, search _t,t,,,,,,,,, _ t,,,,, t,,,,,, search engine IC predictions
Train Test label sentence label sentence preprocessing preprocessing sentence sentence tokenization tokenization n-gram tokens word tokens morph tokens search n-gram tokens word tokens morph tokens search engine IC predictions
Named Entity Recognition
t- boundary spacing t - word spacing t - symbols t [-]? whitespace t \s* [-]? \s* \s* prefix match / \s t \s* [-]? \s* \s* \st\s*[-]?\s* \s*
Train Test /t T- /t T ~~ preprocessing preprocessing t- _t _ string to pattern pattern match \st\s*[-]?\s* \s* pattern file NER /t predictions
Train Test label words(phrase) label sentence preprocessing preprocessing words sentence string to pattern pattern match regular expressions pattern file NER label predictions
t t _t t,t,,,, _ n-gram tokens _t,t,,,,,,,,,,, _ n-gram tokens v0.1 v0.2
t user input t character based 67% Similiarity alphabet based 85% _t,t,,,, _ =4/6 _t,t,,,,,,,,,,, _ =11/13 n-gram tokens n-gram tokens v0.1 v0.2
t- t- t- \st\s*[-]?\s*\s* 1 \st\s*[-]?\s*.? \s* \st\s*[-]?\s* \s* \st\s*[-]?\s*.? \s* \st\s*[-]?\s*\s*.? v0.1 v0.2
t- user input t- failed pattern matching success \st\s*[-]?\s* \s* 1 \st\s*[-]?\s*.? \s* v0.1 v0.2
t- t- t- t- 1 \st\s*[-]?\s*.? \s* \st\s*[-]?\s* [ \(\) ]? \s* v0.2 v0.21