(tasks, task)
| 93 | |
| 94 | |
| 95 | def get_task_name(tasks, task): |
| 96 | matches = [t for t in tasks if t.startswith(task)] |
| 97 | if len(matches) == 1: |
| 98 | return matches[0] |
| 99 | if len(matches) > 1: |
| 100 | return min(matches, key=len) |
| 101 | return None |
| 102 | |
| 103 | def get_grammar_task(task): |
| 104 | task = task.split('_')[1] |