let universal_prefix = '^(?ne|te)?(?be)?'; let root_verb_form = '(?\w*)ti'; let verb_prefixes = [ "ap", "apy", "at" "ati", "iš", "į", "nu", "pa", "pri", "pra", "su", "už", ]; let verb_prefix = $re:named($re:any(verb_prefixes), "prefix") + '(?si)?'; def remove_universal_prefix (universal_prefix + '(?\w+$)'): rest end def remove_verb_prefix ($re:only(verb_prefix + root_verb_form)): stem + "ti" + $replace_some(reflexive, "s") end def unreflexify (root_verb_form + 's$'): stem + "ti" end def root_verb ($re:only(verb_prefix + root_verb_form)): $try_map(remove_verb_prefix(matched), "unreflexify") end