(lang)
| 55 | |
| 56 | |
| 57 | def create_task(lang): |
| 58 | class XStoryCloze(StoryCloze): |
| 59 | DATASET_PATH = "juletxara/xstory_cloze" |
| 60 | DATASET_NAME = lang |
| 61 | |
| 62 | def __init__(self): |
| 63 | super().__init__(data_dir="") |
| 64 | |
| 65 | def has_training_docs(self): |
| 66 | return True |
| 67 | |
| 68 | def has_validation_docs(self): |
| 69 | return True |
| 70 | |
| 71 | def has_test_docs(self): |
| 72 | return False |
| 73 | |
| 74 | def training_docs(self): |
| 75 | return self.dataset["train"] |
| 76 | |
| 77 | def validation_docs(self): |
| 78 | return self.dataset["eval"] |
| 79 | |
| 80 | def test_docs(self): |
| 81 | pass |
| 82 | |
| 83 | return XStoryCloze |