from torchmetrics.text import MatchErrorRate metric = MatchErrorRate() 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()