Example
The simple rule below finds a search elementkw_Contract that contains the keyword “Contract”:
Left-hand part structure
The left-hand part consists of up to three parts:- Existence condition (optional): Finds an object that has the specified attributes. We recommend assigning a name to the object if it exists, so that you can use it again within the same rule. The condition may also specify the absence of an object.
Examples
If you need to find only one instance of theSellerName search element, specify at the beginning of the rule that no instance has yet been found:
- Token template (required): Consists of a sequence of tokens. A token is a word from a natural language or a punctuation mark. Tokens don’t usually contain spaces, apart from some rare cases where the space is inside a set construction used as a single word: such as, a lot.
Example
For example, the following token template consists of one token matching the “Grantor” keyword, one token with a colon, and a repeating token with the Person named entity (specified as repeating because a person’s name may consist of several words, each a separate token):p.
See Token template for details on the syntax used in this part.
- Additional check (optional): Checks more conditions for objects that were already mentioned in the rule.
Example
For example, suppose you’re looking for the parties of a contract, and have grouped the fields into two separate group instances, one for each party. Having found an organization name and an address, you can check whether these search elements have the same parent. If they do, this means that this address belongs to this organization.Right-hand part structure
The right-hand part consists of one or several comma-separated parts that create new instances of groups and search elements and assign values to the search elements:t into the Element1 search element:
Example
Referencing search elements
To access a search element in code, you need to use a name that will identify that element unambiguously. If an element has a unique name, you can refer to it simply by its name. If there are several elements with the same name, you need to specify a path that is long enough to identify the element.Example
Consider the following nested structure of search elements:- Property
- Type
- Address
- Buyer
- FullName
- Address
Language-specific rules
You can specify the document language for which the rule should be executed. Doing so will skip the rule for other languages. Precede the rule by a hash (#) and the two-letter language code (ISO-639-1 standard).Codes for the supported languages
| Language | Code |
|---|---|
| English | en |
| German | de |
| French | fr |
| Spanish | es |
| Italian | it |
| Portuguese (Standard) | pt |
| Japanese | ja |
| Russian | ru |
