()
| 38 | |
| 39 | |
| 40 | def test_charwap_augmenter(): |
| 41 | from textattack.augmentation import CharSwapAugmenter |
| 42 | |
| 43 | augmenter = CharSwapAugmenter( |
| 44 | pct_words_to_swap=0.01, transformations_per_example=64 |
| 45 | ) |
| 46 | s = "To be or not to be" |
| 47 | augmented_text_list = augmenter.augment(s) |
| 48 | augmented_s = "T be or not to be" |
| 49 | assert augmented_s in augmented_text_list |
| 50 | |
| 51 | |
| 52 | def test_easydata_augmenter(): |
nothing calls this directly
no test coverage detected