tofact

Purpose

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

Has no effect for non-fact arguments.

Syntax

tofact([type,] term[,…​])

Arguments

The function takes one required argument term that defines the term to replace.

The first optional argument restricts the fact type ("acquisition", "people and contacts", "employment" etc.).

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

Returned Value

The fact of the defined type or its target attributes.

Examples

Dataset

XPDL-rule

Result

J&J acquired DePuy.

rule: r1

{

query: {fact(acquisition)}:1

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

}

Johnson & Johnson