()
| 7 | |
| 8 | |
| 9 | def test_embedding_augmenter(): |
| 10 | from textattack.augmentation import EmbeddingAugmenter |
| 11 | |
| 12 | augmenter = EmbeddingAugmenter( |
| 13 | pct_words_to_swap=0.01, transformations_per_example=64 |
| 14 | ) |
| 15 | s = "There is nothing either good or bad, but thinking makes it so." |
| 16 | augmented_text_list = augmenter.augment(s) |
| 17 | augmented_s = ( |
| 18 | "There is nothing either good or unfavourable, but thinking makes it so." |
| 19 | ) |
| 20 | assert augmented_s in augmented_text_list |
| 21 | |
| 22 | |
| 23 | def test_checklist_augmenter(): |
nothing calls this directly
no test coverage detected