SlideShare a Scribd company logo
1 of 16
Languages to write a chatbot
AIML (1995)
ChatScript (2010) RiveScript (2009)
Hanoi, 6 - 2018
1
Contents
1
2
3
4
5
2
1. AIML
• AIML is rule-based, matching a sequence of words to generate either a
completely canned response or a response involving substitution of input
words into an output template.
• A chatbot like A.L.I.C.E. is an expert system. A.L.I.C.E. data is defined using
AIML, an expert system can perform interesting to significant tasks when it
has a limited domain and 30,000 to 50,000 rules for a brain.
• We can teach aiml bot by using learn/learnf tags.
3
1. AIML
• #1 Flaw of AIML
▫ The biggest flaw of AIML is that it is simply too wordy and requires huge numbers
of effectively redundant categories.
▫ Since the pattern matching of AIML is so primitive and generic, it takes a lot of
category information to perform a single general task. If you want the system to
respond to a keyword, either alone or as a prefix, infix, or suffix in a sentence, it
takes you four categories to do so, one for each condition (with three of them
remapping using SRAI to the fourth ).
<category>
<pattern>MOTHER</pattern>
<template> Tell me more about your family. </template>
</category>
<category>
<pattern>* MOTHER</pattern>
<template><srai>MOTHER</srai> </template>
</category>
<category>
<pattern>MOTHER *</pattern>
<template><srai>MOTHER</srai> </template>
</category>
<category>
<pattern>* MOTHER *</pattern>
<template><srai>MOTHER</srai> </template>
</category>
4
1. AIML
• #2 Flaw of AIML
▫ Similarly, the pattern uses an exact word. It would be nice if you could match a list
of synonyms in a single specification.
<category><pattern>I AM JACK</pattern><template><srai>call me
jack</srai></template></category>
<category><pattern>I AM JAKE</pattern><template><srai>call me
jake</srai></template></category>
<category><pattern>I AM JAMES</pattern><template><srai>call me
james</srai></template></category>
<category><pattern>I AM JANE</pattern><template><srai>call me
jane</srai></template></category>
I would much rather write a synonym set for a list of names and write
this as a single pattern
5
1. AIML
• #3 Flaw of AIML
▫ Because you can't use wildcard sets of words, you cannot easily handle generic
set-based sentences. Google, for example, has no problem taking in what is two
hundred plus twelve thousand and 2 and then spitting out the correct answer
<category> <pattern>* PLUS *</pattern> <template><think><set name="x"> <star/></set> <set
name="y"><person><star index="2"/></person></set></think> The answer is
<script language="JavaScript"> var result = <get name="x"/> + <get name="y"/>;
document.write("<br/>result = " + result, "<br/>");</script> </template> </category>
That is, the AIML reference guide says: As soon as the first complete
match is found, the process stops, and the template that belongs to
the category whose pattern was matched is processed by the AIML
interpreter to construct the output. It seems to say nothing about what
happens if the result of the execution of the template is nada. So
seems to me, you really want to have a more reliable match BEFORE
you commit to the template.
6
1. AIML
• #4 Flaw of AIML
▫ AIML creates a system with the potential for many rules that overlap and mask
each other.
▫ <srai> are hard to connect visually to the categories they are remapping to,
making it impossible to see or guess what will happen.
<pattern> DO YOU WANT * </pattern> < template> No, I do not want * </template>
<pattern>DO YOU WANT MOVIES </pattern> < template> <srai> Want Movies </srai></template>
7
2. Rivescript
• Here are all of the things RiveScript has which AIML simply does
not at all:
▫ ! Definition command; Alice bots need a handful of configuration files,
separate from the actual AIML files, to define things such as the bot's
name and other variables. These features are built right in to RiveScript
itself.
▫ Weighted random responses.
▫ Object macros.
▫ Topics can inherit other topics.
▫ Tags that AIML doesn't have:
 add
 sub
 mult
 div
 env
 {!}
