AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Virtual Recruiting Assisstant
 
 
  [ # 16 ]

Can you show me your pattern for :

You: anything initaed with keyword new

 

 
  [ # 17 ]

thanks i corrected it like this smile

<category>
<
pattern>Hello</pattern>
<
template>
<
think><set name="score">0</set></think>
Hi.So are you ready for interview?
</
template>
</
category

plus category handling “anything initiated with keyword new” is

<category>
<
pattern>* keyword new</pattern>
<
that>what is a concrete object</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.what is the degree of relation?
</
template>
</
category

 

 

 
  [ # 18 ]

That should work. Are you still having trouble?

 

 
  [ # 19 ]

yup :S…..and yes i tried to understand warnings.aiml as well and i copied get method from there smile

 

 
  [ # 20 ]

Leave it with me for a while and I’l experiment here.

 

 
  [ # 21 ]

okie Sir…thanks for your help so far. now its time for a little break smile

 

 
  [ # 22 ]

I did this and it works fine for me.

<category>
<
pattern>Hello</pattern>
<
template>
<
think><set name="score">0</set></think>
HiSo are you ready for interview?
</
template>
</
category>  

<
category>
<
pattern>YES</pattern>
<
that>So are you ready for interview?</that>
<
template>
What is a concrete object?
</
template>
</
category>  

<
category>
<
pattern>* keyword new</pattern>
<
that>what is a concrete object</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.what is the degree of relation?
</
template>
</
category>  


<
category>
<
patternWhat is my score </pattern>
<
template>
<
condition name="score">
<
li value="*"><get name="score"/></li>
<
li>You dont have any correct answer.</li>
</
condition>
</
template></category

<
category>
<
pattern>CORRECTANSWER</pattern>
<
template>
<
think>
<
condition name="score">
 <
li value="0"><set name="score">1</set></li>
 <
li value="1"><set name="score">2</set></li>
 <
li value="2"><set name="score">3</set></li>
 <
li value="3"><set name="score">4</set></li>
 <
li value="4"><set name="score">5</set></li>
 <
li value="5"><set name="score">6</set></li>
 <
li value="6"><set name="score">7</set></li>
 <
li value="7"><set name="score">8</set></li>
 <
li value="8"><set name="score">9</set></li>
 <
li value="9"><set name="score">10</set></li>
 <
li value="10"><set name="score">More than 10</set></li>
</
condition>
</
think>
</
template>
</
category

Human: hello
Bot: Hi. So are you ready for interview?

Human: yes
Bot: What is a concrete object?

Human: asdas keyword new
Bot: correct.what is the degree of relation?

Human: what is my score
Bot: 1.

I just realised you are using program O. In that case, remember to make your pattern and that contents upper case.
So use:

<pattern>* KEYWORD NEW</pattern>
<
that>WHAT IS A CONCRETE OBJECT</that

instead of:

<pattern>* keyword new</pattern>
<
that>what is a concrete object</that

 

 

 
  [ # 23 ]

i emptied my ‘aiml’ table in database and again designed a basic chat and did what u ask me to,but its still not working. It still says “you dont have any correct answer.”

You: hello
Bot: Hi. So are you ready for interview?
You: yes
Bot: what is a concrete object?
You: anything initaed with keyword new
Bot: correct.what is the degree of relation?
You: in a relation number of attributes
Bot: correct.Is it possible for two classes to inherit from each other? (yes/no)
You: no
Bot: correct.Cin stands for?
You: standard input stream
Bot: correct…
You: what is my score?
Bot: You dont have any correct answer.

this is what i wrote….

<category>
<
pattern>HELLO</pattern>
<
template>
<
think><set name="score">0</set></think>
HiSo are you ready for interview?
</
template>
</
category>

<
category>
<
pattern>YES</pattern>
<
that>* ARE YOU READY FOR INTERVIEW</that>
<
template>
what is a concrete object?
</
template>
</
category>

<
category>
<
pattern>* KEYWORD NEW</pattern>
<
that>WHAT IS A CONCRETE OBJECT</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.what is the degree of relation?
</
template>
</
category

 <
category>
<
pattern>* NUMBER OF ATTRIBUTES</pattern>
<
that>* IS THE DEGREE OF RELATION</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.Is it possible for two classes to inherit from each other? (yes/no)
</
template>
</
category

<
category>
<
pattern>NO</pattern>
<
that>* IT POSSIBLE FOR TWO CLASSES TO INHERIT FROM EACH OTHER *</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.Cin stands for?
</
template>
</
category

 <
category>
<
pattern>STANDARD INPUT STREAM</pattern>
<
that>* STANDS FOR</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.....
</
template>
</
category

 <
category>
<
pattern>WHAT IS MY SCORE</pattern>
<
template>
<
condition name="score">
<
li value="*"><get name="score"/></li>
<
li>You dont have any correct answer.</li>
</
condition>
</
template></category


<
category>
<
pattern>CORRECTANSWER</pattern>
<
template>
<
think>
<
condition name="score">
<
li value="0"><set name="score">1</set></li>
<
li value="1"><set name="score">2</set></li>
<
li value="2"><set name="score">3</set></li>
<
li value="3"><set name="score">4</set></li>
<
li value="4"><set name="score">5</set></li>
<
li value="5"><set name="score">6</set></li>
<
li value="6"><set name="score">7</set></li>
<
li value="7"><set name="score">8</set></li>
<
li value="8"><set name="score">9</set></li>
<
li value="9"><set name="score">10</set></li>
<
li value="10"><set name="score">More than 10</set></li>
</
condition>
</
think>
</
template>
</
category
 

 
  [ # 24 ]

Ok, it seems to be my turn to step in here. Which version of Program O are you using?

 

 
  [ # 25 ]

version 1.0.4

 

 
  [ # 26 ]

by the way welcome to the problem sir smile

 

 
  [ # 27 ]

Thanks. I’ve been monitoring the thread from the beginning, since I’m the “resident expert” on Program O, but I’ve been letting Steve handle things so far because he’s the “resident expert” on AIML. smile

Let me plug this AIML code into my local version of Program O version 1, and see what I can come up with. Then I’ll let you know what I find.

 

 
  [ # 28 ]

Ok, I’ve found the problem, and I’m kicking myself (and, by extension, Steve, but only a little bit!) for not seeing it right off the bat.

The only punctuation allowed in either the <PATTERN> or <THAT> tags are the two wildcard symbols (_ and *). Any other punctuation, such as periods, commas, exclamation points or question marks will break the script, and return a blank response. Also, on further examination of the AIML code, I’ve found some patterns with leading and trailing spaces that will cause the same problems, since Program O will remove any of those from the input, causing any patterns that have such spaces at the beginning and/or end to never match. Below, you’ll see a revised and corrected copy of what was last posted, and that should work perfectly (at least it does on my installation):

<category>
<
pattern>HELLO</pattern>
<
template>
<
think><set name="score">0</set></think>
HiSo are you ready for interview?
</
template>
</
category>

<
category>
<
pattern>YES</pattern>
<
that>* ARE YOU READY FOR INTERVIEW</that>
<
template>
What is a concrete object?
</
template>
</
category>

<
category>
<
pattern>* KEYWORD NEW</pattern>
<
that>WHAT IS A CONCRETE OBJECT</that>
<
template>
<
srai>CORRECTANSWER</srai>
CorrectWhat is the degree of relation?
</
template>
</
category>
 <
category>
<
pattern>* NUMBER OF ATTRIBUTES</pattern>
<
that>* IS THE DEGREE OF RELATION</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.Is it possible for two classes to inherit from each other? (yes/no)
</
template>
</
category

<
category>
<
pattern>NO</pattern>
<
that>* IT POSSIBLE FOR TWO CLASSES TO INHERIT FROM EACH OTHER *</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.Cin stands for?
</
template>
</
category

<
category>
<
pattern>STANDARD INPUT STREAM</pattern>
<
that>* STANDS FOR</that>
<
template>
<
srai>CORRECTANSWER</srai>
correct.....
</
template>
</
category>

<
category>
<
pattern>WHAT IS MY SCORE</pattern>
<
template>
<
condition name="score">
<
li value="0">You dont have any correct answer.</li>
<
li value="*">Your score has not yet been determined.</li>
<
li>You now have a score of <get name="score"/>.</li>
</
condition>
</
template></category>

<
category>
<
pattern>CORRECTANSWER</pattern>
<
template>
<
think>
<
condition name="score">
 <
li value="0"><set name="score">1</set></li>
 <
li value="1"><set name="score">2</set></li>
 <
li value="2"><set name="score">3</set></li>
 <
li value="3"><set name="score">4</set></li>
 <
li value="4"><set name="score">5</set></li>
 <
li value="5"><set name="score">6</set></li>
 <
li value="6"><set name="score">7</set></li>
 <
li value="7"><set name="score">8</set></li>
 <
li value="8"><set name="score">9</set></li>
 <
li value="9"><set name="score">10</set></li>
 <
li value="10"><set name="score">More than 10</set></li>
</
condition>
</
think>
</
template>
</
category

Please note that Program O handles the values of <CONDITION> tags differently from Pandorabots, so I’ve altered the response to “What is my score” accordingly.

 

 
  [ # 29 ]

Dave - While I wondered whether Program O could handle leading and trailing spaces, I can see no punctuation that would cause a problem. The categories I posted work fine on a Pandorabot and so the AIML looks good to me.

 

 
  [ # 30 ]

The problem with punctuation in the <PATTERN> and <THAT> tags is probably specific to Program O, then, but according to the AIML standard (as I understand it), should not be allowed. Probably, the same holds true with leading and trailing spaces.

 

 < 1 2 3 4 >  Last ›
2 of 6
 
  login or register to react