A ruleset is a set of rules that define how text is generated for each individual document in a project.

Each translation package has its own copy of the project ruleset, which allows you to work on your translation in the Translate App isolated from production text generation. You can make any changes you want without breaking the actual project.

A ruleset contains different kinds of rules, which can be roughly divided into two categories: Logic rules and text rules.

Logic rules transform the original data to clean it up, derive values or create yes/no conclusions. Logic rules are language independent and don't need to be translated so we don't show you their definition in the translate app. Instead we just give you the result of these logic rules in the form of Variables.

Text rules define how a certain chunk of text is created. They are made up out of plain text, branches and containers. Text rules are always written in a specific language and need to be translated if text needs to be generated for a different language. They're used in phrase nodes and lookup tables, the result of which can be used somewhere in other logic rules or exposed as variables, which are used in more text rules inside statements that are ultimately forming stories.

How a Text is Generated

  1. The set of logic rules are used to compute the values of all variables.
  2. A single story is chosen by using a trigger.
  3. The final text is then created by using the statements of the chosen story and their text rules.

Ruleset Concepts

You can learn more about each individual ruleset concept in their articles:

  • Your selected Test object provides data for a live preview of rule output.
  • Triggers enable or disable a story, statement or branch based on the output of a single truth variable.
  • Statements are the building blocks of stories and contain text rules. -The lexicon provides additional grammatical information for specific words to the engine. You can add entries to the lexicon to help the engine generate grammatically correct text for words it doesn't know.

Logic Rules

Most logic rule concepts, like the ones extracting, transforming and comparing data, are not relevant for translating and won't be explained here.
There are however a few logic rule concepts that are relevant for translating because they connect or contain text rules:

  • Variables expose the results of logic rules and can be used in containers.
  • Phrase Nodes represent a single noun or phrase and contain text rules.
  • Lookup Nodes are tables that contain sets of keys and phrases with text rules that are used to choose a single phrase based on data.

Text Rules

Statements, Phrase Nodes and Lookup Nodes contain sets of text rules defining how their text output is generated.
These sets of text rules can be as simple as one static word or a complex sequence of:

  • Plain text, which is generated as-is.
  • Containers, which output grammatically correct text based on data from variables.
  • Branchings and Branches, which define different paths a text can take based on triggers or just randomness. Branches itself again contain any type of text rule, allowing for complex structures generating adaptive and variable text.