bool

Purpose

Converts an argument to a boolean data type (yes/no).

Syntax

bool($argument)

Arguments

The function accepts one argument.

Returned Value

Boolean value.

Examples

Dataset

XPDL-rule

Result

penalty

rule: r1

{

query: {penalty}:m

result: Match = $m

attribute: Presence = bool(1)

}

yes

without penalty

rule: r2

{

query: {phrase(without, penalty)}:m

result: Match = $m

attribute: Presence = bool(0)

}

no