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..

confused about topic scope
 
 

im want my bot to learn,i wite aiml like this

<category>
learn</pattern>
<template>your question?
<think><set name=“topic”>learnscope</set></think>
</template>
</category>
<topic name=“learnscope”>
<category>
*</pattern>
<that>your question?</that>
<template>ok,the answer?</template>
</category>
<category>
*</pattern>
<that>ok,the answer?</that>
<template>
haha,i get it
<system>study “<input index=“2”/>  <input index=“1”/></system>
<think><set name=“topic”>*</set></think>
</template>
</category>

</topic>
<category>
my question abc</pattern>
<template> xxxx   xxxx </template>
</category>

——————————————————————————————-
i think it will be like this:

use:learn
bot:your question?
use:my question abc
bot:ok,the answer?
use:my anster abc
bot:haha,i get it

if i input “my question abc”,it never match in topic, i know the match process: input->that->topic

so,how can i do?  is there a limit i can get my own scope?

thanks alot .....

 

 
  [ # 1 ]

sorry,code style

<category>
<
pattern>learn</pattern>
<
template>your question?
<
think><set name=“topic”>learnscope</set></think>
</
template>
</
category>

<
topic name=“learnscope”>
<
category>
<
pattern>*</pattern>
<
that>your question?</that>
<
template>ok,the answer?</template>
</
category>
<
category>
<
pattern>*</pattern>
<
that>ok,the answer?</that>
<
template>
haha,i get it
<system>study “<input index=“2”/>  <input index=“1”/></system>
<
think><set name=“topic”>*</set></think>
</
template>
</
category>
</
topic>

<
category>
<
pattern>my question abc</pattern>
<
templatexxxx   xxxx </template>
</
category
 

 
  [ # 2 ]

Hello, Lowpair, and welcome to the forums.

One of the problems with AIML and AIML interpreters is that you aren’t granted any leeway with spelling errors, either on the pattern portions, or on the THAT or TOPIC parts, either. Thus, when working with AIML categories, it’s absolutely essential to make sure that you spell all of your words correctly. I’m not trying to insult you, since it appears that English isn’t your native language. I just needed to point out that AIML, like any other language that computers use, is VERY picky about spelling. If you have a text editor that has a built-in spelling checker, then using it will help you to save time and frustration. If you don’t have an editor with a built-in spell checker, then it would be a great idea to get an editor that does.

Now, to your problem. The first question that I have is what AIML interpreter (chat program) are you using? This makes a difference in how your AIML categories should be written. If you’re using Pandorabots chatbot hosting, then the categories will need to be written differently than if you’re using Program O, or Program D.

[edit]I should also point out that if your chatbot is hosted with Pandorabots, a very similar LEARN function is already in place. (although the SYSTEM tag there is disabled)[/edit]

 

 
  [ # 3 ]

: )

thank you very much,I will listen to your advice

im use programd

 

 
  [ # 4 ]

Since you’re using Program D, it would be useless to directly use Steve Warswick’s LEARN.AIML file, but you can certainly use it as a template, to see how best to implement your own AIML categories for learning. You can find LEARN.AIML, along with other great AIML files at http://www.square-bear.co.uk/aiml/.

And before you ask, the reason why you can’t directly use Steve’s LEARN.AIML file is that Program D, which is written in Java, doesn’t have the functionality built-in to handle the <learn> and <eval> tags that are used within the AIML file. Now, if you know Java, you may be able to write the necessary functions to make use of those tags (I had to write the PHP functions needed to handle those tags in my version of Program O). I don’t know Java, myself, so I can’t help you with that.

 

 
  [ # 5 ]

Oh, I carefully reviewed the learn.aiml, he is a unary predicate logic of the deal, but I think the sentence is a life learning methods:

user: learning start
bot : You say question             / / here is to guide the robot sentence
user: Do you watch Avatar film?  / / Here is the real questions to learn
bot : You say the answer         / / here is to guide the robot sentence
user: I’ve seen Avatar             / / Here is the real answer

In this way, the user can enter “learning start” questions and answers began to teach the robot, which can represent the beginning of a clear symbol of learning, because sometimes the user can not be entered on one line:
learn “Do you watch Avatar film?” “I’ve seen Avatar”

If it is a long sentence by sentence to teach the robot to guide learning, it would be more intuitive for users

After learning, when the user question:
user:Do you watch Avatar film?
bot : I’ve seen Avatar

These are the first problem: the robot how to learn

The second question, regarding the matching range
Tags can not limit the existing scope of topic, unless the same input and that, will continue to match the topic

So if not the same input and that, question will never match the inside into the topic sentence

I always thought the topic can be limited inside the expense of external patton , but it is not the case, then I would like to ask, how to implement this model?

 

Sorry, I translated by Google translate the above elements, the sentence is not fluent

Thank you very much

 

 
  [ # 6 ]

Thank you
I thought a moment, this is just a learning function, I do not have to use labels, and directly in my code to achieve this function, Thank you

Dave Morton you are a person worthy of respect, thank you

 

 
  [ # 7 ]

I’m glad I was able to help, Lowpair. If you have any other questions, please ask. I’ll help however I can. smile

 

 
  [ # 8 ]
Lowpair - Mar 20, 2011:

Oh, I carefully reviewed the learn.aiml, he is a unary predicate logic of the deal…

I’ll take that as a compliment smile

 

 
  login or register to react