Search for Negations

The negate() function is used to search arguments in negative contexts. The function direct() or its equivalent possible() are the opposite functions of negate() and search for arguments not in negative contexts.

Syntax

negate(term_1 [, term_2,..])

direct(term_1 [, term_2,..]) = possible(term_1 [, term_2,..])

The functions are based on PolyAnalyst proprietary negation detection algorithm, which allows to match both grammatical ("no activity") and lexical ("absence of activity") negations.

Example

negate(violation) matches "denies any violations", "court found no violation", etc.;

direct(violation) matches "documented violations", "penalties for violations", etc.

pdl negate 1

Task Example: Customer Reviews Analysis

Users may be interested in analyzing customer feedback on a product to retrieve aspects of the product that were positively evaluated by customers. It can be done using the query that searches for positive adjectives followed by a noun.

pdl negate 2

However, this query also matches occurrences of positive adjectives when they appear in negative contexts and change the meaning to negative. To filter out such results, we should enclose the query within the direct() function.

pdl negate 3

Using the negate() function, one can also find the negations of negative reviews.

pdl negate 4

Note

A function with several arguments is equivalent to several functions with a single argument concatenated using the or operator:

negate(good, nice) = negate(good) or negate(nice);

direct(good, nice) = direct(good) or direct(nice).