| 106 | ) |
| 107 | |
| 108 | class FDATwice(FDA): |
| 109 | |
| 110 | def doc_to_text(self, doc): |
| 111 | question = doc["key"]+":" |
| 112 | while(doc["text"].lower().endswith(question.lower())): |
| 113 | doc["text"] = doc["text"][:-len(question)] |
| 114 | |
| 115 | upper_key = doc['key'][0].upper() + doc['key'][1:] |
| 116 | question = upper_key +":" |
| 117 | doc['text'] = doc['text'].strip("\n").strip(".") |
| 118 | out = doc["text"] |
| 119 | if not out.endswith("."): out += "." |
| 120 | intro_q = question.strip(":") |
| 121 | out = f"Information about {intro_q}. " + out + "\n" + out + " " + question |
| 122 | return out |
nothing calls this directly
no outgoing calls
no test coverage detected