! Script to represent tagging of misspelling ! +MIS is the tag telling we have a misspelling ! ^ is the mark linking to +MIS, and X the context. ! Rule 1 gives an X mark for the misspellings of ä, ö ! Rule 2 is a filter (note the => operator) allowing ^ only after X ! Rule 3 deletes the auxiliary symbols. ! This is like aalio.foma, but gives two tags. define Lex {ääliö} ("+AMIS":"^A") ("+OMIS":"^O") ; define Rule1 ä (->) a X || _ ?* "^A" ,, ö (->) o Y || _ ?* "^O" ; define Rule2 "^A" => X ?* _ ; define Rule3 "^O" => Y ?* _ ; define Rule4 X -> 0 .o. Y -> 0 .o. "^A" -> 0 .o. "^O" -> 0; regex Lex .o. Rule1 .o. Rule2 .o. Rule3 .o. Rule4;