Datasets:
ok
Browse files
mqa.py
CHANGED
@@ -31,7 +31,7 @@ _BASE_URL = "https://www.clips.uantwerpen.be/~mdebruyn/mqa/data.{}.{}.json.gz"
|
|
31 |
|
32 |
|
33 |
_LANGUAGES = [
|
34 |
-
"en", "de", "es", "fr",
|
35 |
"ru", "ja", "it", "zh", "pt",
|
36 |
"nl", "tr", "pl", "vi", "ar",
|
37 |
"id", "uk", "ro", "no", "th",
|
@@ -40,7 +40,7 @@ _LANGUAGES = [
|
|
40 |
"sk", "lt", "et", "hr", "is",
|
41 |
"lv", "ms", "bg", "sr", "ca"
|
42 |
]
|
43 |
-
_SCOPES = ["faq", "cqa"]
|
44 |
_LEVELS = ["domain", "page", "question"]
|
45 |
|
46 |
|
@@ -103,8 +103,8 @@ class MQA(datasets.GeneratorBasedBuilder):
|
|
103 |
|
104 |
def _split_generators(self, dl_manager):
|
105 |
filenames = []
|
106 |
-
languages = _LANGUAGES if self.config.language == "all" else self.config.language
|
107 |
-
scopes = _SCOPES if self.config.scope == "all" else self.config.scope
|
108 |
for language in languages:
|
109 |
for scope in scopes:
|
110 |
path = dl_manager.download_and_extract(_BASE_URL.format(language, scope))
|
|
|
31 |
|
32 |
|
33 |
_LANGUAGES = [
|
34 |
+
"all", "en", "de", "es", "fr",
|
35 |
"ru", "ja", "it", "zh", "pt",
|
36 |
"nl", "tr", "pl", "vi", "ar",
|
37 |
"id", "uk", "ro", "no", "th",
|
|
|
40 |
"sk", "lt", "et", "hr", "is",
|
41 |
"lv", "ms", "bg", "sr", "ca"
|
42 |
]
|
43 |
+
_SCOPES = ["all", "faq", "cqa"]
|
44 |
_LEVELS = ["domain", "page", "question"]
|
45 |
|
46 |
|
|
|
103 |
|
104 |
def _split_generators(self, dl_manager):
|
105 |
filenames = []
|
106 |
+
languages = _LANGUAGES if self.config.language == "all" else [self.config.language]
|
107 |
+
scopes = _SCOPES if self.config.scope == "all" else [self.config.scope]
|
108 |
for language in languages:
|
109 |
for scope in scopes:
|
110 |
path = dl_manager.download_and_extract(_BASE_URL.format(language, scope))
|