textattack.metrics package

metrics package: to calculate advanced metrics for evaluting attacks and augmented text

Metric Class

class textattack.metrics.metric.Metric(**kwargs)[source]

Bases: abc.ABC

A metric for evaluating Adversarial Attack candidates.

abstract calculate(results)[source]

Abstract function for computing any values which are to be calculated as a whole during initialization :param results: Attack results for each instance in dataset :type results: AttackResult objects