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

textfooler recipe working

This commit is contained in:
uvafan
2020-05-17 18:23:07 -04:00
parent 5c0584acd7
commit b94684971e
22 changed files with 140 additions and 89 deletions

View File

@@ -27,7 +27,7 @@ class GeneticAlgorithm(SearchMethod):
self.give_up_if_no_improvement = give_up_if_no_improvement
def check_transformation_compatibility(self, transformation):
return transformation.instance_of(WordSwap)
return transformation.consists_of(WordSwap)
def _replace_at_index(self, pop_member, idx):
"""