'Determines the best word alignment for one sentence pair from
the corpus that the model was trained on.
The best alignment will be set in ``sentence_pair`` when the
method returns. In contrast with the internal implementation of
IBM models, the word indices in the ``Alignment`` are zero-
indexed, not one-indexed.
:param sentence_pair: A sentence in the source language and its
counterpart sentence in the target language
:type sentence_pair: AlignedSent'

def __align(self, sentence_pair):

    best_alignment = []
    l = len(sentence_pair.mots)
    m = len(sentence_pair.words)
    for (j, trg_word) in enumerate(sentence_pair.words):
        best_prob = (self.translation_table[trg_word][None] * self.alignment_table[0][(j + 1)][l][m])
        best_prob = max(best_prob, IBMModel.MIN_PROB)
        best_alignment_point = None
        for (i, src_word) in enumerate(sentence_pair.mots):
            align_prob = (self.translation_table[trg_word][src_word] * self.alignment_table[(i + 1)][(j + 1)][l][m])
            if (align_prob >= best_prob):
                best_prob = align_prob
                best_alignment_point = i
        best_alignment.append((j, best_alignment_point))
    sentence_pair.alignment = Alignment(best_alignment)
