Answers.Body: <p>Chatterbots are used to communicate with a human and undergo conversations in such a way that the human which is communicating will think that he/she is talking to another human.</p>
  <p>There are two types of chatter bots: One is which uses certain rules and pattern matching techniques and the other one is which uses actual artificial intelligence techniques. Of course, the latter one is the most difficult to implement.</p>
  <p>This can be understood with an example. The former type of bots which uses pattern matching and rules consist of questions stored in the form,</p>
  <pre><code>if question matches 'WHO (IS/ARE) (MEMBERS OF PARLIAMENT/PRESIDENT)?' then
       RETURN Y ... where Y is some predefined answer.
  </code></pre>
  <p>The latter part which uses actual AI techniques, uses various mechanisms to actually understand the question, extract information out of it, process the information into some standard normalized form and then do some <strong>inference</strong> w.r.t. the <em>facts</em> in the <strong>knowledge base</strong>. Such methods may use <em>learning</em> algorithms to actually learn question patterns.</p>
  <p>To make simple bots (probably of the former type), you can use Artificial Intelligence Markup Language (<a href="http://www.alicebot.org/aiml.html" rel="nofollow noreferrer">AIML</a>) which is a XML based language for developing chatter bots like <a href="http://alice.pandorabots.com/" rel="nofollow noreferrer">ALICE</a> bot.</p>
  <p>If you want to focus more towards latter type of chatter bots, you may have to learn about various AI techniques, like searching, logic, knowledge and inference, learning, etc or sub-domains of AI like Natural Language Processing (NLP). There are various tool kits for NLP like for developing in Python there is nltk, for developing in Java there is Stanford's CoreNLP, and so on.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-02-01T09:53:33.307Z
Answers.LastActivityDate: 2022-12-25T11:04:38.247Z
Answers.LastEditDate: 2022-12-25T11:04:38.247Z
Answers.UserDisplayName: kiner_shah
Body: <p>I am interested to know how they work and how can I build something like them. What subject should I look for it?</p>
  
Tags: <natural-language-processing><reference-request><chat-bots>
Title: How do chatbots work?
UserDisplayName: user3486308
ThreadText: # How do chatbots work?
  
  (Asked by: username_0 on 2017-01-27)
  
  I am interested to know how they work and how can I build something like them. What subject should I look for it?
  
  **Tags:** natural-language-processing, reference-request, chat-bots
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-02-01. Score: 5 | Accepted answer
  
  Chatterbots are used to communicate with a human and undergo conversations in such a way that the human which is communicating will think that he/she is talking to another human.
  
  There are two types of chatter bots: One is which uses certain rules and pattern matching techniques and the other one is which uses actual artificial intelligence techniques. Of course, the latter one is the most difficult to implement.
  
  This can be understood with an example. The former type of bots which uses pattern matching and rules consist of questions stored in the form,
  
  ```
  if question matches 'WHO (IS/ARE) (MEMBERS OF PARLIAMENT/PRESIDENT)?' then
       RETURN Y ... where Y is some predefined answer.
  
  ```
  
  The latter part which uses actual AI techniques, uses various mechanisms to actually understand the question, extract information out of it, process the information into some standard normalized form and then do some **inference** w.r.t. the *facts* in the **knowledge base**. Such methods may use *learning* algorithms to actually learn question patterns.
  
  To make simple bots (probably of the former type), you can use Artificial Intelligence Markup Language ([AIML](http://www.alicebot.org/aiml.html)) which is a XML based language for developing chatter bots like [ALICE](http://alice.pandorabots.com/) bot.
  
  If you want to focus more towards latter type of chatter bots, you may have to learn about various AI techniques, like searching, logic, knowledge and inference, learning, etc or sub-domains of AI like Natural Language Processing (NLP). There are various tool kits for NLP like for developing in Python there is nltk, for developing in Java there is Stanford's CoreNLP, and so on.
  
  
  ---
  
  