tigerchen52 / LOVE

ACL22 paper: Imputing Out-of-Vocabulary Embeddings with LOVE Makes Language Models Robust with Little Cost
MIT License
39 stars 7 forks source link

How can create Hard Negative Samples? #5

Closed MingyuKim-2933 closed 1 year ago

MingyuKim-2933 commented 1 year ago

Hi,

I was wondering LOVE makes a hard negative sample that top-100 similar words are extracted from each target word, So do you make hard negative samples for every target words in vector file?

And How can create the similar words by edit distance for each target words? or could you please provide the hard negative sample file used in LOVE framework?

Thank you!

tigerchen52 commented 1 year ago

Hi,

Thanks for asking! I added another file to address your issue get_hard_negative_example.py. You can use it for reference. Let me know if you have additional questions.

Best,

Lihu

MingyuKim-2933 commented 1 year ago

Thank you for your quick and kind response!