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

Using ^match to match patterns
 
 

I am trying to use ^match in order to match arbitrary patterns. Currently, ^match is not working for me at all and I’m trying to figure out what I’m doing wrong. I’m using the following test code for testing:

^analyze("car monkey")
if (^
match("car horse")) {
    MATCH SUCCESS
else {
    MATCH FAILURE

For some reason, this code is giving me MATCH SUCCESS, even though the input “car monkey” clearly doesn’t match the pattern “car horse.” I have tried dozens of pattern combinations that should match such as

^match("car_monkey"), ^match(^"car monkey"), ^match(^"(car monkey)"), ^match(^"(<<car monkey>>)"

, etc., but none seem to work properly. Either I always get a MATCH SUCCESS regardless of the input, or I always get a MATCH FAILURE regardless of the input.

What am I doing wrong here? Thank you!

 

 
  [ # 1 ]

Nothing to my eye.  I put your code into my test topic and it worked fine by saying MATCH FAILURE

u: (test) ^analyze(“car monkey”)
if (^match(“car horse”)) {
MATCH SUCCESS
} else {
MATCH FAILURE
}
I would try :prepare car monkey to see that nothing unusual happened in analysis

 

 
  login or register to react