'Note that the algorithm for reduce is only available for arc-eager
:param configuration: is the current configuration
:return : A new configuration or -1 if the pre-condition is not satisfied'

def reduce(self, conf):

    if (self._algo != TransitionParser.ARC_EAGER):
        return (-1)
    if (len(conf.stack) <= 0):
        return (-1)
    idx_wi = conf.stack[(len(conf.stack) - 1)]
    flag = False
    for (idx_parent, r, idx_child) in conf.arcs:
        if (idx_child == idx_wi):
            flag = True
    if flag:
        conf.stack.pop()
    else:
        return (-1)
