(self, doc)
| 50 | return map(self._process_doc, self.dataset["test"]) |
| 51 | |
| 52 | def _process_doc(self, doc): |
| 53 | out_doc = { |
| 54 | "id": doc["qid"], |
| 55 | "query": "Question: " + doc["qtext"] + "\nAnswer:", |
| 56 | "choices": [answer["atext"] for answer in doc["answers"]], |
| 57 | "gold": int(doc["ra"]) - 1, |
| 58 | } |
| 59 | return out_doc |
| 60 | |
| 61 | def doc_to_text(self, doc): |
| 62 | return doc["query"] |
nothing calls this directly
no outgoing calls
no test coverage detected