Rework of Learn\Remember Technique

Got any suggestion for SIML, Syn Bot or Chatbot Studio ? Let us know

Rework of Learn\Remember Technique

Postby royaltca » Fri Jun 26, 2015 2:38 am

I decided to go with another request\sugestion to obey the limits of learning features. The idea is based on utilizing the variables. Let's see:

I. Setting some information on the object

SIML Code

<Model>
<Pattern>* is *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
<Object Name="{WHAT}" Set="IS"><Match Index="2"/></Object>
Oh, I see.
</Response>
<Model>

<Model>
<Pattern>what is *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
It is <Object Name="{WHAT}" Get="IS"/>.
</Response>
<Model>


Example:

Code: [Select all] [Expand/Collapse] [Download] (Untitled)
I: The sun is hot.
Bot: Oh, I see.

I: What is sun?
Bot: Sun is hot.
GeSHi © Codebox Plus


II. Adding information to object

SIML Code

<Model>
<Pattern>* is also *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
<Object Name="{WHAT}" Add="IS"><Match Index="2"/></Object>
Oh, I see.
</Response>
<Model>

<Model>
<Pattern>what is *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
It is <Object Name="{WHAT}" List="IS"/>.
</Response>
<Model>


Example:

Code: [Select all] [Expand/Collapse] [Download] (Untitled)
I: The sun is also yellow.
Bot: Oh, I see.

I: What is sun?
Bot: Sun is hot and yellow.
GeSHi © Codebox Plus


III. Checking if object has required info.

SIML Code

<Model>
<Pattern>is # *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
<Bind Key="{INFO}"><Match Index="2"/></Bind>
<If Object="{WHAT}" Variable="IS" Contains="{INFO"}>Yes, it is <Match Index="2"></If>
<Else>No, it isn't.</Else>
</Response>
<Model>


# will be an object (matches when tested part of string is the name of one of the existing objects).

Example:

Code: [Select all] [Expand/Collapse] [Download] (Untitled)
I: The sun is hot.
Bot: Oh, I see.

I: Is sun hot?
Bot: Yes, it is.
GeSHi © Codebox Plus


IV. Conclusion

The variable system could handle the learning. I tried it with UserSettings Variables like:

SIML Code

<Model>
<Pattern>* is *</Pattern>
<Response>
<Bind Key="{WHAT}"><Match/></Bind>
<User Set="{WHAT}IS"><Match Index="2"/></User>
Oh, I see.
</Response>
<Model>


Basicly the <Object> tag would create or append data to existing object, which will be stored like BotSettings or UserSettings, which can be then saved and reloaded after the restart of Syn.Bot.
royaltca
Pro
 
Posts: 33
Joined: Mon Mar 30, 2015 5:18 pm

Return to Feature Request and Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest
cron