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

formatting update

This commit is contained in:
Jin Yong Yoo
2020-07-13 15:10:46 -04:00
parent 3f0fdbe227
commit a0c6b78ad9

View File

@@ -72,7 +72,9 @@ class WordSwapHowNet(WordSwap):
transformed_texts_idx = []
for r in replacement_words:
if r != word_to_replace:
transformed_texts_idx.append(current_text.replace_word_at_index(i, r))
transformed_texts_idx.append(
current_text.replace_word_at_index(i, r)
)
transformed_texts.extend(transformed_texts_idx)
return transformed_texts