Excluding results
The operator not is used to specify an argument which should not occur at the specific position within a sequence.
The operator not checks the absence of the argument within the scope of the function.
Example
Task example: Find the word in specific context
The search for the word arm in news articles about clinical trials returns the following results:
In order to find the word arm as "group of patients" and not as "part of company of organization", we can exclude some context before it (for example, "business", "development", "sales" or "commercial"):
phrase(not orn(business, development, sales, commercial), arm).
This query finds the word "arm" in such contexts as: "placebo arm", "trial arm", "arm of the study", but does not find it in "the firm’s global biologics research and development arm".
Search for any arguments except specified ones
The except() function and the / operator are used to specify that any arguments except specified ones can occur on the specified position in the sequence. In most cases they can be used interchangeably.
Examples
However, except() cannot be used within functions which do not support nested arguments (e.g. term(), regex(), dictword(), knownword(), unknownword(), number(), etc.). In such cases the operator "/" can be used instead.
Examples
Task example: Find the objects with positive evaluation
In order to find the nouns following the words from the list of positive terms, we can write a query clause:
phrase(0, term(positive), lemma(noun))
But this query also finds some phrases in which the terms from the list actually may have a different meaning depending on the context (for example, "delicate wash", "concrete floor", "sweet fruit").
To exclude them from the query users can use the "/" operator:
phrase(0, term(positive), lemma(noun))/orn("delicate wash", "concrete floor", "sweet fruit")