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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user