class_docstr: Reader for FAQ dataset
docstr: Read FAQ dataset from specified csv file or remote url
  
  Parameters:
      data_path: path to csv file of FAQ
      data_url: url to csv file of FAQ
      x_col_name: name of Question column in csv file
      y_col_name: name of Answer column in csv file
  
  Returns:
      A dictionary containing training, validation and test parts of the dataset obtainable via
      ``train``, ``valid`` and ``test`` keys.
docstr_tok: ["Read","FAQ","dataset","from","specified","csv","file","or","remote","url","Parameters",":","data_path",":","path","to","csv","file","of","FAQ","data_url",":","url","to","csv","file","of","FAQ","x_col_name",":","name","of","Question","column","in","csv","file","y_col_name",":","name","of","Answer","column","in","csv","file","Returns",":","A","dictionary","containing","training",",","validation","and","test","parts","of","the","dataset","obtainable","via","``","train","``",",","``","valid","``","and","``","test","``","keys","."]
code: def read(
      self,
      data_path: str = None,
      data_url: str = None,
      x_col_name: str = "x",
      y_col_name: str = "y",
  ) -> Dict:
      """
      Read FAQ dataset from specified csv file or remote url
  
      Parameters:
          data_path: path to csv file of FAQ
          data_url: url to csv file of FAQ
          x_col_name: name of Question column in csv file
          y_col_name: name of Answer column in csv file
  
      Returns:
          A dictionary containing training, validation and test parts of the dataset obtainable via
          ``train``, ``valid`` and ``test`` keys.
      """
  
      if data_url is not None:
          data = read_csv(data_url)
      elif data_path is not None:
          data = read_csv(data_path)
      else:
          raise ValueError(
              "Please specify data_path or data_url parameter"
          )
  
      x = data[x_col_name]
      y = data[y_col_name]
  
      train_xy_tuples = [
          (x[i].strip(), y[i].strip()) for i in range(len(x))
      ]
  
      dataset = dict()
      dataset["train"] = train_xy_tuples
      dataset["valid"] = []
      dataset["test"] = []
  
      return dataset
  
imports: from typing import Dict
  from pandas import read_csv
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.dataset_reader import DatasetReader
label_desc: Use image node_id 1 for calling the FaqDatasetReader obj's underlying member method code with example usage: obj.read(data_path, data_url, x_col_name, y_col_name) and returns: dataset