def action2label(action):
    """ Transform action into label
    """
    if action[0] == 'Shift':
        label = action[0]
    elif action[0] == 'Reduce':
        label = '-'.join(list(action))
    else:
        raise ValueError("Unrecognized parsing action: {}".format(action))
    return label