IBMModel3.__init__(sentence_aligned_corpus, iterations, probability_tables=None)[source]

Train on sentence_aligned_corpus and create a lexical translation model, a distortion model, a fertility model, and a model for generating NULL-aligned words.

Translation direction is from AlignedSent.mots to AlignedSent.words.

  • sentence_aligned_corpus (list(AlignedSent)) – Sentence-aligned parallel corpus
  • iterations (int) – Number of iterations to run training algorithm
  • probability_tables (dict[str]: object) – Optional. Use this to pass in custom probability values. If not specified, probabilities will be set to a uniform distribution, or some other sensible value. If specified, all the following entries must be present: translation_table, alignment_table, fertility_table, p1, distortion_table. See IBMModel for the type and purpose of these tables.