Conditions control the applicability of a rule or a rule package.
A condition may be ALL which is satisfied by any word. A condition may be simple, or compund of several conditions, combined with the logical operadors AND and OR. The operators in a condition must be homogeneous (i.e. either all of them AND or all of them OR), mixed conditions are not allowed (note that an OR condition is equivalent to writing two rules that only differ on the condition).
Single conditions consist of a word property, an operation, and an argument. Available word properties are:
Note that all word properties (including na) are either strings or lists of strings.
The available primitive operations to build single conditions are the following:
Operators can be negated with the character !. E.g. !is, !matches, etc.
For file operators expecting lists, the property may be a single string (list of one element).
Some sample valid conditions:
t is NC
true if the short version of the tag equals NC.
T matches ^NC.S..
true if the long version of the tag matches the given regular expression.
pl in\_set my/data/files/goodlemmas.dat
true if any possible lemma for the word is found in the given file.
l !in\_set my/data/files/badlemmas.dat
true if selected lemma for the word is not found in the given file.
w matches ...$
Always true. Will set the match variable $0 to the last three characters of the word, so it can be used in the feature name pattern.
Lluís Padró 2013-09-09