Basic Concepts
Data Structures
The core data structure in RL3 is a Factsheet. Inputs and outputs are represented in the form of facts in Factsheets in RL3.
Each fact contains the following key fields:
Label
is a name of a fact. It is allowed to have several facts with the same label;Text
is a source of a textual statement represented by a fact;Position
is a reference to a particular statement in the text;Weight
is a float number assigned to the fact by a knowledge expert.
Each fact may also contain its own Factsheet representing the hierarchical facts. In this case the sub-facts can be addressed by a label path. For instance, a fact person
may contain sub-facts first_name
and last_name
with label paths person.first_name
and person.last_name
respectively.
Program
In general an RL3 program is a collection of rules. During execution of the program, an RL3 engine matches rules and facts. When a particular rule and fact are matched, the engine executes the action part of the rule. As a result the new facts are created (asserted) in the current or a new Factsheet depending on the selected execution mode (execute or update).
For instance, in an entity extraction task an input Factsheet may contain the only fact named text
and an output Factsheet may contain several facts (annotations) related to the found entities.