A Grammar Region is where you write NLP++ rules and actions.
The Grammar Region consists of one or more @RULES markers with associated rules and optionally with associated action regions. These action regions are the PRE Region, the CHECK Region, and the POST Region. (See below.)
A RECURSE Region and the main Grammar Zone are the locations in which a Grammar Region may appear.
The following "subregions" may appear within a Grammar Region, anchored by the RULES Region:
REGION |
DESCRIPTION |
Actions that represent additional conditions on the matching of individual rule elements. NOTE: Does not allow general NLP++ code. | |
When a rule has matched, NLP++ code in this region checks for self-consistency and/or builds semantic data. A rule match may still be rejected from this region. | |
NLP++ code that operates once a rule match has been accepted. | |
Contains the actual NLP++ rules. |
The end markers @@PRE, @@CHECK, @@POST, and @@RULES are optional.