MCPcopy
hub / github.com/QData/TextAttack / perturbed_text

Method perturbed_text

textattack/attack_results/attack_result.py:56–63  ·  view source on GitHub ↗

Returns the text portion of `self.perturbed_result`. Helper method.

(self, color_method=None)

Source from the content-addressed store, hash-verified

54 )
55
56 def perturbed_text(self, color_method=None):
57 """Returns the text portion of `self.perturbed_result`.
58
59 Helper method.
60 """
61 return self.perturbed_result.attacked_text.printable_text(
62 key_color=("bold", "underline"), key_color_method=color_method
63 )
64
65 def str_lines(self, color_method=None):
66 """A list of the lines to be printed for this result's string

Callers

nothing calls this directly

Calls 1

printable_textMethod · 0.80

Tested by

no test coverage detected