(self, doc)
| 51 | return map(self._process_doc, self.dataset["validation"]) |
| 52 | |
| 53 | def _process_doc(self, doc): |
| 54 | ctx = doc["ctx_a"] + " " + doc["ctx_b"].capitalize() |
| 55 | out_doc = { |
| 56 | "query": self.preprocess(doc["activity_label"] + ": " + ctx), |
| 57 | "choices": [self.preprocess(ending) for ending in doc["endings"]], |
| 58 | "gold": int(doc["label"]), |
| 59 | } |
| 60 | return out_doc |
| 61 | |
| 62 | @classmethod |
| 63 | def preprocess(cls, text): |
nothing calls this directly
no test coverage detected