LinyangLee / BERT-Attack

Code for EMNLP2020 long paper: BERT-Attack: Adversarial Attack Against BERT Using BERT
188 stars 32 forks source link

Questions about antonyms #2

Closed zedzx1uv closed 3 years ago

zedzx1uv commented 3 years ago

Hi, thx for your sharing! Some antonyms were found in the crafted adversarial samples, such as finest->worst. How can I filter antonyms as described in section 3.2.1?

LinyangLee commented 3 years ago

We use the counter-fitting vocabulary to filter them. Maybe in the future version, we could build a better pre-trained model to avoid antonyms!

zedzx1uv commented 3 years ago

Got it, thanks for your prompt reply in Sunday!