Download USER MANUAL
Transcript
3.5 Denition of basic strategies 37 to dene quite elaborated strategies and are described latter | Release Note: PStrategies are not described in this version. ELAN allows to dene basic strategies in two steps. The rst level consists of dening regular expressions built on the alphabet of rule labels. But a rule can be applied using a user-dened strategy only at the root of a term. Thus this is combined with a second level that consists of using strategies in the where construction of rule denitions. We will see through examples that the expressive power of strategies in ELAN is far more than just regular expressions and that, because of the second level, rules can indeed be applied everywhere in a term. 3.5.1 Basic strategies syntax The general syntax of basic strategies is the following: <family of strategies> ::= <strategy object> [ <strategy> ::= | | | | | | ] ::= | | | | <identier> dont care choose ( <strategy rule> f jj <strategy rule> g ) dont know choose ( <strategy rule> f jj <strategy rule> g ) dc ( <strategy rule> f jj <strategy rule> g ) dk ( <strategy rule> f jj <strategy rule> g ) rst ( <strategy rule> f jj <strategy rule> g ) ::= | <concatenation> ::= <strategy> <rule label> <strategy> ; <strategy> iterate ( <strategy> ) | repeat* ( <strategy> ) | repeat+ ( <strategy> ) <normalize> ::= normalize ( <strategy> | normalise ( <strategy> <iterator> May 9, 1997 <strategy> end fail id ::= <strategy rule> <strategy label> <strategy label> <choosing> <concatenation> <iterator> <normalize> <strategy label> <choosing> ::= strategies for <sort name> [ global f <strategy object> g + ] [ local f <strategy object> g + ] end ::= ) ) ELAN user manual