makcedward / nlpaug

Data augmentation for NLP
https://makcedward.github.io/
MIT License
4.44k stars 463 forks source link

How to specify max_length on the input text in BackTranslationAug #297

Closed JohnGiorgi closed 2 years ago

JohnGiorgi commented 2 years ago

Hi! I can see that BackTranslationAug has an argument max_length to specify the maximum length of the output text, but I am wondering if there is any way to specify the max length of the input text, similar to how HF Tokenizers lets you truncate text with a tokenizer.