You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
def get_indices_to_order(self, current_text, **kwargs):
"""Applies
pre_transformation_constraints
totext
to get allthe indices that can be used to search and 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
The text was updated successfully, but these errors were encountered: