nlpaug
nlpaug copied to clipboard
Is it possible to use character aug with all the action (substitute, inset, delete, swap at the same time?)
Technically, it is doable. However, why do you want to generate this kind of synthetic data? Generating meaningful synthetic data helps to improve model performance.
You may use Flow and add all of the actions. Here is the sample code:
import nlpaug.augmenter.char as nac
aug = naf.Sequential([
nac.RandomCharAug(action="insert"),
nac.RandomCharAug(action="delete"),
# ...
])
text = 'The quick brown fox jumps over the lazy dog'
aug.augment(text)