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

A pattern question
 
 

If we need to catch all possible ways of expressing the meaning “do I have to ...”, we could write a set like the following and use it in the pattern.

concept: ~doihaveto (“do I have to” “must I” “do I need to” “have I got to”)

However, it is kind of cumbersome since we need to write other sets like ~doyouhaveto, ~dowehaveto, ~dotheyhaveto etc.

Could there be any better way to do the job? Many thanks.

Michael

 

 
  [ # 1 ]

The question is what you are trying to detect. If you merely wanted “do xxx have to” as a general thing involving a pronoun then one might write
u: (  [  ( must ~pronoun) (do ~pronoun [have need to]) (have ~pronoun got to)])

 

 
  [ # 2 ]

Thank you, Bruce. That’s quite an instructive advice for the general case.

However in my specific case the exact pronoun needs to be identified. I guess I’ll just have to create those additional sets. That wouldn’t bother too much. I just wondered if I can keep the script more compact.

Thanks again.

Michael

 

 
  [ # 3 ]

You can memorize the pronoun:

u: (  [( must _~pronoun) (do _~pronoun [“have to” “need to” must]) (have _~pronoun get to)] )

 

 
  login or register to react