'Apply this rule at every position in positions where it
applies to the given sentence.  I.e., for each position p
in *positions*, if *tokens[p]* is tagged with this rule\'s
original tag, and satisfies this rule\'s condition, then set
its tag to be this rule\'s replacement tag.
:param tokens: The tagged sentence
:type tokens: list(tuple(str, str))
:type positions: list(int)
:param positions: The positions where the transformation is to
be tried.  If not specified, try it at all positions.
:return: The indices of tokens whose tags were changed by this
rule.
:rtype: int'

def apply(self, tokens, positions=None):

    if (positions is None):
        positions = list(range(len(tokens)))
    change = [i for i in positions if self.applies(tokens, i)]
    for i in change:
        tokens[i] = (tokens[i][0], self.replacement_tag)
    return change
