'Probability of target sentence and an alignment given the
source sentence'

def prob_t_a_given_s(self, alignment_info):

    prob = 1.0
    for (j, i) in enumerate(alignment_info.alignment):
        if (j == 0):
            continue
        trg_word = alignment_info.trg_sentence[j]
        src_word = alignment_info.src_sentence[i]
        prob *= self.translation_table[trg_word][src_word]
    return max(prob, IBMModel.MIN_PROB)
