class_docstr: Abstract base class for all IBM models
class_docstr_tok: ["Abstract","base","class","for","all","IBM","models"]
code: def init_vocab(self, sentence_aligned_corpus):
      src_vocab = set()
      trg_vocab = set()
      for aligned_sentence in sentence_aligned_corpus:
          trg_vocab.update(aligned_sentence.words)
          src_vocab.update(aligned_sentence.mots)
      # Add the NULL token
      src_vocab.add(None)
  
      self.src_vocab = src_vocab
      """
          set(str): All source language words used in training
          """
  
      self.trg_vocab = trg_vocab
      """
          set(str): All target language words used in training
          """
  
imports: from bisect import insort_left
  from collections import defaultdict
  from copy import deepcopy
  from math import ceil
label_desc: Use image node_id 4 for calling the IBMModel obj's underlying member method code with example usage: obj.init_vocab(sentence_aligned_corpus) without return types