Teneo Developers
Table of Contents
Was this page helpful?

Share to

Recognize plural and singular

Sometimes you may want to distinguish between plural and singular inputs, like “show my next appointments” versus “show my next appointment”. To achieve this, you can use part-of-speech tags (POS-tags).

POS-tags

Teneo annotates each word in an input with POS-tags that tell you whether it’s a verb, noun, if it is plural or singular, etc. The full list of POS-tags can be found in the Annotations Reference.

Coffees vs Coffee

So how do you use a POS-tag to differentiate between appointments and appointment in a Syntax Condition?

To match on a synonym of 'appointment' and also to make sure it is plural/singular, you would use the SAME MATCH-operator (&=). Like this:

tlml

1(%COFFEE.NN.SYN &= %$PL.POS)
2

The syntax condition above will match only on plural (%$PL.POS) synonyms of appointment (coffees, lattes etc).

tlml

1(%COFFEE.NN.SYN &= %$SG.POS)
2

This syntax condition will match only on singular (%$SG.POS) synonyms of appointment (coffee, latte etc).

singular-plural-w