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

newbie level - what’s a good way to store and code multi-word facts like “marital status” ?
 
 

I am new at this and asking a basic easy question.  Don’t look for deep meaning!

I can store facts like (age gets 33) or (sex gets female) and query them easily matching a pattern like (what is your _*1 >) and looking up _0 in a query.

But I don’t know what to do with facts like “marital status” which have two words. I guess I could store them easily with (“marital status” gets single) or (marital_status gets single) ,  right?

What’s not clear is how to query them again, as in user input “What is your marital status?”
Should I do something like (what is your _*2)  and then $key = “_0 _1” and then query on $key?
Is that the right way to do it?

Thanks for the advice! 
Wade

 

 
  [ # 1 ]

You are correct that marital_status can be a fact field.

If you did ?: (what is your _*2)  then _0 is those two words (separated by _) and you can directly query on that value.

query(direct_sv ‘_0 you ? )  for example if fact is ( marital_status you single).
You just have to decide whether you are testing on canonical original values of words, which in this case is the same.

 

 
  [ # 2 ]

Ah, Bruce from abroad!  I didn’t realize that _*2 would return TWO cojoined words into _0.  Wonderful!  Exactly the insight I was hoping for   Thank you!  ChatScript is GREAT!.

Good journey and I hope you don’t have to travel through the New York City area!

 

 
  login or register to react