The subroutine uninsertrule takes a sentence and a ruleset as arguments. It removes the sentence from the ruleset; and, if ruleindexing is true, it uses ruleunindex to unindex the sentence as well.