1. A method comprising: receiving an input sequence comprising a plurality of tokens; applying a plurality of generators to the input sequence to generate a set of candidate replacements of the tokens of the sequence; determining a plurality of subsets of the set of candidate replacements such that the candidate replacements of each subset are syntactically consistent; determining a score for each of the subsets; selecting a subset of the plurality of subsets having the highest score; applying each candidate replacement of the selected subset to the input sequence to generate an output sequence; and outputting the output sequence.