(path: str, set_type: str)
| 1262 | |
| 1263 | @staticmethod |
| 1264 | def _create_examples(path: str, set_type: str) -> List[InputExample]: |
| 1265 | examples = [] |
| 1266 | df = read_tsv(path) |
| 1267 | |
| 1268 | for idx, row in df.iterrows(): |
| 1269 | guid = f"{set_type}-{idx}" |
| 1270 | text_a = punctuation_standardization(row['question']) |
| 1271 | text_b = punctuation_standardization(row['sentence']) |
| 1272 | label = row.get('label', None) |
| 1273 | example = InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label) |
| 1274 | examples.append(example) |
| 1275 | |
| 1276 | return examples |
| 1277 | |
| 1278 | |
| 1279 | class SquadProcessor(DataProcessor): |
nothing calls this directly
no test coverage detected