(self, data_dir, split)
| 159 | self.labels = ["negative", "positive"] |
| 160 | |
| 161 | def get_examples(self, data_dir, split): |
| 162 | examples = [] |
| 163 | label_file = open(os.path.join(data_dir, "{}_labels.txt".format(split)), 'r') |
| 164 | labels = [int(x.strip()) for x in label_file.readlines()] |
| 165 | with open(os.path.join(data_dir, '{}.txt'.format(split)),'r') as fin: |
| 166 | for idx, line in enumerate(fin): |
| 167 | text_a = line.strip() |
| 168 | example = InputExample(guid=str(idx), text_a=text_a, label=int(labels[idx])) |
| 169 | examples.append(example) |
| 170 | return examples |
| 171 | |
| 172 | |
| 173 | @staticmethod |
nothing calls this directly
no outgoing calls
no test coverage detected