(self, aliases)
| 69 | return " " + doc["answers"][0] |
| 70 | |
| 71 | def _remove_prefixes(self, aliases): |
| 72 | # Optimization: Remove any alias that has a strict prefix elsewhere in the list |
| 73 | # we can do this because if the prefix is acceptable by isgreedy, we can stop looking |
| 74 | aliases.sort() |
| 75 | ret = [aliases[0]] |
| 76 | for alias in aliases[1:]: |
| 77 | if not alias.startswith(ret[-1]): |
| 78 | ret.append(alias) |
| 79 | |
| 80 | return ret |
| 81 | |
| 82 | def construct_requests(self, doc, ctx): |
| 83 | ret = [] |