QData / TextAttack

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/
https://textattack.readthedocs.io/en/master/
MIT License
2.92k stars 389 forks source link

Word Swap Qwerty Failure Bug Fix #761

Closed jstzwj closed 7 months ago

jstzwj commented 10 months ago

Summary

This PR fixes an IndexError in WordSwapQWERTY when random_one is True and the word contains non-qwerty characters.

This PR is related to #717

Changes

Checklist

jxmorris12 commented 7 months ago

thanks :) this is better!