torelation

Purpose

Converts the term corresponding to the corresponding standard or custom relation from parent node 'Relation Extraction' and replaces it with specific relation attributes.

Has no effect for non-relation arguments.

Syntax

torelation(type, term[,…​])

Arguments

Takes several arguments:

  1. the first required argument restricts the relation type ("acquisition", "people and contacts", "employment" etc.).

  2. the second required argument defines the term to replace.

You can also replace the term with a specified attribute of a relation instead of the whole relation. Target attribute is set with field named parameter.

Returned Value

The relation of the defined type or its target attributes.

Examples

Dataset

XPDL rule

Result

J&J acquired DePuy.

rule: r1

{

query: {relation(acquisition)}:1

result: Match = torelation(acquisition, $1, field:=buyer)

}

Johnson & Johnson