class_docstr: The class to read the Ubuntu V2 dataset from csv files.
  
  Please, see https://github.com/rkadlec/ubuntu-ranking-dataset-creator.
class_docstr_tok: ["The","class","to","read","the","Ubuntu","V2","dataset","from","csv","files",".","Please",",","see","https",":","\/\/github.com\/rkadlec\/ubuntu-ranking-dataset-creator","."]
docstr: Read the Ubuntu V2 dataset from csv files.
  
  Args:
      data_path: A path to a folder with dataset csv files.
      positive_samples: if `True`, only positive context-response pairs will be taken for train
docstr_tok: ["Read","the","Ubuntu","V2","dataset","from","csv","files",".","Args",":","data_path",":","A","path","to","a","folder","with","dataset","csv","files",".","positive_samples",":","if","`","True","`",",","only","positive","context-response","pairs","will","be","taken","for","train"]
code: def read(
      self, data_path: str, positive_samples=False, *args, **kwargs
  ) -> Dict[str, List[Tuple[List[str], int]]]:
      """Read the Ubuntu V2 dataset from csv files.
  
      Args:
          data_path: A path to a folder with dataset csv files.
          positive_samples: if `True`, only positive context-response pairs will be taken for train
      """
  
      data_path = expand_path(data_path)
      dataset = {"train": None, "valid": None, "test": None}
      train_fname = Path(data_path) / "train.csv"
      valid_fname = Path(data_path) / "valid.csv"
      test_fname = Path(data_path) / "test.csv"
      self.positive_samples = positive_samples
      self.sen2int_vocab = {}
      self.classes_vocab_train = {}
      self.classes_vocab_valid = {}
      self.classes_vocab_test = {}
      dataset["train"] = self.preprocess_data_train(train_fname)
      dataset["valid"] = self.preprocess_data_validation(valid_fname)
      dataset["test"] = self.preprocess_data_validation(test_fname)
      return dataset
  
file_path: DeepPavlov/deeppavlov/dataset_readers/ubuntu_v2_reader.py
imports: import csv
  from pathlib import Path
  from typing import List, Dict, Tuple, Union
  from deeppavlov.core.commands.utils import expand_path
  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 UbuntuV2Reader obj's underlying member method code with example usage: obj.read(data_path, positive_samples) and returns: dataset