code: def main():
      parser = argparse.ArgumentParser(
          description="Generate lm.binary and top-k vocab for DeepSpeech."
      )
      parser.add_argument(
          "--input_txt",
          help="Path to a file.txt or file.txt.gz with sample sentences",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--output_dir",
          help="Directory path for the output",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--top_k",
          help="Use top_k most frequent words for the vocab.txt file. These will be used to filter the ARPA file.",
          type=int,
          required=True,
      )
      parser.add_argument(
          "--kenlm_bins",
          help="File path to the KENLM binaries lmplz, filter and build_binary",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--arpa_order",
          help="Order of k-grams in ARPA-file generation",
          type=int,
          required=True,
      )
      parser.add_argument(
          "--max_arpa_memory",
          help="Maximum allowed memory usage for ARPA-file generation",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--arpa_prune",
          help="ARPA pruning parameters. Separate values with '|'",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--binary_a_bits",
          help="Build binary quantization value a in bits",
          type=int,
          required=True,
      )
      parser.add_argument(
          "--binary_q_bits",
          help="Build binary quantization value q in bits",
          type=int,
          required=True,
      )
      parser.add_argument(
          "--binary_type",
          help="Build binary data structure type",
          type=str,
          required=True,
      )
      parser.add_argument(
          "--discount_fallback",
          help="To try when such message is returned by kenlm: 'Could not calculate Kneser-Ney discounts [...] rerun with --discount_fallback'",
          action="store_true",
      )
  
      args = parser.parse_args()
  
      data_lower, vocab_str = convert_and_filter_topk(args)
      build_lm(args, data_lower, vocab_str)
  
      # Delete intermediate files
      os.remove(os.path.join(args.output_dir, "lower.txt.gz"))
      os.remove(os.path.join(args.output_dir, "lm.arpa"))
      os.remove(os.path.join(args.output_dir, "lm_filtered.arpa"))
  
file_path: DeepSpeech/data/lm/generate_lm.py
imports: import argparse
  import gzip
  import io
  import os
  import subprocess
  from collections import Counter
  import progressbar
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types