AI Zone Admin Forum Add your forum

Chatbot Conference in the Netherlands on Tue 24, 2018, with international line-up! Check it out

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:

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


  [ # 2 ]


user: I like apple, banana, and pear.


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:


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



  login or register to react