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

MS SQL Server based implementation of HAL or ALICE or MYBOT
 
 
  [ # 181 ]

I am counting down to a base AIML interpreter in MS SQL. grin

(This is a milestone in our project that I am looking forward to.)

We have the following 13 tags yet to process to complete Phase I .

[ul]
[li]GOSIP[/li]
[li]LEARN[/li]
[li]LOAD[/li]
[li]LOWERCASE[/li]
[li]PERSON[/li]
[li]PERSON2[/li]
[li]PERSONF[/li]
[li]SENTENCE[/li]
[li]SYSTEM[/li]
[li]THAT INDEX[/li]
[li]THATSTAR INDEX[/li]
[li]TOPICSTAR INDEX[/li]
[li]UPPERCASE[/li]
[/ul]

grin

 

 
  [ # 182 ]

The first two tags I would like to talk about are the LEARN and LOAD tags

I’m sorry these just don’t make sense to me… mainly as they do not have an associated FORGET or UNLOAD?

Am I missing something?

*It just seems that after the bot has learned something it will never be called again.

 

 

 
  [ # 183 ]

I can make that list a bit easier for you.

Gossip doesn’t work.
Nobody uses person2.
Load and sentence are also defunct.
I never heard of personf

 

 
  [ # 184 ]

Learn only works for the current user which is just as well as most of my chatters use it for “learn Tony is gay” and then ask what is Tony. There is a learnf tag which will stored learned facts in a file to be shared among all users but you need to monitor this or the above will occur.

It just seems that after the bot has learned something it will never be called again

This is a popular one among Loebner judges who will say something like “Fred kicked the football” and then later in the conversation will ask “What did Fred kick?”

There is no forget tag but if someone was to say, “Fred kicked the cat”, this new fact would overwrite “What did Fred kick?”

 

 
  [ # 185 ]
Steve Worswick - Nov 24, 2012:

This is a popular one among Loebner judges who will say something like “Fred kicked the football” and then later in the conversation will ask “What did Fred kick?”

There is no forget tag but if someone was to say, “Fred kicked the cat”, this new fact would overwrite “What did Fred kick?”

Can you give me an example of AIML that would produce this result?

 

 

 
  [ # 186 ]

Without giving too many tricks away, this will do it.

<category>
 <
pattern>* KICKED THE *</pattern>
 <
template>
OkI will remember that.
 <
srai>XEDUCATE WHAT DID <star index="1"/> KICK XSPLIT THE <star index="2"/></srai>
 <
srai>XEDUCATE WHO KICKED THE <star index="2"/> XSPLIT <star index="1"/> did</srai>
 <
srai>XEDUCATE WHAT WAS KICKED XSPLIT The <star index="2"/></srai>
 <
srai>XEDUCATE DID <star index="1"/> KICK THE <star index="2"/> XSPLIT Yes that is correct</srai>
 <
srai>XEDUCATE DID <star index="1"/> KICK XSPLIT I thought <star index="1"/> kicked the <star index="2"/></srai>
 <
srai>XEDUCATE DID KICK THE <star index="2"/> XSPLIT No that was <star index="1"/></srai>
 <
srai>XEDUCATE WHAT HAPPENED TO THE <star index="2"/> XSPLIT It was kicked by <star index="1"/></srai>
 <
srai>XEDUCATE WHAT DID <star index="1"/> DO TO THE <star index="2"/> XSPLIT <star index="1"/> kicked it</srai>
 </
template>
</
category>

<
category>
 <
pattern>XEDUCATE XSPLIT *</pattern>
 <
template>
 <
learn>
 <
category>
  <
pattern>
  <eval><
uppercase><star index="1"/></uppercase></eval>
  </
pattern>
  <
template>
  <eval><
star index="2"/></eval>
  </
template>
 </
category>
 </
learn
 </
template>
</
category

Human: Fred kicked the football
Bot: Ok, I will remember that
Human: What did Fred kick?
Bot: The football
Human: Did Fred kick a cat?
Bot: I thought Fred kicked the football
Human: Fred kicked the cat
Bot: Ok, I will remember that
Human: What happened to the cat?
Bot: It was kicked by Fred
Human: What did Fred kick?
Bot: Fred kicked the cat
Human: Did Fred kick the football?
Bot: Yes that is correct
Human: Did Fred kick the cat?
Bot: Yes that is correct

 

 

 
  [ # 187 ]

Ok that makes sense all the way to the < eval > tags?

 

 
  [ # 188 ]

<eval> simply means evaluate what is betwen the tags. If I had missed them out, the learned categories would have all been:

<category>
  <
pattern>
    <
star index="1"/>
  </
pattern>
  <
template>
    <
star index="2"/>
  </
template>
 </
category

The star indexes would have been hardcoded as star index=“1” instead of the actual values that were passed to it.

But when I use eval, it works out what should actually be there. So in this case it takes the value of star index=1, converts it to uppercase and produces this for the first category:

<category>
  <
pattern>
    
WHAT DID FRED KICK
  
</pattern>
  <
template>
    
The football
  
</template>
 </
category
 

 
  [ # 189 ]

Nice.

So then with the learn and the eval we are able to create new experiences for the bot to draw from.

I did not notice that eval tag in the AIML reference you provided earlier… is there a list of these non standard tags somewhere?

Or is it a standard tag that is just on another list ?

 

 
  [ # 190 ]

Here are a few links that may prove useful: smile

http://forum.alicebot.org/viewtopic.php?f=4&t=258
http://www.alicebot.org/Embrace.html
http://en.wikipedia.org/wiki/AIML

The rest of the pages that I generally refer to when researching AIML have already been linked elsewhere in this thread, so I left them out in this post.

We’ve already passed the point where the reliability and/or relevance of my contributions has/will become questionable, at best, I’m afraid. But I’m still watching the discussion with great interest, hoping to learn something. smile

 

 
  [ # 191 ]

The eval tag is unique to Pandorabots (as far as I know) and is not an official AIML tag.

Before it was amended, learn used to read in entire AIML files but the way it works now really elevated AIML and made it a whole lot easier for the bot to be educated with knowledge and create categories on the fly. Before, you would have to mess around setting variables to the different actions like:

<pattern> * KICKED THE * </pattern>
<
set name="kicker"><star/></set>
<
set name="kickee"><star index="2"/></set

And then set up futher categories dealing with checking the values. Yeurgh!

 

 

 
  [ # 192 ]

Hi guys, been beyond busy with work, but I have finally found a way to introduce my bot into our focus application. It is working great so far, and in a short while I expect to be able to let you click over and have a test run.

Let me ask a question, and this may be obvious but in standard AIML can you do the following.

<category>
  <
pattern>Hi</pattern>
  <
pattern>Hi *</pattern>
  <
pattern>Hey</pattern>
  <
pattern>Hey *</pattern>
  <
template>Hey Long time no see!</template>
 </
category

I’m sure you can see where I am going with this.

 

 
  [ # 193 ]

I think many people wished this was possible. Unfortunately it isn’t.  Perhaps for version 2.0

 

 
  [ # 194 ]

Not even in AIML 2.0, I’m afraid. However, using a pattern side <set> tag, along with the associated data file (depending on how the script handles AIML 2.0), something similar can be used. It could look like this:

<category>
  <
pattern><set>greetings</set></pattern>
  <
template>Hey Long time no see!</template>
</
category

An example of an associated data file would be, for example:

Filename: greetings.set
File content:

HI
HELLO
HELLO THERE
GREETINGS
SALUTATIONS


I’m not 100% certain whether wildcards of any type are allowed in <set> tag definitions, so I didn’t list any. If they are, then a whole new world of flexibility opens up. smile

 

 
  [ # 195 ]

To get round this in AIML 1.0, you need the <srai> tag, like so:

<category>
  <
pattern>HI</pattern>
  <
template>Hey Long time no see!</template>
</
category>  

 <
category>
  <
pattern>HELLO</pattern>
  <
template><srai>HI</srai></template>
</
category>  

 <
category>
  <
pattern>HOWDY</pattern>
  <
template><srai>HI</srai></template>
</
category
 

‹ First  < 11 12 13 14 15 > 
13 of 15
 
  login or register to react
‹‹ The Type IV algorithm      JERVIS ››