pattern-name : = option1 | option2 | ... ;where where pattern-name is a sequence of letters beginning with a lower-case letter, and each optioni is a sequence of repeated-pattern-elements separated by spaces. A repeated pattern element has one of the forms
pattern-elementto indicate exactly one, zero or one, zero or more, one or more instances of pattern-element. Pattern-element in turn may be
a string: "quack"A string pattern element matches an annotation of type token spanning the specified string. An annotation pattern element matches an annotation which has the specified type and features (and may have additional features). For example, the pattern element
an annotation: [type feature=value feature=value ...]
the name of another pattern
an alternation: ( option1 | option2 | ... )
as assignment pattern element: variable = value
[constit cat=tv]matches a constit annotation whose feature cat has the value 'tv'. A test of a feature against the concept hierarchy (rather than a single value) has the form
feature ?isa(concept)This feature test succeeds if the value of feature is a word associated with concept, or associated with some concept' which is a descendant of
Variable = valuebinds Variable to value. At present, the only values allowed are integers. A parenthesized pattern may be followed by a colon (:) and variable name
(pattern ) : VariableThis binds the variable to the span of the document matched by the pattern.
An annotation pattern element can specify a variable as the value of one of the features: feature=Variable. If the variable is unbound when this pattern element is matched against an annotation in the text, the variable will be bound to the value of this feature. On the other hand, if the variable is already bound, the pattern element will match only if the value of the feature is equal to the value of the variable. For example, the pattern element
[constit cat=vp number=Number](assuming this is the first appearance of Number), will bind Number to the value of the number feature. The sequence
[constit cat=np number=Number] [constit cat=vp number=Number]can be used to insure that the value of the number feature on the np and vp is the same.
when pattern-name, action1, action2, ... ;At present, three actions are implemented: the add action, which adds an annotation, and print action, and the write action.
add [annotation-type feature=value feature=value ...]or
add [annotation-type feature=value feature=value ...] over variableIn the first form, the span of the new annotation is the text matched by the pattern. In the second form, the variable must have been bound to a span as part of the pattern matching; this is used as the span of the new annotation.
print stringExpressionwhere stringExpression can be a string (enclosed in double quotes), a variable, or a sequence of two or more strings and variables separated by plus signs (+). A variable in a stringExpression should have been bound to a span or an annotation as part of the pattern matching process; the print action prints the text subsumed by that span or annotation. If the stringExpression contains two or more items, they are concatenated and the result printed together on a single line. The output is sent to the Jet console.
write stringExpressionIt has the same semantics as the print action, except that the output is written to standard output.
pattern set name;indicates that all following when statements (until the next pattern set statment) belong to pattern set name. The basic 'top level' operation in Jet is the application of a pattern set to a sentence.
The process begins by matching all patterns in the pattern set (i.e., all patterns referenced by when statements in the pattern set) starting at the first token of the sentence. If several patterns match, we select the pattern which matches the longest portion of the text. If several patterns match the same (longest) portion, we select the pattern whose when statement appeared first in the pattern file. The actions associated with the selected pattern are then executed in sequence (if no pattern matches, no actions are performed).
The starting point for pattern matching is then advanced and the process
is repeated. If any of the actions created new annotations, the starting
point is set to the maximum of thes end of the annotations. If no
new annotation was created, the starting point is advanced by one token.
The matching continues until the starting point reaches the end of the