1
0
mirror of https://github.com/QData/TextAttack.git synced 2021-10-13 00:05:06 +03:00

move documents from semi-automated rst files to correct code positions

This commit is contained in:
Yanjun Qi
2020-10-25 11:53:41 -04:00
parent e91a652715
commit fc7d5294d9
10 changed files with 62 additions and 17 deletions

View File

@@ -1,3 +1,13 @@
"""TextAttack builds attacks from four components:
- `Goal Functions <../attacks/goal_function.html>`__ stipulate the goal of the attack, like to change the prediction score of a classification model, or to change all of the words in a translation output.
- `Constraints <../attacks/constraint.html>`__ determine if a potential perturbation is valid with respect to the original input.
- `Transformations <../attacks/transformation.html>`__ take a text input and transform it by inserting and deleting characters, words, and/or phrases.
- `Search Methods <../attacks/search_method.html>`__ explore the space of possible **transformations** within the defined **constraints** and attempt to find a successful perturbation which satisfies the **goal function**.
The ``Attack`` class represents an adversarial attack composed of a goal function, search method, transformation, and constraints.
"""
from collections import deque
import lru