class_docstr: Lexical translation model that ignores word order
  
  >>> bitext = []
  >>> bitext.append(AlignedSent(['klein', 'ist', 'das', 'haus'], ['the', 'house', 'is', 'small']))
  >>> bitext.append(AlignedSent(['das', 'haus', 'ist', 'ja', 'groß'], ['the', 'house', 'is', 'big']))
  >>> bitext.append(AlignedSent(['das', 'buch', 'ist', 'ja', 'klein'], ['the', 'book', 'is', 'small']))
  >>> bitext.append(AlignedSent(['das', 'haus'], ['the', 'house']))
  >>> bitext.append(AlignedSent(['das', 'buch'], ['the', 'book']))
  >>> bitext.append(AlignedSent(['ein', 'buch'], ['a', 'book']))
  
  >>> ibm1 = IBMModel1(bitext, 5)
  
  >>> print(round(ibm1.translation_table['buch']['book'], 3))
  0.889
  >>> print(round(ibm1.translation_table['das']['book'], 3))
  0.062
  >>> print(round(ibm1.translation_table['buch'][None], 3))
  0.113
  >>> print(round(ibm1.translation_table['ja'][None], 3))
  0.073
  
  >>> test_sentence = bitext[2]
  >>> test_sentence.words
  ['das', 'buch', 'ist', 'ja', 'klein']
  >>> test_sentence.mots
  ['the', 'book', 'is', 'small']
  >>> test_sentence.alignment
  Alignment([(0, 0), (1, 1), (2, 2), (3, 2), (4, 3)])
docstr: Computes the probability of all possible word alignments,
  expressed as a marginal distribution over target words t
  
  Each entry in the return value represents the contribution to
  the total alignment probability by the target word t.
  
  To obtain probability(alignment | src_sentence, trg_sentence),
  simply sum the entries in the return value.
  
  :return: Probability of t for all s in ``src_sentence``
  :rtype: dict(str): float
docstr_tok: ["Computes","the","probability","of","all","possible","word","alignments",",","expressed","as","a","marginal","distribution","over","target","words","t","Each","entry","in","the","return","value","represents","the","contribution","to","the","total","alignment","probability","by","the","target","word","t.","To","obtain","probability","(","alignment","|","src_sentence",",","trg_sentence",")",",","simply","sum","the","entries","in","the","return","value",".",":","return",":","Probability","of","t","for","all","s","in","``","src_sentence","``",":","rtype",":","dict","(","str",")",":","float"]
code: def prob_all_alignments(self, src_sentence, trg_sentence):
      """
      Computes the probability of all possible word alignments,
      expressed as a marginal distribution over target words t
  
      Each entry in the return value represents the contribution to
      the total alignment probability by the target word t.
  
      To obtain probability(alignment | src_sentence, trg_sentence),
      simply sum the entries in the return value.
  
      :return: Probability of t for all s in ``src_sentence``
      :rtype: dict(str): float
      """
      alignment_prob_for_t = defaultdict(float)
      for t in trg_sentence:
          for s in src_sentence:
              alignment_prob_for_t[t] += self.prob_alignment_point(s, t)
      return alignment_prob_for_t
  
file_path: nltk/nltk/translate/ibm1.py
imports: import warnings
  from collections import defaultdict
  from nltk.translate import AlignedSent, Alignment, IBMModel
  from nltk.translate.ibm_model import Counts
label_desc: Use image node_id 4 for calling the IBMModel1 obj's underlying member method code with example usage: obj.prob_all_alignments(src_sentence, trg_sentence) and returns: alignment_prob_for_t