# Useful optimization to help hfst compile large string # replacement tables, specified as ambiguous transducers # (In foma, this is just `[ tbl @-> ]`) # depends on brackets.foma define STR'REPLACE(tbl) NO'BRACKETS .o. [ [tbl].u @-> "[[" ... "]]" ] .o. [ \BRACKETS | [ [ "[[":0 \BRACKETS* "]]":0 ] .o. tbl ] ]*;