def insert(self, i, tag, affix, cmd="<STR_LIT>", tagged=None):
if affix.startswith("<STR_LIT:->") and affix.endswith("<STR_LIT:->"):<EOL><INDENT>affix, cmd = affix[+<NUM_LIT:1>:-<NUM_LIT:1>], "<STR_LIT>"<EOL><DEDENT>if affix.startswith("<STR_LIT:->"):<EOL><INDENT>affix, cmd = affix[+<NUM_LIT:1>:-<NUM_LIT:0>], "<STR_LIT>"<EOL><DEDENT>if affix.endswith("<STR_LIT:->"):<EOL><INDENT>affix, cmd = affix[+<NUM_LIT:0>:-<NUM_LIT:1>], "<STR_LIT>"<EOL><DEDENT>if tagged:<EOL><INDENT>r = [tagged, affix, "<STR_LIT:f>"+cmd.lstrip("<STR_LIT:f>"), tag, "<STR_LIT:x>"]<EOL><DEDENT>else:<EOL><INDENT>r = [affix, cmd.lstrip("<STR_LIT:f>"), tag, "<STR_LIT:x>"]<EOL><DEDENT>lazylist.insert(self, i, r)<EOL>
Inserts a new rule that assigns the given tag to words with the given affix,
            e.g., Morphology.append("RB", "-ly").