Extract all nouns from user input

Hi,

I have been using the POS annotation (%POS_NOUN.ANNOT) to extract a noun from an input. Now what if I want to extract all nouns from an input? Do I have to repeat %POS_NOUN.ANNOT for as many nouns that I expect to extract?

Thanks in advance,

Amber

Hi Amber,

indeed, there is a possibility to extract an arbitrary number of nouns from your user input.

You can do this using the Maybe-operator in your language condition:
(%POS_NOUN.ANNOT ~%POS_NOUN.ANNOT)^{nouns<<_USED_WORDS}

This will save all nouns in the variable nouns.
Here is an overview of all operators that can be used in Teneos condition syntax:

Hope that helps!

Best wishes,

Fabienne

2 Likes

That helps, thanks!