Open ludybupt opened 1 year ago
Yes, definitely. You can implement a PreTransformationConstraint that filters out transformations to the words that you don't want to alter. Here's an example, which we used to prevent modifying the premise (or hypothesis) in SNLI: https://github.com/QData/TextAttack/blob/master/textattack/constraints/pre_transformation/input_column_modification.py#L11
I would like to employ TextAttack for further research. does TextAttack support setting attack range of input text?