class_docstr: Implements a simple chatbot for the original Persona-chat dataset.
  
  The personas are not used in this class, only the raw dialogs.
  https://github.com/facebookresearch/ParlAI/tree/master/projects/personachat
class_docstr_tok: ["Implements","a","simple","chatbot","for","the","original","Persona-chat","dataset",".","The","personas","are","not","used","in","this","class",",","only","the","raw","dialogs",".","https",":","\/\/github.com\/facebookresearch\/ParlAI\/tree\/master\/projects\/personachat"]
docstr: Main function where the preprocessing of the data starts.
  
  Args:
    train_mode: string, whether we are in train, dev or test mode
docstr_tok: ["Main","function","where","the","preprocessing","of","the","data","starts",".","Args",":","train_mode",":","string",",","whether","we","are","in","train",",","dev","or","test","mode"]
code: def preprocess_data(self, train_mode):
      """Main function where the preprocessing of the data starts.
  
      Args:
        train_mode: string, whether we are in train, dev or test mode
      """
  
      # Set the raw data directory and data.
      self.raw_data_dir = os.path.join(
          "/".join(self._data_dir.split("/")[:-1]), "raw_data"
      )
      self.raw_data = os.path.join(self._raw_data_dir, "ConvAI2")
      self.zipped_data = os.path.join(
          self._raw_data_dir, "convai2.tar.gz"
      )
  
      # Create the download url.
      self.url = "http://parl.ai/downloads/convai2/convai2_fix_723.tgz"
  
      # Check at which part of the pipeline are we at.
      self.data_pipeline_status(train_mode)
  
file_path: tensor2tensor/tensor2tensor/data_generators/dialog_personachat.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import tarfile
  import zipfile
  from tensor2tensor.data_generators import dialog_abstract
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.utils import registry
label_desc: Use image node_id 1 for calling the DialogPersonachat16k obj's underlying member method code with example usage: obj.preprocess_data(train_mode) without return types