8
2. Rivescript
! version = 2.0
+ hello bot
- Hello human.
+ my name is *
- <set name=<formal>>Nice to meet you, <get name>.
+ (what is my name|who am i)
- You're <get name>, right?
+ *
- I don't have a reply for that.
- Try asking that a different way.
9
2. Rivescript
• Intepreter
▫ https://www.rivescript.com/interpreters
• For java
▫ https://github.com/aichaos/rivescript-java
• AiChaos
▫ https://github.com/aichaos
• Training
▫ No script generator
• A collection of known projects that are built on top of RiveScript
▫ https://www.kirsle.net/wiki/Built-with-RiveScript
10
3. Chatscipt
• ChatScript is a stand-alone chatbot engine, complete with its own
unique scripting language, created by bruce wilcox, who also created
the 2010 loebner prize winning chatbot, suzette. this is one of very
few stand-alone chatbot apps that have none of the “disadvantages”
I listed earlier for stand-alone bot apps. However, ChatScript has its
own set of “disadvantages”.
• Tutorial:
▫ https://www.chatbots.org/ai_zone/viewthread/492/
• Tutorial:
▫ Full necessary documents available in PDFDOCUMENTATION
• Editor
▫ https://github.com/bwilcox-
1234/ChatScript/blob/master/Third%20Party%20Tools/README.md
11
3. Chatscipt
• You can define your bot’s dialog flows with a script stored as a
normal text file. This is much simpler than methods that other
chatbot tools use, which often involve browser-based user
interfaces, JSON, or XML.
• Writing your scripts as a text files gives you full control over your
dialog flows. You a can easily process and upgrade your
conversational code with back-end scripts and tools.
• You could even use machine learning tools to mine conversations
logs. This could reveal all kinds of opportunities for you to improve
your dialog flows.
12
3. Chatscipt
• Creating a new chatbot by modifying source code
▫ https://www.youtube.com/watch?v=H9H4NfMepe4
• Download Chatscript platform here
▫ https://sourceforge.net/projects/chatscript/
#include <fstream>
#include <iostream>
#include <string>
#include <chatScript.h> //for example!
using namespace std;
int main()
{
ofstream output;
string str1, str2;
getline(cin, str1);
//This is the ChatScript function that i am looking for!
str2= ChatScript_input(str1);
output.open("output.txt");
output<< "str2";
output.close();
return 0;
}
13
RiveScript vs ChatScript
• ChatScript is a more sophisticated scripting language capable of
more Turing-complete-like functionality, whereas RiveScript is a
parsed, line-delimited language.
• ChatScript can combine all of its various rules in complicated ways
that RiveScript can't compete with.
• A converter program could be written to translate RiveScript into
ChatScript, but not the other way around.
• ChatScript is capable of complicated replies that can't be
represented equally in RiveScript.
14
1. RiveScript vs ChatScript
• Right now (so far as I know, at least), the only ChatScript engine
(the software necessary to interpret ChatScript files) is a
Linux/Windows stand-alone application, written in C (I forget
which “flavor”). the chatScript engine can be run as a server (in fact,
that’s the default action in Linux), so just about any scripting
language can access it. I’ve toyed with the notion of creating a
ChatScript interpreter/engine in PHP, but frankly, my time is too
limited to do so. I also think that attempting to do something like
this should only be done with Bruce’s blessing/approval.
• That said, however, there’s nothing stopping anyone from writing an
interface in Python that pre-processes the input using tools like the
NLTK before accessing a ChatScript server and retrieving the
results, and then presenting the output to the user. In fact, I think
that may be something to pursue, if you’re of a mind to do so.
15
Conclusion
• Deploying a chatbot with fully customizable by AIML or Rivescript
seems to be easier than Chatscript
• If we decide to apply NLP later, I think we should you AIML for ease
(because I think TIMA system is small enough)
• If we can use Chatscript, we even can ignore NLP and go through
by CS.
16

More Related Content

Similar to Chatbot Languages Comparison

Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesShabir Ahmad
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroSteven Pignataro
 
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008Mir Nazim
 
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxDIPESH30
 
IT230-Assignment 1 Solved.pdf
IT230-Assignment 1 Solved.pdfIT230-Assignment 1 Solved.pdf
IT230-Assignment 1 Solved.pdfDark179280
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and moreVicente Bolea
 
Wireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLWireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLDee Sadler
 
IRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET Journal
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedJoão Pedro Martins
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Codemtoppa
 
ChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanWey Wey Web
 
No code stewardship - No Code Conf 2019 Demo Theater
No code stewardship - No Code Conf 2019 Demo TheaterNo code stewardship - No Code Conf 2019 Demo Theater
No code stewardship - No Code Conf 2019 Demo TheaterWebflow
 
Building resuable and customizable Vue components
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue componentsFilip Rakowski
 
