from torchmetrics.text import ExtendedEditDistance metric = ExtendedEditDistance() preds = ["this is the prediction", "there is an other sample"] target = ["this is the reference", "there is another one"] metric.update(preds, target) fig_, ax_ = metric.plot()