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

I want to find where I can jump to this #806

Open
zl-comment opened this issue Nov 21, 2024 · 0 comments
Open

I want to find where I can jump to this #806

zl-comment opened this issue Nov 21, 2024 · 0 comments

Comments

@zl-comment
Copy link

def get_indices_to_order(self, current_text, **kwargs):
"""Applies pre_transformation_constraints to text to get all
the indices that can be used to search and order.

    Args:
        current_text: The current ``AttackedText`` for which we need to find indices are eligible to be ordered.
    Returns:
        The length and the filtered list of indices which search methods can use to search/order.
    """

    indices_to_order = self.transformation(
        current_text,
        pre_transformation_constraints=self.pre_transformation_constraints,
        return_indices=True,
        **kwargs,
    )

    len_text = len(indices_to_order)

    # Convert indices_to_order to list for easier shuffling later
    return len_text, list(indices_to_order)

I want to know where this self.transformation will jump to this method, I use bertattack
I looked for it in the transformation parent class, but it doesn’t seem to match

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