def _print_predictions(self, batch, gold_label_type):
    lines = []
    for datapoint in batch:
        g = [(label.identifier + label.value) for label in datapoint.get_labels(gold_label_type)]
        p = [(label.identifier + label.value) for label in datapoint.get_labels('predicted')]
        g.sort()
        p.sort()
        correct_string = (' -> MISMATCH!\n' if (g != p) else '')
        eval_line = f'''{datapoint.to_original_text()}
 - Gold: {datapoint.get_labels(gold_label_type)}
 - Pred: {datapoint.get_labels('predicted')}
{correct_string}
'''
        lines.append(eval_line)
    return lines
def _print_predictions(self, batch, gold_label_type):
    lines = []
    for datapoint in batch:
        g = [(label.identifier + label.value) for label in datapoint.get_labels(gold_label_type)]
        p = [(label.identifier + label.value) for label in datapoint.get_labels('predicted')]
        g.sort()
        p.sort()
        correct_string = (' -> MISMATCH!\n' if (g != p) else )
        eval_line = f'{datapoint.to_original_text()}
 - Gold: {datapoint.get_labels(gold_label_type)}
 - Pred: {datapoint.get_labels('predicted')}
{correct_string}
'
        lines.append(eval_line)
    return lines