10 Ways To Improve Your Code( Neal Ford)
10  Ways To  Improve  Your  Code( Neal  Ford)10  Ways To  Improve  Your  Code( Neal  Ford)
10 Ways To Improve Your Code( Neal Ford)guestebde
 

Similar to Chatbot Languages Comparison (20)

Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
Best Practices For Drupal Developers By Mir Nazim @ Drupal Camp India 2008
 
Untangling11
Untangling11Untangling11
Untangling11
 
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docxLabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
LabsLab8.htmlLab 8 Im Thinking of a NumberBefore yo.docx
 
IT230-Assignment 1 Solved.pdf
IT230-Assignment 1 Solved.pdfIT230-Assignment 1 Solved.pdf
IT230-Assignment 1 Solved.pdf
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Autotools, Design Patterns and more
Autotools, Design Patterns and moreAutotools, Design Patterns and more
Autotools, Design Patterns and more
 
Wireframing /Prototyping with HTML
Wireframing /Prototyping with HTMLWireframing /Prototyping with HTML
Wireframing /Prototyping with HTML
 
INTRODUCTIONS OF HTML
INTRODUCTIONS OF HTMLINTRODUCTIONS OF HTML
INTRODUCTIONS OF HTML
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
IRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from Scratch
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
 
Drupal
DrupalDrupal
Drupal
 
Code generation
Code generationCode generation
Code generation
 
ChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano Firtman
 
No code stewardship - No Code Conf 2019 Demo Theater
No code stewardship - No Code Conf 2019 Demo TheaterNo code stewardship - No Code Conf 2019 Demo Theater
No code stewardship - No Code Conf 2019 Demo Theater
 
Building resuable and customizable Vue components
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue components
 
10 Ways To Improve Your Code( Neal Ford)
10  Ways To  Improve  Your  Code( Neal  Ford)10  Ways To  Improve  Your  Code( Neal  Ford)
10 Ways To Improve Your Code( Neal Ford)
 

More from Nguyen Giang

Introduction to Interpretable Machine Learning
Introduction to Interpretable Machine LearningIntroduction to Interpretable Machine Learning
Introduction to Interpretable Machine LearningNguyen Giang
 
Show observe and tell giang nguyen
Show observe and tell   giang nguyenShow observe and tell   giang nguyen
Show observe and tell giang nguyenNguyen Giang
 
Introduction to continual learning
Introduction to continual learningIntroduction to continual learning
Introduction to continual learningNguyen Giang
 
Variational continual learning
Variational continual learningVariational continual learning
Variational continual learningNguyen Giang
 
How Tala works in credit score
How Tala works in credit scoreHow Tala works in credit score
How Tala works in credit scoreNguyen Giang
 
Virtual assistant with amazon alexa
Virtual assistant with amazon alexaVirtual assistant with amazon alexa
Virtual assistant with amazon alexaNguyen Giang
 
ECG Detector deployed based on OPENMSP430 open-core
ECG Detector deployed based on OPENMSP430 open-coreECG Detector deployed based on OPENMSP430 open-core
ECG Detector deployed based on OPENMSP430 open-coreNguyen Giang
 

More from Nguyen Giang (8)

Introduction to Interpretable Machine Learning
Introduction to Interpretable Machine LearningIntroduction to Interpretable Machine Learning
Introduction to Interpretable Machine Learning
 
Show observe and tell giang nguyen
Show observe and tell   giang nguyenShow observe and tell   giang nguyen
Show observe and tell giang nguyen
 
Introduction to continual learning
Introduction to continual learningIntroduction to continual learning
Introduction to continual learning
 
Variational continual learning
Variational continual learningVariational continual learning
Variational continual learning
 
Scalability fs v2
Scalability fs v2Scalability fs v2
Scalability fs v2
 
How Tala works in credit score
How Tala works in credit scoreHow Tala works in credit score
How Tala works in credit score
 
Virtual assistant with amazon alexa
Virtual assistant with amazon alexaVirtual assistant with amazon alexa
Virtual assistant with amazon alexa
 
ECG Detector deployed based on OPENMSP430 open-core
ECG Detector deployed based on OPENMSP430 open-coreECG Detector deployed based on OPENMSP430 open-core
ECG Detector deployed based on OPENMSP430 open-core
 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 

