()
| 21 | |
| 22 | |
| 23 | def test_checklist_augmenter(): |
| 24 | from textattack.augmentation import CheckListAugmenter |
| 25 | |
| 26 | augmenter = CheckListAugmenter( |
| 27 | pct_words_to_swap=0.01, transformations_per_example=64 |
| 28 | ) |
| 29 | s = "I'll be happy to assist you." |
| 30 | augmented_text_list = augmenter.augment(s) |
| 31 | augmented_s = "I will be happy to assist you." |
| 32 | assert augmented_s in augmented_text_list |
| 33 | |
| 34 | s = "I will be happy to assist you." |
| 35 | augmented_text_list = augmenter.augment(s) |
| 36 | augmented_s = "I'll be happy to assist you." |
| 37 | assert augmented_s in augmented_text_list |
| 38 | |
| 39 | |
| 40 | def test_charwap_augmenter(): |
nothing calls this directly
no test coverage detected