MCPcopy
hub / github.com/QData/TextAttack / test_back_transcription

Function test_back_transcription

tests/test_augment_api.py:139–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137
138
139def 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

Callers

nothing calls this directly

Calls 3

augmentMethod · 0.95
AugmenterClass · 0.90
BackTranscriptionClass · 0.90

Tested by

no test coverage detected