AI Zone Admin Forum Add your forum

Chatbot Conference London On Oct 3th Erwin will be moderating on the Chatbots conference in London. Why don't you meet him there? As a Chatbots.org visitor, you'll get a discount as well: Why don't we meet there? get a discount

We do experience some trouble with our forms and some details page. We'll fix this ASAP. Sorry for the inconvenience!
How to get multiple occurrence of an element
 
 

This might be an easy question that has already been answered, but I don’t know what to search in the forum.

For example, I’d like to get all the fruits user likes.

user: I like apple, banana, and pear.
user: I like apple and banana.

rule: I like _~fruit

_0 seems will be the last fruit entered.

I don’t know how many types of fruit the user will say, but would like to catch all of them.

Thanks for any help!

 

 
  [ # 1 ]

Just saw another new post: https://www.chatbots.org/ai_zone/viewthread/2976/

Seems I should use ^join and ^retry to catch all of them.

 

 
  [ # 2 ]

BTW,

user: I like apple, banana, and pear.

or

user: I like apple; banana - pear,  mango - berries.


In this case user utterance is a multi-sentence (with default CS settings)

Bruce suggested to set tokenization control:

$cs_token = #NO_SENTENCE_END | #NO_HYPHEN_END | #NO_COLON_END | #NO_SEMICOLON_END

although with NO_SENTENCE_END the others may already be overridden (i havent checked.)

 

 

 
  login or register to react