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

topics and pattern content
 
 
  [ # 31 ]
Dave Morton - Nov 7, 2012:

I have an idea! Let’s trade the <GOSSIP> tag for 2 Zero-length wildcards! cheese wink

I’m up for that. I would also like to see a direct match override an underscore wildcard.

RED WINE would override _ WINE

A category I have is _ THANK YOU which says something like “You’re welcome” and then <srai>s the start of the message. It is useful for sentences such as “That was great, thank you”. However, if someone says, “WHY THANK YOU” It says “You’re welcome. What do you mean why?”, which currently there is no way round apart from taking out the underscore category.

 

 
  [ # 32 ]

getting interesting. I just stopped short of implementing the learn tag yesterday evening (last element to handle in the parser, the pattern matcher still needs a little updating, and testing of course).

If the gossip element isn’t used, I’ll simply generate a warning and don’t do anything with it then. (easiest solution)

A couple of questions:
-1 why do you put an ‘uppercase’ round the newly learned pattern. Is this just for pretty printing? I thought that the pattern-matcher was case-insensitive?
-2 I’m a little confused about the 2-zero length wildcards. What exactly do you guys mean?

Here’s what I did to get the _ and * working: Originally, my system only knew ‘*’, which has the lowest weight, while a static (exact match) has the highest weight (and a thesaurus variable in the middle). This is still the case, but I ‘ve added an extra (optional) parameter to the variable definitions, so that you can assign a weight that should be used. So now, I translate every ‘_’ to ‘$v0%1.2’  or ‘$v1%1.2’  where ‘vx’ is the name of the variable and %x.x determines the weight that the variable should get, in the examples 1.2 (while a static has a weight of 1 and a default variable 0.1)
So the ’ _ THANK YOU’  pattern would translate to ‘$v0%1.2 THANK YOU’ . If you would change it to ‘$v0%0.9 THANK YOU’, then it doesn’t override the ‘Why thank you’ pattern.
The Pattern ‘* thank you’ becomes ‘$v0 thank you’
and finally the pattern ‘* * thank you’ becomes ‘$v0:1 $v1 thank you’ (:x determines the nr of words that the variable should capture).

 

 
  [ # 33 ]

1 - Yes, it’s just to make it look good. I’ve always put patterns in uppercase.
2 - A zero length wildcard is one that would match either zero or more words.

I LIKE YOU ~

would match I LIKE YOU and I LIKE YOU A LOT. AIML currently takes 2 categories to do this:

I LIKE YOU
I LIKE YOU *

When you start dealing with I REALLY LIKE YOU, you then need:

I * LIKE YOU
I * LIKE YOU *
I LIKE YOU
I LIKE YOU *

instead of just a simple I ~ LIKE YOU ~

 

 
  [ # 34 ]
Steve Worswick - Nov 7, 2012:

1 - Yes, it’s just to make it look good. I’ve always put patterns in uppercase.
2 - A zero length wildcard is one that would match either zero or more words.

I LIKE YOU ~

would match I LIKE YOU and I LIKE YOU A LOT. AIML currently takes 2 categories to do this:

I LIKE YOU
I LIKE YOU *

When you start dealing with I REALLY LIKE YOU, you then need:

I * LIKE YOU
I * LIKE YOU *
I LIKE YOU
I LIKE YOU *

instead of just a simple I ~ LIKE YOU ~

That should fairly easily be added. I have ‘the option’.  ‘I ~ like you ~’ would translate to ’ I [$v0] like you [$v1]’ . So should I add a replacement for the ‘~’ symbol?

 

 
  [ # 35 ]

Oh, crap. I’m corrupting the innocent. Sorry I brought it up! cheese

Jan, if you want to include “extended” wildcard use, nobody here will object, I’m sure, but you need to bear in mind that any AIML that uses the extra wildcards won’t be usable in other AIML interpreters, unless said interpreters also use the same wildcard extensions. There has been some discussion in the past about creating an “advanced” AIML specification, but nothing ever came of it. Personally, I’d love to add the tilde (~) as a zero-length wildcard that would carry the same priority as any matching word in the input, but again, it would make the AIML files written for use of the wildcard non-transferrable to other interpreters, and that’s a huge thing. smile

 

 
  [ # 36 ]

~ is just something I made up to demonstrate what would be nice to see in AIML. It is not currently in use. If you want to include it, by all means feel free but no AIML is currently written that will use such a wildcard.

 

 
  [ # 37 ]

Better leaf it out then. If people would want to have this, they can always change the converted patterns manually.

 

 < 1 2 3
3 of 3
 
  login or register to react
‹‹ PyALICE Story      srai inside think ››