Chatbot Languages Comparison

  • 1. Languages to write a chatbot AIML (1995) ChatScript (2010) RiveScript (2009) Hanoi, 6 - 2018 1
  • 3. 1. AIML • AIML is rule-based, matching a sequence of words to generate either a completely canned response or a response involving substitution of input words into an output template. • A chatbot like A.L.I.C.E. is an expert system. A.L.I.C.E. data is defined using AIML, an expert system can perform interesting to significant tasks when it has a limited domain and 30,000 to 50,000 rules for a brain. • We can teach aiml bot by using learn/learnf tags. 3
  • 4. 1. AIML • #1 Flaw of AIML ▫ The biggest flaw of AIML is that it is simply too wordy and requires huge numbers of effectively redundant categories. ▫ Since the pattern matching of AIML is so primitive and generic, it takes a lot of category information to perform a single general task. If you want the system to respond to a keyword, either alone or as a prefix, infix, or suffix in a sentence, it takes you four categories to do so, one for each condition (with three of them remapping using SRAI to the fourth ). <category> <pattern>MOTHER</pattern> <template> Tell me more about your family. </template> </category> <category> <pattern>* MOTHER</pattern> <template><srai>MOTHER</srai> </template> </category> <category> <pattern>MOTHER *</pattern> <template><srai>MOTHER</srai> </template> </category> <category> <pattern>* MOTHER *</pattern> <template><srai>MOTHER</srai> </template> </category> 4
  • 5. 1. AIML • #2 Flaw of AIML ▫ Similarly, the pattern uses an exact word. It would be nice if you could match a list of synonyms in a single specification. <category><pattern>I AM JACK</pattern><template><srai>call me jack</srai></template></category> <category><pattern>I AM JAKE</pattern><template><srai>call me jake</srai></template></category> <category><pattern>I AM JAMES</pattern><template><srai>call me james</srai></template></category> <category><pattern>I AM JANE</pattern><template><srai>call me jane</srai></template></category> I would much rather write a synonym set for a list of names and write this as a single pattern 5
  • 6. 1. AIML • #3 Flaw of AIML ▫ Because you can't use wildcard sets of words, you cannot easily handle generic set-based sentences. Google, for example, has no problem taking in what is two hundred plus twelve thousand and 2 and then spitting out the correct answer <category> <pattern>* PLUS *</pattern> <template><think><set name="x"> <star/></set> <set name="y"><person><star index="2"/></person></set></think> The answer is <script language="JavaScript"> var result = <get name="x"/> + <get name="y"/>; document.write("<br/>result = " + result, "<br/>");</script> </template> </category> That is, the AIML reference guide says: As soon as the first complete match is found, the process stops, and the template that belongs to the category whose pattern was matched is processed by the AIML interpreter to construct the output. It seems to say nothing about what happens if the result of the execution of the template is nada. So seems to me, you really want to have a more reliable match BEFORE you commit to the template. 6
  • 7. 1. AIML • #4 Flaw of AIML ▫ AIML creates a system with the potential for many rules that overlap and mask each other. ▫ <srai> are hard to connect visually to the categories they are remapping to, making it impossible to see or guess what will happen. <pattern> DO YOU WANT * </pattern> < template> No, I do not want * </template> <pattern>DO YOU WANT MOVIES </pattern> < template> <srai> Want Movies </srai></template> 7
  • 8. 2. Rivescript • Here are all of the things RiveScript has which AIML simply does not at all: ▫ ! Definition command; Alice bots need a handful of configuration files, separate from the actual AIML files, to define things such as the bot's name and other variables. These features are built right in to RiveScript itself. ▫ Weighted random responses. ▫ Object macros. ▫ Topics can inherit other topics. ▫ Tags that AIML doesn't have:  add  sub  mult  div  env  {!} 8
  • 9. 2. Rivescript ! version = 2.0 + hello bot - Hello human. + my name is * - <set name=<formal>>Nice to meet you, <get name>. + (what is my name|who am i) - You're <get name>, right? + * - I don't have a reply for that. - Try asking that a different way. 9
  • 10. 2. Rivescript • Intepreter ▫ https://www.rivescript.com/interpreters • For java ▫ https://github.com/aichaos/rivescript-java • AiChaos ▫ https://github.com/aichaos • Training ▫ No script generator • A collection of known projects that are built on top of RiveScript ▫ https://www.kirsle.net/wiki/Built-with-RiveScript 10
  • 11. 3. Chatscipt • ChatScript is a stand-alone chatbot engine, complete with its own unique scripting language, created by bruce wilcox, who also created the 2010 loebner prize winning chatbot, suzette. this is one of very few stand-alone chatbot apps that have none of the “disadvantages” I listed earlier for stand-alone bot apps. However, ChatScript has its own set of “disadvantages”. • Tutorial: ▫ https://www.chatbots.org/ai_zone/viewthread/492/ • Tutorial: ▫ Full necessary documents available in PDFDOCUMENTATION • Editor ▫ https://github.com/bwilcox- 1234/ChatScript/blob/master/Third%20Party%20Tools/README.md 11
  • 12. 3. Chatscipt • You can define your bot’s dialog flows with a script stored as a normal text file. This is much simpler than methods that other chatbot tools use, which often involve browser-based user interfaces, JSON, or XML. • Writing your scripts as a text files gives you full control over your dialog flows. You a can easily process and upgrade your conversational code with back-end scripts and tools. • You could even use machine learning tools to mine conversations logs. This could reveal all kinds of opportunities for you to improve your dialog flows. 12
  • 13. 3. Chatscipt • Creating a new chatbot by modifying source code ▫ https://www.youtube.com/watch?v=H9H4NfMepe4 • Download Chatscript platform here ▫ https://sourceforge.net/projects/chatscript/ #include <fstream> #include <iostream> #include <string> #include <chatScript.h> //for example! using namespace std; int main() { ofstream output; string str1, str2; getline(cin, str1); //This is the ChatScript function that i am looking for! str2= ChatScript_input(str1); output.open("output.txt"); output<< "str2"; output.close(); return 0; } 13
  • 14. RiveScript vs ChatScript • ChatScript is a more sophisticated scripting language capable of more Turing-complete-like functionality, whereas RiveScript is a parsed, line-delimited language. • ChatScript can combine all of its various rules in complicated ways that RiveScript can't compete with. • A converter program could be written to translate RiveScript into ChatScript, but not the other way around. • ChatScript is capable of complicated replies that can't be represented equally in RiveScript. 14
  • 15. 1. RiveScript vs ChatScript • Right now (so far as I know, at least), the only ChatScript engine (the software necessary to interpret ChatScript files) is a Linux/Windows stand-alone application, written in C (I forget which “flavor”). the chatScript engine can be run as a server (in fact, that’s the default action in Linux), so just about any scripting language can access it. I’ve toyed with the notion of creating a ChatScript interpreter/engine in PHP, but frankly, my time is too limited to do so. I also think that attempting to do something like this should only be done with Bruce’s blessing/approval. • That said, however, there’s nothing stopping anyone from writing an interface in Python that pre-processes the input using tools like the NLTK before accessing a ChatScript server and retrieving the results, and then presenting the output to the user. In fact, I think that may be something to pursue, if you’re of a mind to do so. 15
  • 16. Conclusion • Deploying a chatbot with fully customizable by AIML or Rivescript seems to be easier than Chatscript • If we decide to apply NLP later, I think we should you AIML for ease (because I think TIMA system is small enough) • If we can use Chatscript, we even can ignore NLP and go through by CS. 16

