code: def __init__(self, ngram_order):
      assert ngram_order >= 2
      # Integerized counts will never contain negative numbers, so
      # inside this program, we use -3 and -2 for the BOS and EOS symbols
      # respectively.
      # Note: it's actually important that the bos-symbol is the most negative;
      # it helps ensure that we print the state with left-context <s> first
      # when we print the FST, and this means that the start-state will have
      # the correct value.
      self.bos_symbol = -3
      self.eos_symbol = -2
      # backoff_symbol is kind of a pseudo-word, it's used in keeping track of
      # the backoff counts in each state.
      self.backoff_symbol = -1
      self.total_num_words = 0  # count includes EOS but not BOS.
      self.counts = []
      for n in range(ngram_order):
          self.counts.append(defaultdict(lambda: CountsForHistory()))
  
imports: import argparse
  import math
  import sys
  from collections import defaultdict
label_desc: Use image node_id 1 to create a new NgramCounts object from inherited base classes: object with example: obj = NgramCounts(ngram_order)