Closed mvllwong closed 2 years ago
Hi, sorry for the late reply.
According to https://github.com/makcedward/nlpaug/blob/master/nlpaug/augmenter/word/random.py#L161, the return of transform functions is Str when input is Str, while the return is List when input is List.
Our code in https://github.com/lancopku/text-autoaugment/blob/main/taa/data.py#L91-L111 ensures the output aug_texts
is a List.
The return of each transform function in augmentation.py should be Str, instead of List, which is generated by default. e.g.: def random_word_delete(text, m): return aug.augment(text) ⬇⬇⬇⬇⬇⬇⬇⬇⬇ def random_word_delete(text, m): return aug.augment(text)[0]