nltk.IBMModel

class nltk.IBMModel(sentence_aligned_corpus)[source]

Abstract base class for all IBM models

Methods

__init__(sentence_aligned_corpus)
best_model2_alignment(sentence_pair[, ...]) Finds the best alignment according to IBM Model 2
hillclimb(alignment_info[, j_pegged]) Starting from the alignment in alignment_info, look at
init_vocab(sentence_aligned_corpus)
maximize_fertility_probabilities(counts)
maximize_lexical_translation_probabilities(counts)
maximize_null_generation_probabilities(counts)
neighboring(alignment_info[, j_pegged]) Determine the neighbors of alignment_info, obtained by
prob_of_alignments(alignments)
prob_t_a_given_s(alignment_info) Probability of target sentence and an alignment given the
reset_probabilities()
sample(sentence_pair) Sample the most probable alignments from the entire alignment
set_uniform_probabilities(...) Initialize probability tables to a uniform distribution

Attributes

MIN_PROB