makcedward / nlpaug

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

does `ContextualWordEmbsAug` support XLM-Roberta models #334

Open cmgchess opened 1 year ago

cmgchess commented 1 year ago

Hello 👋 I tried using ContextualWordEmbsAug using the xlm-roberta-base model but it seems to be not supported. I needed it to do augmentation on a language that is not available in the bert-base-multilingual-uncased model

aug = naw.ContextualWordEmbsAug(model_path='xlm-roberta-base', aug_p=0.1)

is this the case? If so is there a workaround to get it to work?

Thanks

Ubadub commented 1 year ago

@cmgchess That line should work. What is the problem you are seeing?