Editor's Notes

  1. <pattern>_ A COUPLE OF WORDS *</pattern> and <pattern>_ A COUPLE OF WORDS</pattern> is the proper way to use _ if you want to catch every times A COUPLE OF WORDS is inside or at the end of a sentence.
  2. The problem is AIML stop asap it meets the first match. Then if the calculation is: 100 plus 200 and two => make wrong output while google can do it exactly.
  3. The problem is AIML stop asap it meets the first match. Then if the calculation is: 100 plus 200 and two => make wrong output while google can do it exactly.
  4. ChatScript (CS) integration with a foreign language (not English) is possible but it require work todo: dictionary ontologies (wordnet like) interjections/etc.
  5. https://play.rivescript.com/ https://www.rivescript.com/try
  6. ChatScript (CS) integration with a foreign language (not English) is possible but it require work todo: dictionary ontologies (wordnet like) interjections/etc.
  7. ChatScript (CS) integration with a foreign language (not English) is possible but it require work todo: dictionary ontologies (wordnet like) interjections/etc.
  8. ChatScript (CS) integration with a foreign language (not English) is possible but it require work todo: dictionary ontologies (wordnet like) interjections/etc.
  9. CS is chatbot engine. It is rule-based, and it might resemble a declarative programming approach similar to writing a configuration file or grammar for an interpreter. Yet, CS is more imperative since you should also use commands to tell how to react to this or that message. It is written in C++ and has binary builds for Windows, Linux, and MacOS platforms.
  10. SuperScript: https://github.com/superscriptjs/superscript