Datasets:
Commit
·
e5ad418
1
Parent(s):
89cfeb4
updated loading script
Browse files- xnli_cm_sample.py +6 -1
xnli_cm_sample.py
CHANGED
@@ -49,6 +49,10 @@ _LICENSE = ""
|
|
49 |
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
50 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
51 |
_URLS = {
|
|
|
|
|
|
|
|
|
52 |
"fr_ec":
|
53 |
{"train" : "data/fr_ec/train.tsv",
|
54 |
"test" : "data/fr_ec/test.tsv"
|
@@ -88,13 +92,14 @@ class XnliCodeMixedSampled(datasets.GeneratorBasedBuilder):
|
|
88 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
89 |
|
90 |
BUILDER_CONFIGS = [
|
|
|
91 |
datasets.BuilderConfig("fr_ec", version=VERSION, description="French-English code mixed dataset using Equivalence Constraint Theory"),
|
92 |
datasets.BuilderConfig("fr_ml", version=VERSION, description="French-English code mixed dataset using Matrix Language Theory"),
|
93 |
datasets.BuilderConfig("de_ec", version=VERSION, description="German-English code mixed dataset using Equivalence Constraint Theory"),
|
94 |
datasets.BuilderConfig("de_ml", version=VERSION, description="German-English code mixed dataset using Matrix Language Theory"),
|
95 |
]
|
96 |
|
97 |
-
DEFAULT_CONFIG_NAME = "
|
98 |
|
99 |
def _info(self):
|
100 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
|
|
49 |
# The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
|
50 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
51 |
_URLS = {
|
52 |
+
"monolingual":
|
53 |
+
{"train" : "data/monolingual/train.tsv",
|
54 |
+
"test" : "data/monolingual/test.tsv"
|
55 |
+
},
|
56 |
"fr_ec":
|
57 |
{"train" : "data/fr_ec/train.tsv",
|
58 |
"test" : "data/fr_ec/test.tsv"
|
|
|
92 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
93 |
|
94 |
BUILDER_CONFIGS = [
|
95 |
+
datasets.BuilderConfig("monolingual", version=VERSION, description="Monolingual dataset"),
|
96 |
datasets.BuilderConfig("fr_ec", version=VERSION, description="French-English code mixed dataset using Equivalence Constraint Theory"),
|
97 |
datasets.BuilderConfig("fr_ml", version=VERSION, description="French-English code mixed dataset using Matrix Language Theory"),
|
98 |
datasets.BuilderConfig("de_ec", version=VERSION, description="German-English code mixed dataset using Equivalence Constraint Theory"),
|
99 |
datasets.BuilderConfig("de_ml", version=VERSION, description="German-English code mixed dataset using Matrix Language Theory"),
|
100 |
]
|
101 |
|
102 |
+
DEFAULT_CONFIG_NAME = "monolingual" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
103 |
|
104 |
def _info(self):
|
105 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|