code: def main(_):
      """Makes vocab."""
      filenames = tx.utils.get_files(FLAGS.files)
  
      if FLAGS.count:
          vocab, count = tx.data.make_vocab(
              filenames,
              max_vocab_size=FLAGS.max_vocab_size,
              newline_token=FLAGS.newline_token,
              return_count=True,
          )
  
          with open(FLAGS.output_path, "w", encoding="utf-8") as fout:
              for v, c in zip(vocab, count):
                  fout.write("{}\t{}\n".format(v, c))
      else:
          vocab = tx.data.make_vocab(
              filenames,
              max_vocab_size=FLAGS.max_vocab_size,
              newline_token=FLAGS.newline_token,
          )
  
          with open(FLAGS.output_path, "w", encoding="utf-8") as fout:
              fout.write("\n".join(vocab))
  
file_path: texar/bin/utils/make_vocab.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import sys
  from io import open
  import tensorflow
  import texar
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types