Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Thursday, September 26, 2013
Virtual Intelligent Student Counsellor
Labels:
AI,
AIML,
ALICE,
Artificial Inteligence,
C#,
Chatterbot,
ELIZA,
Tech Thoughts,
Web based chatterbot
Sunday, November 13, 2011
C# .NET Web based chatterbot development with AIML - Part 3
Hi, here we go again.
As stated last time, today it is going to be the learning of some useful tags of AIML language, and the usage of the wild cards.
First we are going to talk about the <srai></srai> tag.
1) <srai></srai> tag is used to write the recursive categories. The usage of the <srai> tag gives the botmaster the opportunity to map the user input correctly with the knowledge base categories and give the most relevant answer.
Some interesting usages of the <srai> tag can be the partitioning of the sentence and the usage of synonyms.
a) Partitioning of the sentence
For example , an input sentence that begins with the word “Yes” and which has more words,” Yes” can be treated as a one sub sentence. The method can be implemented in the AIML language as follows.
Note -: </sr> tag is the shorten form for the tags <srai><star/></srai> .
Therefore, if the user input would be "Yes, I want to play cricket.", then the chatterbot will partition the sentence into two as "YES" and "I want to play cricket.". These two parts can be directed to two different categories which makes a proper output.
b) Synonyms
We all know that something can be said in more than one ways.
If we consider the following two categories:-
Considering an example for an input pattern” HELLO” , the chatterbot response template would be “Hi there!” .And if the input pattern is “HI” then using the <srai> tag "HI" will be directed to "HELLO"which also gives the answer “Hi there!”.
2) <that></that>
That tag refers to a previous chatterbot output.
If we consider an example input pattern “YES”. Then the chatterbot has to check for its previous response and output the answer. The example can be written in AIML as follows.
<category>
<pattern>YES</pattern>
<that> DO YOU LIKE MOVIES </that>
<template> What's your favourite movie? </template>
</category>
There are lot more useful tags in the AIML language, and I strongly recommend you all to read the A Comparison Between Alice and Elizabeth Chatbot Systems to get a good knowledge and understanding about the chatterbot systems and the AIML language characteristics, importance and the usage.
Ok, now I hope you all will do your background reading to improve your understanding in the language of AIML. But lets talk a little about the wildcards usage here too.
1) "*"
If we take the examples as follows :-
Here the wildcard "*" used to represent all the wolds after the word "BECAUSE". The star wild card is used to represent one or more words in a pattern. If the chatterbot does not want to consider the user's reason for not liking the to play, then the category can be written as above.
2) A clarification to the wildcard "_" can be found in the following forum post.
AIML Pattern Matching
I hope you all are a little satisfied with the above explanation and the details. If you need more details about certain things you can read the links I have given throughout my posts. And today also I am giving you some of the valuable forum posts links.
1)AIML Pattern Matching - sentence splitting using the "_"
2)AIML Pattern Matching
3)AIML ‘topic’ tag
4)PROGRAM#- that tag issue with Web Site chatterbot development in c#
With my next post, I will discuss about how to design the brain (knowledge base) of the chatterbot with the needed categories.
Cheers!!
As stated last time, today it is going to be the learning of some useful tags of AIML language, and the usage of the wild cards.
First we are going to talk about the <srai></srai> tag.
1) <srai></srai> tag is used to write the recursive categories. The usage of the <srai> tag gives the botmaster the opportunity to map the user input correctly with the knowledge base categories and give the most relevant answer.
Some interesting usages of the <srai> tag can be the partitioning of the sentence and the usage of synonyms.
a) Partitioning of the sentence
For example , an input sentence that begins with the word “Yes” and which has more words,” Yes” can be treated as a one sub sentence. The method can be implemented in the AIML language as follows.
<category>
<pattern>YES *</pattern>
<template><srai>YES</srai> <sr/></template>
</category>
Therefore, if the user input would be "Yes, I want to play cricket.", then the chatterbot will partition the sentence into two as "YES" and "I want to play cricket.". These two parts can be directed to two different categories which makes a proper output.
b) Synonyms
We all know that something can be said in more than one ways.
If we consider the following two categories:-
<category>
<pattern>HELLO</pattern>
<template>Hi there!</template>
</category>
<category>
<pattern>HI</pattern>
<template><srai>HELLO</srai></template>
</category>
Considering an example for an input pattern” HELLO” , the chatterbot response template would be “Hi there!” .And if the input pattern is “HI” then using the <srai> tag "HI" will be directed to "HELLO"which also gives the answer “Hi there!”.
2) <that></that>
That tag refers to a previous chatterbot output.
If we consider an example input pattern “YES”. Then the chatterbot has to check for its previous response and output the answer. The example can be written in AIML as follows.
<category>
<pattern>YES</pattern>
<that> DO YOU LIKE MOVIES </that>
<template> What's your favourite movie? </template>
</category>
There are lot more useful tags in the AIML language, and I strongly recommend you all to read the A Comparison Between Alice and Elizabeth Chatbot Systems to get a good knowledge and understanding about the chatterbot systems and the AIML language characteristics, importance and the usage.
Ok, now I hope you all will do your background reading to improve your understanding in the language of AIML. But lets talk a little about the wildcards usage here too.
1) "*"
If we take the examples as follows :-
<category>
<pattern>NO, I DO NOT WANT TO PLAY BECAUSE *</pattern>
<template>Ok, then let's talk about something else.</template>
</category>
Here the wildcard "*" used to represent all the wolds after the word "BECAUSE". The star wild card is used to represent one or more words in a pattern. If the chatterbot does not want to consider the user's reason for not liking the to play, then the category can be written as above.
2) A clarification to the wildcard "_" can be found in the following forum post.
AIML Pattern Matching
I hope you all are a little satisfied with the above explanation and the details. If you need more details about certain things you can read the links I have given throughout my posts. And today also I am giving you some of the valuable forum posts links.
1)AIML Pattern Matching - sentence splitting using the "_"
2)AIML Pattern Matching
3)AIML ‘topic’ tag
4)PROGRAM#- that tag issue with Web Site chatterbot development in c#
With my next post, I will discuss about how to design the brain (knowledge base) of the chatterbot with the needed categories.
Cheers!!
Labels:
AIML,
C#,
Chatterbot,
knowledgebase,
Tech Thoughts
Sunday, September 18, 2011
C# .NET Web based chatterbot development with AIML - Part 1
Hi All,
As promised here I am again, not so late this time....:).
I hope you all are now familiar with the chatterbot concept and know some of the technologies that use to develop as I mentioned in the introduction post How to start implementing an AIML based chatterbot?
If you have not read the last post, do not worry :) you can proceed reading this, but it is always nice to have the background knowledge :).
Because this is the first part of the development of our chatterbot system, I am going to give you an overall view of the system that we are going to develop , therefore you all could gt a very high level understanding of the architecture.
As you can see from the above diagram,
1) We have the web interface where a user can input and get output . We are going to develop this using ASP.NET.
2) Once user input a particular question or any query to the chatterbot, system does some reasoning related to the query in order to get the best output from the knowledge-base. We are going to use the AIML interpreter for the reasoning of the chatterbot.
3) The knowledge-base consist of all the knowledge related to a particular area or general knowledge which helps with the answering process. Best suited answer is selected form the knowledge stored in the knowledge-base. The knowledge-base will be developed using the AIML language.
Now you know what are the components of the our system and what are the technologies we are going to use in order to develop the system.
According to my experience, the most important part of a chatterbot is it's knowledge-base, which helps giving the best experience of a chat. Therefore, we are going to focus on developing the knowledge-base first.
As I mentioned above, we are going to develop it using AIML, which is Artificial Intelligence Markup Language. Before start developing the knowledge-base , we need to know about this AIML language.
Why don't we peep in for an AIML introduction first, then proceed with the development?. Sounds good isn't it?
Followings are some useful links to get started with learning AIML, and with next post we will learn AIML basics and proceed forward. See you soon..:)
1 ) AIML: Artificial Intelligence Markup Language
2) AIML Overview
3) AIML 1.0.1 Tag Set
4) Artificial Intelligence Markup Language (AIML)
5) AIML Reference Manual
As promised here I am again, not so late this time....:).
I hope you all are now familiar with the chatterbot concept and know some of the technologies that use to develop as I mentioned in the introduction post How to start implementing an AIML based chatterbot?
If you have not read the last post, do not worry :) you can proceed reading this, but it is always nice to have the background knowledge :).
Because this is the first part of the development of our chatterbot system, I am going to give you an overall view of the system that we are going to develop , therefore you all could gt a very high level understanding of the architecture.
1) We have the web interface where a user can input and get output . We are going to develop this using ASP.NET.
2) Once user input a particular question or any query to the chatterbot, system does some reasoning related to the query in order to get the best output from the knowledge-base. We are going to use the AIML interpreter for the reasoning of the chatterbot.
3) The knowledge-base consist of all the knowledge related to a particular area or general knowledge which helps with the answering process. Best suited answer is selected form the knowledge stored in the knowledge-base. The knowledge-base will be developed using the AIML language.
Now you know what are the components of the our system and what are the technologies we are going to use in order to develop the system.
According to my experience, the most important part of a chatterbot is it's knowledge-base, which helps giving the best experience of a chat. Therefore, we are going to focus on developing the knowledge-base first.
As I mentioned above, we are going to develop it using AIML, which is Artificial Intelligence Markup Language. Before start developing the knowledge-base , we need to know about this AIML language.
Why don't we peep in for an AIML introduction first, then proceed with the development?. Sounds good isn't it?
Followings are some useful links to get started with learning AIML, and with next post we will learn AIML basics and proceed forward. See you soon..:)
1 ) AIML: Artificial Intelligence Markup Language
2) AIML Overview
3) AIML 1.0.1 Tag Set
4) Artificial Intelligence Markup Language (AIML)
5) AIML Reference Manual
Labels:
AIML,
Artificial Inteligence,
C#,
Chatterbot,
Tech Thoughts,
Web based chatterbot
Subscribe to:
Posts (Atom)

