(self, data_dir, split)
| 217 | self.labels = ['0', '1'] |
| 218 | |
| 219 | def get_examples(self, data_dir, split): |
| 220 | path = os.path.join(data_dir, f"{self.dataset_project[split]}.tsv") |
| 221 | examples = [] |
| 222 | with open(path, encoding='utf-8')as f: |
| 223 | lines = f.readlines() |
| 224 | for idx, line in enumerate(lines[1:]): |
| 225 | linelist = line.strip().split('\t') |
| 226 | text_a = linelist[0] |
| 227 | label = linelist[1] |
| 228 | guid = "%s-%s" % (split, idx) |
| 229 | example = InputExample(guid=guid, text_a=text_a, label=self.get_label_id(label)) |
| 230 | examples.append(example) |
| 231 | return examples |
| 232 | |
| 233 | |
| 234 | class SnliProcessor(DataProcessor): |
nothing calls this directly
no outgoing calls
no test coverage detected