You can control the generation of particular rule sets by setting attributes for concepts in the Gram (or sample) hierarchy. These attributes control aspects of rule generation and specify actions to associate with generated rules.
Properties are set using the Gram Concept Properties dialog (below). The dialog box is accessed from the Gram Tab by selecting Properties from the context menu. The various attributes in the Gram Concept Properties are outlined below.
Item |
Description |
Name |
Name of the current concept. |
Sample File |
Associated file of samples to import/export, if any. |
Attributes |
Controls for rule generation (see tables below.) |
Done |
Closes the Gram Concept Properties dialog. |
Help |
Launches Help documentation. |
The user can choose to preserve or discard sets of rules that are automatically generated from samples. Some sets are useful primarily for debugging the rule generation process. They might also be useful in very highly specialized contexts within a text.
The Constrain rule set is by far the most generally useful set of rules.
ATTRIBUTE |
VALUES |
DESCRIPTION |
true/false/<NONE> |
Keep rules that collect
each token of a sample into a list of all its suggested concepts. E.g., | |
true/false/<NONE> |
Keep rules that collect the most literal possible form of each token. NOTE: If parts of a sample are already reduced by prior rules, then the rule will not look as literal as expected. | |
true/false/<NONE> |
Keep rules that merge samples with same length
and general composition, constrained as far as possible. E.g., given samples
"1261 Starlit Dr." and "3 Elm St.", build a rule like | |
true/false/<NONE> |
Keep unconstrained rules that merge samples
as in GEN, with consistent labeling (i.e., layering). E.g. | |
true/false/<NONE> |
Keep rules that merge samples with same length
and general composition. E.g., |
Each literal rule is labeled as completely as possible, depending on other samples that the rule merged with.
ATTRIBUTE |
VALUES |
DESCRIPTION |
true/false/<NONE> |
(Operates on LABEL concepts. If set for a nonlabel concept, applies to every element of every rule in the subhierarchy). Merge the literal values due to each sample, rather than building generalized elements such as _xALPHA and _xNUM. | |
string |
Create a layer key-value pair in the suggested concept for rules in the Gram subhierarchy. E.g, layer=_Caps will create rules like _city [layer=(_Caps)] <- New [s] York [s] @@ | |
true/false/<NONE> |
Create semantic variables
in the suggested concept of rules, using label concepts to name the variables.
E.g., if the Gram hierarchy has a rule concept humanName and under it
the label concepts firstName
and lastName, then the rules built for humanName will create variables
called firstName and lastName with the appropriate text as their value.
Generates NLP++ POST Actions such as | |
true/false/<NONE> |
If true, keeps the rule generator from traversing the locked subtree. If there are new samples, the rule generator will override the lock on the concepts owning the samples. | |
true/false/<NONE> |
[INTERNALS] True if the subtree will have rules for it regenerated with a Generate Dirty menu item. To set this manually in VisualText, use the Mark For Generation menu item. | |
true/false/<NONE> |
Expand any whitespace present in a rule to an element like _xWHITE [s star]. (That is, zero or more white spaces.) |
Inherited attributes - By setting attributes at a concept, the entire subtree under that concept inherits those attribute values. In this way, the user can quickly control the way rules will be generated for an entire sub-hierarchy. This method also enables the user to override the settings wherever desired.
Default attribute values - The CONSTRAIN attribute and the XWHITE attribute are true except where overridden in the Gram Hierarchy. Similarly, all other attributes are empty or FALSE, as appropriate.