In such a rule, the context specification aplies to all left-hand sides.Įxample: a -> b, b -> a || c _ d Parallel rules (,) Several left hand sides of a rule can be combined with a comma. Several possible contexts can be specified by separating the contexts with a comma.Įxample: a -> b || c _ d, e _ f Multiple left-hand sides Will produce a transducer that maps the input string a unambiguously to xxx.Īlso, will simply produce a rule that inserts one instance of the RHS whenever the context is matched: -> x The LHS of a rule may be wrapped in the epsilon modifier, in which case any epsilons on the LHS get a special interpretation, where only one empty string is assumed to exists between each symbol in the input string. Y or Z may be omitted and all contextual specifications are available. In which case both Y and Z are inserted around instances of X. Optional left-to-right longest-match left-to-right shortest-match replacement Optional replacement and inverse longest-match shortest-match replacement Unconditional replacement and inverse replacement The following replacement operators are available: Left holds on output side, right holds on output side Left holds on output side, right holds on input side Left holds on input side, right holds on output side Left and right contexts hold on input side The directionality constraint DIR can be one of: The directionality constraint || can also vary depending on the application.Īll replacement operators allow context specification through one of the directionality markers. The replacement arrow ( ->) can be of various types indicating different replacement strategies, optional replacement (->), longest-leftmost shortest-leftmost etc. Which dictates the replacement of sequences A with B when occurring between L and R. The most general format of a replacement rule is A -> B || L _ R If no flags are present, no action is taken. X ↔ Y is equivalent to & Įliminates all flag diacritics in X and calculates the equivalent FSM without flags.The implication operator and the biconditional are shorthands whose definitions are as follows: See Karttunen (1998) for details and usage. For those relations where strings in the domain of Y does not include some possible string from the range of X, the relation X is not composed with Y. The lower-side priority union is similar, except a relation in X has precedence over a relation in Y based on the range, not the domain. Y denotes the union of relations X and Y, with relations in Y discarded if a relation in X have the same input (domain). Restrictions: not well-defined for transducers. , Yn Zn)ĭenotes the language where every instance of a string from X is surrounded by string from some pair Yi and Zi on the left and right, respectively. Restrictions: $.X and $?X are not well-defined for transducers. The operator $.X denotes the language that contains exactly one substring drawn from the language X, while $?X denotes the language that contains at most one substring from X. The operator $X denotes the language that contains a substring drawn from the language X. Restrictions: none Containment operators ($X, $.X, $?X) Notational variants: X ∥ Y (PARALLEL TO, U+2225) the set of words formed by any method of ‘shuffling’ the contents of X with Y. The shuffle (or asynchronous) product of X and Y, i.e. ![]() In addition to the Kleene closures, there are a number of m-n-ary iteration operators:ĭenotes the languages where every string from X follows every string from Y. The operator is not overtly signaled by spacing, etc., and two adjacent regular expressions will be concatenated regardless of white space when found at the level of precedence of the concatenation operator by the regular expression parser. ![]() The language or relation X concatenated with Y. ![]() Regular expression operators Concatenation (X Y)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |