Using PDL expressions within SRL expressions

It is possible to perform a PDL search of a Text column inside an SRL expression. The search returns a numeric value representing the relevance of a text value to the search.

If you use the PDL function count(), the search operator returns the frequency of the given word.

To perform a PDL search of a column, enclose the search in double quotes, then use the @ symbol, and then type the name of the text column to search, and enclose the entire expression in single quotes.

For example, if we have a text column called "Comment", and we want to search for "dog or cat", we would write '"dog or cat"@Comment'.

Such a query will return a number representing the relevance of the request.

It is important not to include additional spaces between the single quotes and the contents as this causes PolyAnalyst to fail to parse the expression. It is important to write a proper search query as an improper search query can cause the entire SRL expression to be invalid.

Many of the text analysis nodes are capable of generating a Derive node or a Filter Rows node which will contain a SRL expression with embedded PDL.

You can choose to edit the generated expressions or write your own from scratch. When PolyAnalyst evaluates a SRL expression which includes embedded PDL, any of the text columns searched must first be indexed.

You can then use this resulting value as part of a larger SRL expression.

For example, if we wanted to derive a new column that was true if the Comment column matched, and false otherwise, we would write: '"dog or cat"@Comment' != 0.

If there is any relevance between a "Comment" value and the search query, a non-zero relevance value will be returned by the embedded PDL search query, which is not equal to 0, which makes the expression result in a true value.

Note that you can enclose the name of the column in square brackets if necessary, such as if the column name contains a space.

'"dog or cat"@[Question 23]'

You can also use SRL expressions within PDL expressions as well. See the details in the corresponding section.