class_docstr: Tests text data class.
      
code: def setUp(self):
      tf.test.TestCase.setUp(self)
  
      # Create test data
      vocab_list = ["word", "词"]
      vocab_file = tempfile.NamedTemporaryFile()
      vocab_file.write("\n".join(vocab_list).encode("utf-8"))
      vocab_file.flush()
      self._vocab_file = vocab_file
      self._vocab_size = len(vocab_list)
  
      text = ["This is a test sentence .", "词 词 。"]
      text_file = tempfile.NamedTemporaryFile()
      text_file.write("\n".join(text).encode("utf-8"))
      text_file.flush()
      self._text_file = text_file
  
      self._hparams = {
          "num_epochs": 50,
          "batch_size": 3,
          "dataset": {
              "files": self._text_file.name,
              "vocab_file": self._vocab_file.name,
          },
      }
  
imports: import tempfile
  import copy
  import numpy
  import tensorflow
  import texar.tf
label_desc: Use image node_id 1 for calling the MonoTextDataTest obj's underlying member method code with example usage: obj.setUp() without return types