()
| 137 | |
| 138 | |
| 139 | def test_back_transcription(): |
| 140 | from textattack.augmentation import Augmenter |
| 141 | from textattack.transformations.sentence_transformations import BackTranscription |
| 142 | |
| 143 | try: |
| 144 | augmenter = Augmenter(transformation=BackTranscription()) |
| 145 | except ModuleNotFoundError: |
| 146 | print( |
| 147 | "To use BackTranscription augmenter, install `fairseq`, `g2p_en` and `librosa` libraries" |
| 148 | ) |
| 149 | else: |
| 150 | s = "What on earth are you doing?" |
| 151 | augmented_text_list = augmenter.augment(s) |
| 152 | assert augmented_text_list |
nothing calls this directly
no test coverage detected