AI Zone Admin Forum Add your forum

NEWS: survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Matching input: finding keyword after match location


I have a question about how to find something after a certain match location.

For this, refer to Basic-User-Manual page 20, where it says:

The absence of words is represented using ! and means it must not be found anywhere after the current match location. When placed at the start of the pattern, it means not anywhere in the sentence at all

For reference:

Something like:

a: (* _~concept1 _~concept2 {_~concept3} *) 

Tells us that in user input, word from concept1 precedes word from concept2 (optional amount of words between concept1 and 2) and we’re free to see any word from concept3.

a: (* _~concept1 * !~concept2 {_~concept3} *) 

Tells us something among the lines of: First a word from from concept1 then afterwards we cannot have any word from concept2 and we may have a word from concept3.

Refer to baisc user manual page 20ff for more information.

What I am trying to find now is something that has a similar effect to !~conceptX. But instead of

  it must not be found anywhere after the current match location

I want something like “it must only be found after the current match location”.

How would you rewrite the following code, so instead of not being allowed to appear after the “second index” it can only be found in or after the “second index”? (second index as in being the second “keyword” from a concept appearing)

a: (* _~concept1 * !~concept2 {_~concept3} *) 

  login or register to react