mirror of
https://github.com/QData/TextAttack.git
synced 2021-10-13 00:05:06 +03:00
merge and format
This commit is contained in:
@@ -38,7 +38,7 @@ class Attack:
|
||||
constraints=[],
|
||||
transformation=None,
|
||||
search_method=None,
|
||||
constraint_cache_size=2 ** 18,
|
||||
constraint_cache_size=2 ** 20,
|
||||
):
|
||||
"""Initialize an attack object.
|
||||
|
||||
@@ -150,7 +150,8 @@ class Attack:
|
||||
self, transformed_texts, current_text, original_text=None
|
||||
):
|
||||
"""Filters a list of potential transformed texts based on
|
||||
``self.constraints`` Checks cache first.
|
||||
``self.constraints`` Utilizes an LRU cache to attempt to avoid
|
||||
recomputing common transformations.
|
||||
|
||||
Args:
|
||||
transformed_texts: A list of candidate transformed ``AttackedText`` to filter.
|
||||
|
||||
Reference in New Issue
Block a user