Skip to content

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

Description

@nohuma

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions