Datasets:
Tasks:
Text Classification
Size:
1M<n<10M
nanakonoda
commited on
Commit
·
0113daf
1
Parent(s):
f67fab3
updated loading script
Browse files- xnli_cm.py +6 -2
xnli_cm.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"
|
@@ -68,7 +72,6 @@ _URLS = {
|
|
68 |
}
|
69 |
|
70 |
|
71 |
-
|
72 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
73 |
class XnliCodeMixed(datasets.GeneratorBasedBuilder):
|
74 |
"""XNLI Corpus in English, German, and French"""
|
@@ -88,13 +91,14 @@ class XnliCodeMixed(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"
|
|
|
72 |
}
|
73 |
|
74 |
|
|
|
75 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
76 |
class XnliCodeMixed(datasets.GeneratorBasedBuilder):
|
77 |
"""XNLI Corpus in English, German, and French"""
|
|
|
91 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
92 |
|
93 |
BUILDER_CONFIGS = [
|
94 |
+
datasets.BuilderConfig("monolingual", version=VERSION, description="Monolingual dataset"),
|
95 |
datasets.BuilderConfig("fr_ec", version=VERSION, description="French-English code mixed dataset using Equivalence Constraint Theory"),
|
96 |
datasets.BuilderConfig("fr_ml", version=VERSION, description="French-English code mixed dataset using Matrix Language Theory"),
|
97 |
datasets.BuilderConfig("de_ec", version=VERSION, description="German-English code mixed dataset using Equivalence Constraint Theory"),
|
98 |
datasets.BuilderConfig("de_ml", version=VERSION, description="German-English code mixed dataset using Matrix Language Theory"),
|
99 |
]
|
100 |
|
101 |
+
DEFAULT_CONFIG_NAME = "monolingual" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
102 |
|
103 |
def _info(self):
|
104 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|