The Transform Section Overview
In the Transform section, you create variables, logics and conditions that will form the rule set for your text. The formulation of conditions and logics is done via a graphical interface on which processing units (nodes) can be created. Within nodes, you can then define the functions. Nodes can be connected to other nodes and the results of the functions are passed on. For passing values / data see also Value Access Methods
Basic Elements of Nodes
How to use nodes, ports and connections
When they are to be created nodes can be dragged from the node overview in the left column to the central workspace. You can then pull the connection between the ports to pass data and results. When the nodes are selected, a configuration form appears in the right panel.
Note: For deleting the arrows click on them to activate them and then click on the red "X".
Overview of Node Types
|Data||Data node, Analysis Result node|
|Conditions||Condition node, Decision node|
|Text||Phrase node, Group node|
|Organize||Comment, Subgraph, Error, Lookup Table|
Data nodes are for retrieving data from uploaded documents. They serve as the starting point of the node connections and therefore have no input ports only two output ports (data and trigger) Configuration:
- path to the corresponding data field
- (expected) data type
Analysis Result Node
With the Analysis Result node, you can make statements about the entire data source, not just about one document. Like data nodes, Analysis Result nodes are the initial part of the node linking and therefore have only one input port The values that are received, processed and then passed on here come from the analyses performed in the Analyze Section. The Analysis Result nodes have only one output port.
- Name of the analysis to which the node refers
- associated field path
Mapping nodes are used to retrieve and modify data coming either from the data source or from other nodes. With Mapping nodes you can edit strings, e.g. to correct spelling errors, clean up data values or create new string combinations, manipulate lists (sorting, filter etc.) and perform calculations. If you want to convert a string in the data to another string, then you use lookup nodes.
The input ports are used to put the needed data into this node and their number depends on the input parameter (functions and data values) that you want to involve. You can add ports via add parameter in the configuration form and then link as many nodes with them as you like.
The truth port accepts truth values from other nodes. It determines if the output can be used (green light) or not (red light), depending on the defined logic.
The mapping expression is the part of the node that tells how the data has to be modified. You can use the mapping expression language to create any kind of data extraction. Mapping nodes return these types of results:
- strings (sequence of letters (+ numbers): Galaxy S7
- numeric values 2, 34,444
- lists ["green", "red", "yellow"]
- instruction language
- modifies inputs and provides them at the output (“to map”)
- scope is limited to a node
- supports nesting
The ports of the Mapping nodes can be linked to the following node types:
|input port (grey)||Data, Mapping, Condition, Decision, Group, Lookup|
|input port (trigger yellow )||Data (yellow port), Condition, Decision|
|output port (grey)||Mapping (grey ports), Phrase (grey ports), Condition, Decision, Group (grey ports), Lookup, Variable|
Condition nodes define under which condition a container will be used. You can use our expression language to create any kind of comparison. Condition nodes are used to define conditions under which certain specified elements appear or do not appear in the rule set. A Condition node always returns a truth value, either untrue (red point in the preview) or true (green point in the preview). You can find the expressions you can use to specify your conditions in the Expression Reference. Condition nodes can hold multiple input ports and one trigger port (output). Input ports are added by adding parameters in the configuration form.
The ports of the Condition nodes can be linked to the following node types:
|input ports||Data, Mapping, Condition, Decision, Group|
|output ports||Mapping (input and truth port), Condition, Group (yellow port), Phrase (yellow port), Variable|
Decision nodes are a special form of Condition nodes. They are used to check the input for different values and assign a node to each value, which is switched on when a particular term is present.
The compared terms must be identical. If you check for smartphone and the data field says e.g. smartphones, there is no match.
The ports of the Decision nodes can be linked to the following node types:
|input port||Data, Mapping|
|output port||Mapping (yellow and grey port), Condition, Group (yellow port), Phrase (yellow port), Variable|
Phrase Nodes are used to build up complex grammatical structures and for this, they provide the higher level grammatical and semantic instances of the nouns and define the relationship to the according adjectives.
A Phrase node has four ports with defined input categories: a (yellow) trigger port and one port each for nouns, adjectives and headnouns, via which you can import content from other nodes. You can also enter fixed values in the configuration field. Additionally, containers and branches can be created within the configuration fields - similar to noun containers.
- Adjective: Adjectives must be entered in their basic form. When the Phrase node is retrieved in the statement, then the adjective is inflected according to the grammatical properties of the noun and the settings in the container. For example:
input: noun: smartphone, adjective: neu result: Das neue Smartphone
- Headnoun: Headnouns refer to the main noun within the noun phrase that define grammatical information (e.g., gender or number). See for example:
input: noun: Samsung, adjective: neu, headnoun: Handy result: neues Samsung (das neue Samsung-Handy) input: noun: Samsung, adjective: neu, headnoun: Fernseher result: neuer Samsung (der neue Samsung-Fernseher)
Assigning headnouns facilitates the correct use of corresponding adjectives and determiners for ambiguous nouns such as "Samsung" or "Gucci".
Linguistically, a "head" defines the syntactic category of a phrase. The "head" can be the head noun within the noun phrase, or a head adjective within an adjective compound.
The ports of the Phrase nodes can be linked to the following node types:
|input port (grey)||Data, Mapping, Phrase, Group|
|input port (yellow trigger)||Data, Condition, Decision|
|output port||Group, Phrase, Variable|
With Group nodes you process, construct and output lists. If the output of a data field is a list, it must be called in a Group node. However, it is also possible to have different Phrase nodes (or Mapping nodes) flow into a Group node, which then together form a group. This can be useful, for example, to implement bullet point lists that are composed of different data fields.
Group nodes can have more than one input port, and it is possible to process existing lists in one port as well as to assign a port to each list entry. For Group nodes, input ports are automatically added as soon as the ports are occupied. The yellow trigger port is used to switch the Group node on or off according to certain defined conditions. If this Condition is not true, the value of the Group node will not be passed on.
You can specify which list elements (all, only a certain number, etc.) of the group should be output later in the Write area in the container you use this Group node in. The list elements can be output as continuous text with a conjunction as well as a bullet point list or numbered list.
The ports of the Group nodes can be linked to the following node types:
|input port (grey)||Data, Mapping, Phrase|
|input port (yellow trigger)||Data (yellow port,) Condition, Decision|
|output port||Mapping (grey port), Condition, Group (grey port), Phrase (grey port), Variable|
If multiple nodes are linked to the yellow trigger port, the Group node becomes true as soon as one of the conditions is true.
Variable nodes have the function of forwarding results to the Write Area and thus constitute the endpoints of node chains. They are the only node types that can be used directly in the text – either to deliver the (data) output within a statement or in the function as a trigger for a branch or a statement. Variable Nodes have only one input port and no output port. The color of the Variable nodes indicates from which node type the content is derived
- green: list
- light green: Phrase
- yellow: bool
- red: all others (numbers, string, etc.)
Management Nodes in Transform
Subgraphs are embedded worksheets you can place nodes to keep group nodes and keep the configurations clean. You can create large structures of data handling inside a subgraph and use its results outside without cluttering the main graph. Within the Subgraphs, there are two types of nodes (input and output) to which you can add ports in the configuration form. Subgraphs can also be moved, copied and pasted as often as you like and where you like (also to other projects!)
Error nodes have the function to avoid text generation when obligatory information is missing.
Lookup Table Nodes
With Lookup Table nodes you convert strings in data, e.g. words or phrases into other strings (words or phrases. They are used for translating data into additional languages and performing bulk mappings. Unlike mapping nodes, no logical operations can be performed in lookup tables, here only a sequence of characters is transferred to another sequence of characters.
They have the same inputs as Phrase nodes and can only be retrieved via a Mapping node.
Applications of Lookup Tables
Translating data field values in multilingual projects, if the data is only provided in one language.
- schwarz → negro (es-CL)
- schwarz → black (en-US)
Converting data field values to the desired text output, e.g. for aligning values or fixing errors:
- smart → smartphone
- textile → textile fabric
Enriching data, e.g. by assigning phrases to data field values that are output in the sentence:
- black → classic
- casual → comfortable and tasteful
If you want to transfer specific data values use Lookup Tables for cases where logical decisions are necessary, you use Mapping nodes.
Settings in Lookup Tables
Key Insert the value of the data field you want to transfer Language Specifies for which language(s) the new edition should apply. Edit Heads
Output Results of the Lookup Tables
The Lookup tables are read out via Mapping nodes (with the function: get(table, key[, fallback])and then passed on via Group nodes to Variable nodes, which then can be used in the Write section.