(self, doc)
| 26 | return self.dataset["validation"] |
| 27 | |
| 28 | def doc_to_text(self, doc): |
| 29 | question = doc["key"]+":" |
| 30 | while(doc["text"].lower().endswith(question.lower())): |
| 31 | doc["text"] = doc["text"][:-len(question)] |
| 32 | upper_key = doc['key'][0].upper() + doc['key'][1:] |
| 33 | question = upper_key +":" |
| 34 | doc['text'] = doc['text'].strip("\n").strip(".") |
| 35 | out = doc["text"] |
| 36 | if not out.endswith("."): out += "." |
| 37 | out += " " + question |
| 38 | return out |
| 39 | |
| 40 | def doc_to_target(self, doc): |
| 41 | return doc["value"] |
nothing calls this directly
no outgoing calls
no test coverage detected