Skip to main content

Filtering Nested Concepts

24/03/2026

Nested concept annotations are occurrences where annotated concepts in a text overlap, meaning that one concept is completely contained within another one.

The following example illustrates this clearly - the concepts are 'shark', 'tiger' and 'tiger shark'. In the sentence 'We went for tiger shark observations' all three concepts would match, however this is avoided by default and only the longest match, here 'tiger shark' is preserved, and the other two are removed.

To see how this works we will enter the following request in the address bar of our web browser:

This call returns the following:

Sometimes however you may want to have all matches, including those which are nested; then you only need to set the parameter 'filterNestedConcepts' to 'false' (default setting is 'true').

To illustrate this enter the following request into your browser's address bar:

These results differ from the first call using the default settings of the parameter 'filterNestedConcepts'; now 'Whisky' appears twice (before it appeared once) and additional concepts 'Sour', 'Drink', 'Juice', and 'Lemon' have been detected which did not show up after the first call. The results returned by the second call are: