TextAttack
TextAttack copied to clipboard
TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/
Is it possible to perturb the text in a NER dataset and also update its corresponding start/end indices of entities in the annotations using TextAttack?
Hello, I've read issue #725 and the API doc, but only find one commandLine example using seq2sick. [link](https://textattack.readthedocs.io/en/master/3recipes/attack_recipes_cmd.html) I need to attack BART in en-de translation task by using seq2sick...
I see that the seq2sick recipe should work for generative models. But can't quite figure out how. Can you kindly help?
Seems like raw outputs of the model are being passed to `NonOverlappingOutput` implemented methods `_is_goal_complete` which subsequently calls `word_difference_score` with those tensors leading to` split()` being called on tensors giving...
# What does this PR do? ## Summary This PR adds support for augmenting prompts in TextAttack as well as using these augmented prompts to run LLMs. Note that the...
# What does this PR do? ## Summary *This PR adds a new augmentation method called `augment_text_with_ids_evenly` which yields a similar output to `augment_text_with_ids`, but always returns equal numbers of...
``` $ pip install textattack Defaulting to user installation because normal site-packages is not writeable Collecting textattack Using cached textattack-0.3.9-py3-none-any.whl.metadata (37 kB) Collecting bert-score>=0.3.5 (from textattack) Using cached bert_score-0.3.13-py3-none-any.whl (61...
**Describe the bug** Just did a fresh download of textattack from pip within python venv, and copied the first command from https://textattack.readthedocs.io/en/master/0_get_started/command_line_usage.html# , but I received the error  **To...
# What does this PR do? ## Summary *Example: This PR adds ## Checklist - [ ] The title of your pull request should be a summary of its contribution....
a2t bug
**Describe the bug** A clear and concise description of what the bug is.  **To Reproduce** Steps to reproduce the behavior: 1. Run following command `textattack ...` 2. Run following...