lushleaf / Structure-free-certified-NLP

SAFER: A Structure-free Approach For cErtified Robustness to Adversarial Word Substitutions (ACL 2020)
27 stars 7 forks source link

A little error in the data_process.py ? #4

Open SpursGoZmy opened 3 years ago

SpursGoZmy commented 3 years ago

At the line 13 in the "data_process.py" file, I think there is a little error in the "get_wordembd()" function here. The original code is:

  embd_file = os.path.join(embd_file, 'counter-fitted-vectors.txt')

But I don't think we should use the undefined variable "embd_file" in the "os.path.join(). On the other hand, the parameter "embd_path" is not used in this function at all. So I think the correct code should be:

  embd_file = os.path.join(embd_path, 'counter-fitted-vectors.txt')