Update ted_mt.py
Browse files
ted_mt.py
CHANGED
@@ -27,7 +27,7 @@ import datasets
|
|
27 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
28 |
_CITATION = """\
|
29 |
@InProceedings{phd,
|
30 |
-
title = {
|
31 |
author={hmtkvs, Inc.
|
32 |
},
|
33 |
year={2021}
|
@@ -37,7 +37,7 @@ year={2021}
|
|
37 |
# TODO: Add description of the dataset here
|
38 |
# You can copy an official description
|
39 |
_DESCRIPTION = """\
|
40 |
-
This new dataset is designed to be used in the scope of
|
41 |
"""
|
42 |
|
43 |
# TODO: Add a link to an official homepage for the dataset here
|
@@ -51,9 +51,9 @@ _LICENSE = ""
|
|
51 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
52 |
# url = "https://drive.google.com/drive/folders/1Jvvddj0abp9rMAGhqXqpPbE8-Y28iyM3?usp=sharing"
|
53 |
_URLs = {
|
54 |
-
"train": "train_.json"
|
55 |
-
"validation": "validation_.json"
|
56 |
-
"test": "test_.json"
|
57 |
}
|
58 |
|
59 |
|
@@ -75,7 +75,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
75 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
76 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
77 |
BUILDER_CONFIGS = [
|
78 |
-
datasets.BuilderConfig(name="ted_mt", version=VERSION, description="
|
79 |
]
|
80 |
|
81 |
# DEFAULT_CONFIG_NAME = "opus_books_es_it" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
@@ -158,6 +158,6 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
158 |
data = json.loads(line)
|
159 |
yield id_, {
|
160 |
"translation":{"Spanish": data["Spanish"],
|
161 |
-
"Italian": data["Italian"]#
|
162 |
}
|
163 |
}
|
|
|
27 |
# Find for instance the citation on arxiv or on the dataset repo/website
|
28 |
_CITATION = """\
|
29 |
@InProceedings{phd,
|
30 |
+
title = {Machine Translation Dataset},
|
31 |
author={hmtkvs, Inc.
|
32 |
},
|
33 |
year={2021}
|
|
|
37 |
# TODO: Add description of the dataset here
|
38 |
# You can copy an official description
|
39 |
_DESCRIPTION = """\
|
40 |
+
This new dataset is designed to be used in the scope of multilingual model project.
|
41 |
"""
|
42 |
|
43 |
# TODO: Add a link to an official homepage for the dataset here
|
|
|
51 |
# This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
|
52 |
# url = "https://drive.google.com/drive/folders/1Jvvddj0abp9rMAGhqXqpPbE8-Y28iyM3?usp=sharing"
|
53 |
_URLs = {
|
54 |
+
"train": "train_.json",
|
55 |
+
"validation": "validation_.json",
|
56 |
+
"test": "test_.json"
|
57 |
}
|
58 |
|
59 |
|
|
|
75 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
76 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
77 |
BUILDER_CONFIGS = [
|
78 |
+
datasets.BuilderConfig(name="ted_mt", version=VERSION, description="First domain")
|
79 |
]
|
80 |
|
81 |
# DEFAULT_CONFIG_NAME = "opus_books_es_it" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
|
|
158 |
data = json.loads(line)
|
159 |
yield id_, {
|
160 |
"translation":{"Spanish": data["Spanish"],
|
161 |
+
"Italian": data["Italian"]#hide true labels >> if split == "test" else data["Italian"],
|
162 |
}
|
163 |
}
|