class_docstr: The SST dataset.
  
  This dataset is constructed using the Stanford Sentiment Treebank Dataset.
  This dataset contains binary labels (positive or negative) for each sample.
  
  The original dataset specified 5 labels:
  very negative, negative, neutral, positive, very positive with
  the following cutoffs:
  [0, 0.2], (0.2, 0.4], (0.4, 0.6], (0.6, 0.8], (0.8, 1.0]
class_docstr_tok: ["The","SST","dataset",".","This","dataset","is","constructed","using","the","Stanford","Sentiment","Treebank","Dataset",".","This","dataset","contains","binary","labels","(","positive","or","negative",")","for","each","sample",".","The","original","dataset","specified","5","labels",":","very","negative",",","negative",",","neutral",",","positive",",","very","positive","with","the","following","cutoffs",":","[","0",",","0.2","]",",","(","0.2",",","0.4","]",",","(","0.4",",","0.6","]",",","(","0.6",",","0.8","]",",","(","0.8",",","1.0","]"]
docstr: Load dataset files into a dataframe.
docstr_tok: ["Load","dataset","files","into","a","dataframe","."]
code: def transform_files(self, file_paths: List[str]) -> List[str]:
      # maybe this should be
  
      """Load dataset files into a dataframe."""
      sentences_df = pd.read_csv(
          os.path.join(
              self.raw_dataset_dir,
              "stanfordSentimentTreebank/datasetSentences.txt",
          ),
          sep="\t",
      )
  
      sentences_df["sentence"] = sentences_df["sentence"].apply(
          format_text
      )
  
      datasplit_df = pd.read_csv(
          os.path.join(
              self.raw_dataset_dir,
              "stanfordSentimentTreebank/datasetSplit.txt",
          ),
          sep=",",
      )
  
      phrase2id = {}
      with open(
          os.path.join(
              self.raw_dataset_dir,
              "stanfordSentimentTreebank/dictionary.txt",
          )
      ) as f:
          Lines = f.readlines()
          for line in Lines:
              if line:
                  split_line = line.split("|")
                  phrase = split_line[0]
                  phrase2id[phrase] = int(split_line[1])
  
      id2sent = {}
      with open(
          os.path.join(
              self.raw_dataset_dir,
              "stanfordSentimentTreebank/sentiment_labels.txt",
          )
      ) as f:
          Lines = f.readlines()
          for line in Lines:
              if line:
                  split_line = line.split("|")
                  try:
                      id2sent[int(split_line[0])] = float(split_line[1])
                  except ValueError:
                      pass
  
      trees_pointers = None
      trees_phrases = None
  
      if self.include_subtrees:
          trees_pointers = []
          with open(
              os.path.join(
                  self.raw_dataset_dir,
                  "stanfordSentimentTreebank/STree.txt",
              )
          ) as f:
              Lines = f.readlines()
              for line in Lines:
                  if line:
                      trees_pointers.append(
                          [int(s.strip()) for s in line.split("|")]
                      )
  
          trees_phrases = []
          with open(
              os.path.join(
                  self.raw_dataset_dir,
                  "stanfordSentimentTreebank/SOStr.txt",
              )
          ) as f:
              Lines = f.readlines()
              for line in Lines:
                  if line:
                      trees_phrases.append(
                          [s.strip() for s in line.split("|")]
                      )
  
      splits = {"train": 1, "test": 2, "dev": 3}
  
      generated_csv_filenames = []
      for split_name, split_id in splits.items():
          sentence_idcs = get_sentence_idcs_in_split(
              datasplit_df, split_id
          )
  
          pairs = []
          if split_name == "train" and self.include_subtrees:
              phrases = []
              for sentence_idx in sentence_idcs:
                  # trees_pointers and trees_phrases are 0 indexed
                  # while sentence_idx starts from 1
                  # so we need to decrease sentence_idx value
                  sentence_idx -= 1
                  subtrees = sentence_subtrees(
                      sentence_idx, trees_pointers, trees_phrases
                  )
  
                  sentence_idx += 1
                  sentence_phrase = list(
                      sentences_df[
                          sentences_df["sentence_index"] == sentence_idx
                      ]["sentence"]
                  )[0]
  
                  sentence_phrase = convert_parentheses(sentence_phrase)
                  label = self.get_sentiment_label(
                      id2sent, phrase2id[sentence_phrase]
                  )
                  # filter @ sentence level
                  # For SST-2, check subtrees only if sentence is not neutral
                  if not self.discard_neutral or label != -1:
                      for phrase in subtrees:
                          label = self.get_sentiment_label(
                              id2sent, phrase2id[phrase]
                          )
                          if not self.discard_neutral or label != -1:
                              if not self.convert_parentheses:
                                  phrase = convert_parentheses_back(
                                      phrase
                                  )
                                  phrase = phrase.replace("\xa0", " ")
                              pairs.append([phrase, label])
          else:
              phrases = get_sentences_with_idcs(
                  sentences_df, sentence_idcs
              )
              for phrase in phrases:
                  phrase = convert_parentheses(phrase)
                  label = self.get_sentiment_label(
                      id2sent, phrase2id[phrase]
                  )
                  if not self.discard_neutral or label != -1:
                      if not self.convert_parentheses:
                          phrase = convert_parentheses_back(phrase)
                          phrase = phrase.replace("\xa0", " ")
                      pairs.append([phrase, label])
  
          final_csv = pd.DataFrame(pairs)
          final_csv.columns = ["sentence", "label"]
          if self.remove_duplicates:
              final_csv = final_csv.drop_duplicates(subset=["sentence"])
          csv_filename = os.path.join(
              self.raw_dataset_dir, f"{split_name}.csv"
          )
          generated_csv_filenames.append(csv_filename)
          final_csv.to_csv(csv_filename, index=False)
  
      return super().transform_files(generated_csv_filenames)
  
imports: import os
  from typing import List, Optional, Set
  import pandas
  from ludwig.datasets.dataset_config import DatasetConfig
  from ludwig.datasets.loaders.dataset_loader import DatasetLoader
label_desc: Use image node_id 3 for calling the SSTLoader obj's underlying member method code with example usage: obj.transform_files(file_paths) and returns: super