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

Issues with negation and multiple clauses in single sentence
 
 

Hey there.

I am trying to create a series of responders to deal with statements about interpersonal issues, and am running into some trouble trouble with negation and multiple clauses. Example:

I am trying to use the following pattern to respond to the input…

#! My girlfriend is really angry I didn’t call
u: ([she ~female_role_romantic] ~tobe !not *~2 angry)

... and a couple issues seem to be coming up.

1. The “!not” I put in is intended to match when the user inputs, “she is NOT angry” so the rule won’t fire, but it must be picking up on the “not” in “I did NOT call”. How can I make the negative only apply directly after the verb “tobe”? Is there a better way to handle negatives if I want to be able to allow for a negative in the second clause?

2. This rule will work if I type, “She is really angry” or even “She is really angry I”, but as soon as I add “I didn’t call” it doesn’t work. I’m relatively new to CS so may be missing fundamentals of multiple clauses, but my question is, how should I be writing this to allow for multiple clauses?

Cheers,

Ed

 

 
  [ # 1 ]

Hmmm. I was actually typing “My girlfriend is really angry I didn’t call HER”. My apologies.

I used :trace and caught that “she” was being triggered by the “her” at the end of my sentence. Therefore, the next keyword “~tobe” wasn’t found because the position was already at the end of the sentence, from what I understand. Simply flipping the order of “she” and “~female_role_romantic” fixes that issue. Fascinating!

I am still unsure how to handle my second question about negatives, however. I presume it is an issue with positioning, as well, but any wisdom her would be greatly appreciated!

Thanks!

 

 
  [ # 2 ]

When you want [she ...] to match the first available word in the sentence (see common beginner mistakes manual) you should convert that into a concept, then use the concept in the pattern.

the negation operator doesnt negate on a single position in the sentence, it negates finding the item ANYWHERE in the sentence later than where you are now.  If you are trying to avoid a word in a specific place, then you need to memorize that word and then compare it to what you dont want to see. But this idea doesn’t work well before a wildcard. 

I will have to think about how to provide a syntax that would better support that.

 

 

 
  [ # 3 ]

Thanks a lot, Bruce, for the fast reply. I’m running with your advice re: concepts and it’s working well.

I am playing around with using _match variables to capture a word in a specific place and compare but am coming up short of feasible solutions, even if there were no wildcard after. Ideally there would be a wildcard, though, so any thoughts that might percolate on your end are hugely appreciated.

Hope you’re having a great start to the week. Thanks for all of your support.

 

 
  [ # 4 ]

I’m not sure what this means: This rule will work if I type, “She is really angry” or even “She is really angry I”, but as soon as I add “I didn’t call” it doesn’t work. I’m relatively new to CS so may be missing fundamentals of multiple clauses, but my question is, how should I be writing this to allow for multiple clauses?
What’s an example of what you want to do with “multiple clauses”

Also I am playing around with using _match variables to capture a word in a specific place and compare but am coming up short of feasible solutions doesn’t mean anything to me. Illustrate with example you want to do

 

 
  login or register to react