txtaug
txtaug is a command line tool written in Python3 for text augmentation based on Baidu translation API.
Install
1 | pip3 install txtaug |
Usage
1 | txtaug [-h] [-l LANGUAGE] [-t TIMES] [-s] [-a APPID] [-k KEY] [-T TEXT] |
Sample
Below is a sample in which we 1 times augmented the Chinese sentence “我爱你” and include the sentence itself in the output.
1 | txtaug -l zh -t 1 -s -a your_app_id -k your_key -T "我爱你" |
Output
1 | 我爱你 |