textattack.goal_function_results.custom package
Custom Goal Function Result package:
Custom goal function results
Submodules
LogitSumGoalFunctionResult Class
logit sum goal function Result
- class textattack.goal_function_results.custom.logit_sum_goal_function_result.LogitSumGoalFunctionResult(attacked_text, raw_output, output, goal_status, score, num_queries, ground_truth_output)[source]
Bases:
GoalFunctionResultRepresents the result of a text-to-text goal function.
- get_colored_output(color_method=None)[source]
Returns a string representation of this result’s output, colored according to color_method.
NamedEntityRecognitionoalFunctionResult Class
logit sum goal function Result
- class textattack.goal_function_results.custom.named_entity_recognition_goal_function_result.NamedEntityRecognitionGoalFunctionResult(attacked_text, raw_output, output, goal_status, score, num_queries, ground_truth_output)[source]
Bases:
GoalFunctionResultRepresents the result of a text-to-text goal function.
- get_colored_output(color_method=None)[source]
Returns a string representation of this result’s output, colored according to color_method.
TargetedBonusGoalFunctionResult Class
targeted bonus goal function Result
- class textattack.goal_function_results.custom.targeted_bonus_goal_function_result.TargetedBonusGoalFunctionResult(attacked_text, raw_output, output, goal_status, score, num_queries, ground_truth_output)[source]
Bases:
GoalFunctionResultRepresents the result of a text-to-text goal function.
- get_colored_output(color_method=None)[source]
Returns a string representation of this result’s output, colored according to color_method.
TargetedStrictGoalFunctionResult Class
targeted strict goal function Result
- class textattack.goal_function_results.custom.targeted_strict_goal_function_result.TargetedStrictGoalFunctionResult(attacked_text, raw_output, output, goal_status, score, num_queries, ground_truth_output)[source]
Bases:
GoalFunctionResultRepresents the result of a text-to-text goal function.
- get_colored_output(color_method=None)[source]
Returns a string representation of this result’s output, colored according to color_method.