Text Augmentation with Machine Learning
Text augmentation with machine learning (ML) is an advanced technique compared to the standard text augmenting methods we covered in the previous chapter. Ironically, text augmentation aims to improve ML model accuracy, but we used a pre-trained ML model to create additional training NLP data. It’s a circular process. ML coding is not in this book’s scope, but understanding the difference between using libraries and ML for text augmentation is beneficial.
Augmentation libraries, whether for image, text, or audio, follow the traditional programming methodologies with structure data, loops, and conditional statements in the algorithm. For example, as shown in Chapter 5, the pseudocode for implementing the _print_aug_reserved()
method could be as follows:
# define synonym words, pseudo-code reserved = [['happy', 'joyful', 'cheerful'], Â Â ['sad', 'sorrowful', 'regretful...