Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the return of AttackedText.word_diff_ratio is 1 all the time #787

Open
nohuma opened this issue Mar 25, 2024 · 0 comments
Open

the return of AttackedText.word_diff_ratio is 1 all the time #787

nohuma opened this issue Mar 25, 2024 · 0 comments

Comments

@nohuma
Copy link

nohuma commented Mar 25, 2024

Describe the bug
the return of Attacked_text.word_diff_ratio is 1 all the time

To Reproduce
Steps to reproduce the behavior:

  1. Run following command textattack ...
  2. Run following code ...
  3. top_member.attacked_text.words_diff_ratio(initial_result.attacked_text)
  4. See error

reason
the type of AttackedText.words is list, when it is use as as input parameter of np.sum() it returns 1or 0 all the time, because it is always consider the first index of the input list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant