'Removes alignments from ``alignment_infos`` that have
substantially lower Model 4 scores than the best alignment
:return: Pruned alignments
:rtype: set(AlignmentInfo)'

def prune(self, alignment_infos):

    alignments = []
    best_score = 0
    for alignment_info in alignment_infos:
        score = IBMModel4.model4_prob_t_a_given_s(alignment_info, self)
        best_score = max(score, best_score)
        alignments.append((alignment_info, score))
    threshold = (IBMModel5.MIN_SCORE_FACTOR * best_score)
    alignments = [a[0] for a in alignments if (a[1] > threshold)]
    return set(alignments)
