Chomsky-Teach

Here are some categories which allows a client to teach your bot a new question and answer. The categories come from my Chomsky bot (http://tinyurl.com/ydxlef).

<?xml version="1.0" encoding="ISO-8859-1"?>
<aiml>

<!-- These categories allow clients to teach a bot a new question and answer --> 

<!-- And include a new version of BADANSWER --> 

<!-- These categories only work for Pandorabots --> 

<!-- This TEACH file created by Peter Lafferty -->

<!-- and are derived from the Chomsky chatbot (http://tinyurl.com/ydxlef) -->

<!-- Last modified by Peter Lafferty June 2008 --> 

<category>
<pattern>BADANSWER</pattern> 
<template>
<think>
<set name="badanswer-input"><input index="2" /></set>
<set name="badanswer-that"><that index="2,1" /></set>
<set name="badanswer-that-full"><that index="2,*" /></set>
<set name="topic">badanswer-prelim</set>
</think>
Do you know the correct answer to "<get name="badanswer-input"/>"? Please answer Yes or No.
</template>
</category>

<category>
<pattern>_</pattern>
<that>DO YOU WANT TO TEACH ME THE MEANING OF *</that> 
<template>
<think><set name="star"><star /></set></think>
<condition>
<li name="star" value="yes">
OK, What is the meaning of "<thatstar/>"?<think><set name="topic">learning new word</set></think>
</li>
<li name="star" value="no">
OK, let's forget it then.<think><set name="topic">learning new answers</set></think>
</li>
<li><random><li>That's not Yes or No! Let's forget it.</li><li>Please answer Yes or No.</li></random><think><set name="topic">learning new 

word</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>_</pattern>
<that>CAN YOU TEACH ME THE MEANING OF *</that> 
<template>
<think><set name="star"><star /></set></think>
<condition>
<li name="star" value="yes">
OK, What is the meaning of "<thatstar/>"?<think><set name="topic">learning new word</set></think>
</li>
<li name="star" value="no">
OK, let's forget it then.<think><set name="topic">learning new answers</set></think>
</li>
<li><random><li>That's not Yes or No! Let's forget it.</li><li>Please answer Yes or No.</li></random><think><set name="topic">learning new 

word</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>_</pattern> 
<that>OK WHAT IS THE MEANING OF *</that> 
<template>
"<set name="badanswer-newresp"><input index="1" /></set>..."? Is that what "<thatstar/>" means?
</template>
</category>

<category>
<pattern>_</pattern> 
<that>IS THAT WHAT * MEANS</that>
<template>
<think>
<set name="star"><star /></set>
<set name="response1"><response index = "1" /></set>
<set name="response2"><response index = "2" /></set>
<condition>
<li name="response2" value="OK, what is the meaning of *?">
<set name="badanswer-newresp"><request index = "1" /></set>
</li>
</condition>
</think>
<condition>
<li name="response1" value="OK, what should I say?"></li>
<li name="star" value="yes">Fine. I'll try to remember, "<thatstar />" means "<get name="badanswer-newresp" />".
<learn>
<category>
<pattern>
<eval><uppercase><thatstar /></uppercase></eval>
</pattern>
<template>
<eval><get name="badanswer-newresp" /></eval>
</template>
</category>
</learn>
<think><set name="topic">learning new word</set></think>
</li>
<li name="star" value="no">OK, let's forget it then.
<think><set name="topic">learning new answers</set></think>
</li>
<li><random><li>That's not Yes or No! Let's forget it.</li><li>Yes or No?</li></random><think><set name="topic">learning new word</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>_</pattern>
<that>PLEASE ANSWER YES OR NO</that> 
<template>
<think><set name="star"><star /></set></think>
<condition>
<li name="star" value="yes">
OK, what should I say?<think><set name="topic">learning new answers</set></think>
</li>
<li name="star" value="no">
OK, let's forget it then.<think><set name="topic">learning new answers</set></think>
</li>
<li><random><li>That's not Yes or No! Let's forget it.</li><li>Please answer Yes or No.</li></random><think><set name="topic">learning new answers</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>_</pattern> 
<that>OK WHAT SHOULD I SAY</that> 
<template>
"<set name="badanswer-newresp"><input index="1" /></set>..."? Do you want me to remember that? Yes or No?
</template>
</category>

<category>
<pattern>_</pattern> 
<that>YES OR NO</that>
<template>
<think>
<set name="star"><star /></set>
<set name="response1"><response index = "1" /></set>
<set name="response2"><response index = "2" /></set>
<condition>
<li name="response2" value="OK, what should I say?">
<set name="badanswer-newresp"><request index = "1" /></set>
</li>
</condition>
</think>
<condition>
<li name="response1" value="OK, what should I say?"></li>
<li name="star" value="yes">Fine. I'll try to remember to respond, "<get name="badanswer-newresp" />" when you say, "<get name="badanswer-input" />" I will add this to my memory.
<learn>
<category>
<pattern>
<eval><uppercase><get name="badanswer-input" /></uppercase></eval>
</pattern>
<template>
<eval><get name="badanswer-newresp" /></eval>
</template>
</category>
</learn>
<think><set name="topic">learning new answers</set></think>
</li>
<li name="star" value="no">OK, let's forget it then.
<think><set name="topic">learning new answers</set></think>
</li>
<li><random><li>That's not Yes or No! Let's forget it.</li><li>Yes or No?</li></random><think><set name="topic">learning new answers</set></think></li>
</condition>
</template>
</category>

<category>
<pattern>BAD ANSWER</pattern>
<template><srai>BADANSWER</srai></template>
</category>

<category>
<pattern>WRONG</pattern>
<template>If you would like to teach me a better reply, just say "Learn".
</template>
</category>

<category>
<pattern>NOT RIGHT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT IS WRONG</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT IS NOT RIGHT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT IS INCORRECT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER IS NOT CORRECT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER IS INCORRECT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER IS WRONG</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER IS NOT RIGHT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER WAS BAD</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT WAS A BAD ANSWER</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT WAS AN INCORRECT ANSWER</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT WAS THE WRONG ANSWER</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>THAT ANSWER WAS NOT RIGHT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>WRONG ANSWER</pattern>
<template>If you would like to teach me a better reply, just say "Learn".
</template>
</category>

<category>
<pattern>YOUR ANSWER WAS WRONG</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>YOUR ANSWER WAS NOT RIGHT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>YOUR ANSWER WAS NOT CORRECT</pattern>
<template>If you would like to teach me a better reply, just say "Learn".</template>
</category>

<category>
<pattern>CAN I TEACH YOU</pattern>
<template>If you want to teach me something just say "Learn".</template>
</category>

<category>
<pattern>LEARN A NEW *</pattern>
<template>If you want to teach me something just say "Learn".</template>
</category>

<category>
<pattern>CAN YOU LEARN</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>DO YOU LEARN</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>CAN I TEACH YOU *</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>CAN YOU LEARN *</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>WILL YOU LEARN *</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>IF * WILL YOU LEARN *</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>DO YOU LEARN *</pattern>
<template><srai>CAN I TEACH YOU</srai></template>
</category>

<category>
<pattern>WILL YOU REMEMBER THAT</pattern>
<template><srai>LEARN</srai></template>
</category>

<category>
<pattern>WILL YOU REMEMBER THIS</pattern>
<template><srai>LEARN</srai></template>
</category>

<category>
<pattern>REMEMBER THIS</pattern>
<template>Would you like to teach me a new question and answer?</template>
</category>

<category>
<pattern>REMEMBER THIS *</pattern>
<template>
Would you like to teach me a new question and answer?
<think><set name="topic">learning new answers</set></think>
</template>
</category>

<category>
<pattern>REMEMBER</pattern> 
<template>
Would you like to teach me a new question and answer?
<think><set name="topic">learning new answers</set></think>
</template>
</category>

<category>
<pattern>LEARN</pattern> 
<template>
Would you like to teach me a new question and answer?
<think><set name="topic">learning new answers</set></think>
</template>
</category>

<category>
<pattern>LEARN THIS *</pattern> 
<template>
<srai>REMEMBER THIS *</srai>
</template>
</category>

<category>
<pattern>_ QUESTION IS *</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
Is that the new question?
</template>
</category>

<category>
<pattern>YES</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>YES *</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>_ YES</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>OK</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>OK *</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>GO ON</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>GO ON *</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>NO</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>NO *</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>NUP</pattern>
<that>DO YOU WANT TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>_ QUESTION IS *</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
Is that the new question?
</template>
</category>

<category>
<pattern>YES</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>YES *</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>_ YES</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>OK</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>OK *</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>GO ON</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>GO ON *</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
What is the new question?
</template>
</category>

<category>
<pattern>NO</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>NO *</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>NUP</pattern>
<that>WOULD YOU LIKE TO TEACH ME A NEW QUESTION AND ANSWER</that> 
<template>
OK. Let's forget it.
</template>
</category>

<category>
<pattern>YES</pattern>
<that>IS THAT THE NEW QUESTION</that> 
<template>
<srai>BADANSWER</srai>
</template>
</category>

<category>
<pattern>YES *</pattern>
<that>IS THAT THE NEW QUESTION</that> 
<template>
<srai>BADANSWER</srai>
</template>
</category>

<category>
<pattern>NO</pattern>
<that>IS THAT THE NEW QUESTION</that> 
<template>
<random>
<li>What is the new question?</li>
<li>OK. let's forget it.</li>
</random>
</template>
</category>

<category>
<pattern>NO *</pattern>
<that>IS THAT THE NEW QUESTION</that> 
<template>
<random>
<li>What is the new question?</li>
<li>OK. let's forget it.</li>
</random>
</template>
</category>

<category>
<pattern>_</pattern> 
<that>WHAT IS THE NEW QUESTION</that>
<template>
Is that the new question?
</template>
</category>

<category>
<pattern>I KNOW A BETTER ANSWER TO THE LAST QUESTION</pattern> 
<template>
<think>
<set name="badanswer-input"><input index="2" /></set>
<set name="badanswer-that"><that index="2,1" /></set>
<set name="badanswer-that-full"><that index="2,*" /></set>
<set name="topic">badanswer-prelim</set>
</think>
Do you really know a better answer to the last question? Please answer Yes or No.
</template>
</category>

<category>

<pattern>LEARN A NEW QUESTION AND ANSWER</pattern>

<template>

Would you like to teach me a new question and answer?

</template>

</category>

</aiml>
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.