Pre-process answer string.
(answer)
| 525 | |
| 526 | |
| 527 | def simplify(answer): |
| 528 | """Pre-process answer string.""" |
| 529 | toks = [] |
| 530 | articles = {"the", "a", "an", "and", ""} |
| 531 | for t in answer.strip().lower().split(): |
| 532 | tok = strip_accents_and_punct(t) |
| 533 | if tok not in articles: |
| 534 | toks.append(tok) |
| 535 | return "".join(toks) |
| 536 | |
| 537 | |
| 538 | def rare_relation_scores(relationwise, relation2counts): |
no test coverage detected
searching dependent graphs…