Open plasmashen opened 3 years ago
hi, I have tested both methods: removing the word or replacing it with "
Where is the emdding.npz file, please? Or how is it generated?
The readme file has explained how to obtain the embeddings: Run the following code to pre-compute the cosine similarity scores between word pairs based on the counter-fitting word embeddings [https://drive.google.com/file/d/1bayGomljWb6HeYDMTDKXrh0HackKtSlx/view].
python comp_cos_sim_mat.py [PATH_TO_COUNTER_FITTING_WORD_EMBEDDINGS]
In paper, the importance score of the word is calculated by removing this word, but you use '\<oov>' to replace this word to calculate the importance score in https://github.com/jind11/TextFooler/blob/master/attack_classification.py#L216
Moreover, the '\<oov>' will be tokenized into 4 tokens which may have attention affects with other words. I'm wondering why such nonsensical '\<oov>' is used?