maxpe commited on
Commit
2a56bd1
1 Parent(s): 28c578e

Fix sem_eval_2018_task_1 download location (#3643)

Browse files

* create branch from recent version of datasets

* fix dummy data and style

Commit from https://github.com/huggingface/datasets/commit/766c771fb356b0e6d4b58c54f5b4807886e78fc8

dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"subtask5.english": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.english", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 809768, "num_examples": 6838, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 384519, "num_examples": 3259, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 104660, "num_examples": 886, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-train.zip": {"num_bytes": 359408, "checksum": "7a64a0ffc7d54505ae6556d17d37ad56bd8817ef5724c6e3782909e3a3bca0ae"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-dev.zip": {"num_bytes": 48375, "checksum": "3279ba27452162b1ce0f58b23442ca3fb57c749c3dae7944cbda3ea0984c8a1e"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018englishtestfiles/2018-E-c-En-test.zip": {"num_bytes": 174899, "checksum": "9afa650190d749561749348e360fd1fc0d0a80c5f374d12cc5ef4b9a9ffc4430"}}, "download_size": 582682, "post_processing_size": null, "dataset_size": 1298947, "size_in_bytes": 1881629}, "subtask5.spanish": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.spanish", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 362549, "num_examples": 3561, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 288692, "num_examples": 2854, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 67259, "num_examples": 679, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-train.zip": {"num_bytes": 156975, "checksum": "28547e933b3087b8a82d7997e15021ef2f3680f6a1b134ca41766ce44034a276"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-dev.zip": {"num_bytes": 30152, "checksum": "399cd39ae7dc00b11b2f319dfbb9360614e86c92898318fdfd06af46a81f5ebe"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018spanishtestfiles/2018-E-c-Es-test.zip": {"num_bytes": 126924, "checksum": "3909e38a167ec40250b0b78f254e03fc3fb79ac7790bce6b695ef273a1d289d1"}}, "download_size": 314051, "post_processing_size": null, "dataset_size": 718500, "size_in_bytes": 1032551}, "subtask5.arabic": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.arabic", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 414458, "num_examples": 2278, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 278715, "num_examples": 1518, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 105452, "num_examples": 585, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-train.zip": {"num_bytes": 142792, "checksum": "cd25acadaf262e1e8dfb27c4d12f392ccb9caf648933a183fc0c83255a86f4a1"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-dev.zip": {"num_bytes": 37428, "checksum": "177e1eee9967cd5dd4b4853ef0cde694b9c20a7b4eb8bfbcb82b11d53cbd30f9"}, "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018arabictestfiles/2018-E-c-Ar-test.zip": {"num_bytes": 97606, "checksum": "4f1fc9f082c08c29b0acec180ebcb10ff425b96c117d8aa86a13ea092fce59f3"}}, "download_size": 277826, "post_processing_size": null, "dataset_size": 798625, "size_in_bytes": 1076451}}
1
+ {"subtask5.english": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.english", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 809768, "num_examples": 6838, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 384519, "num_examples": 3259, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 104660, "num_examples": 886, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip": {"num_bytes": 5975590, "checksum": "8979a6ca0bd259ef375a44d812fd434efa799c66bc377e25cda599aa767640eb"}}, "download_size": 5975590, "post_processing_size": null, "dataset_size": 1298947, "size_in_bytes": 7274537}, "subtask5.spanish": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.spanish", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 362549, "num_examples": 3561, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 288692, "num_examples": 2854, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 67259, "num_examples": 679, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip": {"num_bytes": 5975590, "checksum": "8979a6ca0bd259ef375a44d812fd434efa799c66bc377e25cda599aa767640eb"}}, "download_size": 5975590, "post_processing_size": null, "dataset_size": 718500, "size_in_bytes": 6694090}, "subtask5.arabic": {"description": " SemEval-2018 Task 1: Affect in Tweets: SubTask 5: Emotion Classification.\n This is a dataset for multilabel emotion classification for tweets.\n 'Given a tweet, classify it as 'neutral or no emotion' or as one, or more, of eleven given emotions that best represent the mental state of the tweeter.'\n It contains 22467 tweets in three languages manually annotated by crowdworkers using Best\u2013Worst Scaling.\n", "citation": "@InProceedings{SemEval2018Task1,\n author = {Mohammad, Saif M. and Bravo-Marquez, Felipe and Salameh, Mohammad and Kiritchenko, Svetlana},\n title = {SemEval-2018 {T}ask 1: {A}ffect in Tweets},\n booktitle = {Proceedings of International Workshop on Semantic Evaluation (SemEval-2018)},\n address = {New Orleans, LA, USA},\n year = {2018}}\n", "homepage": "https://competitions.codalab.org/competitions/17751", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Tweet": {"dtype": "string", "id": null, "_type": "Value"}, "anger": {"dtype": "bool", "id": null, "_type": "Value"}, "anticipation": {"dtype": "bool", "id": null, "_type": "Value"}, "disgust": {"dtype": "bool", "id": null, "_type": "Value"}, "fear": {"dtype": "bool", "id": null, "_type": "Value"}, "joy": {"dtype": "bool", "id": null, "_type": "Value"}, "love": {"dtype": "bool", "id": null, "_type": "Value"}, "optimism": {"dtype": "bool", "id": null, "_type": "Value"}, "pessimism": {"dtype": "bool", "id": null, "_type": "Value"}, "sadness": {"dtype": "bool", "id": null, "_type": "Value"}, "surprise": {"dtype": "bool", "id": null, "_type": "Value"}, "trust": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "sem_eval2018_task1", "config_name": "subtask5.arabic", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 414458, "num_examples": 2278, "dataset_name": "sem_eval2018_task1"}, "test": {"name": "test", "num_bytes": 278715, "num_examples": 1518, "dataset_name": "sem_eval2018_task1"}, "validation": {"name": "validation", "num_bytes": 105452, "num_examples": 585, "dataset_name": "sem_eval2018_task1"}}, "download_checksums": {"https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip": {"num_bytes": 5975590, "checksum": "8979a6ca0bd259ef375a44d812fd434efa799c66bc377e25cda599aa767640eb"}}, "download_size": 5975590, "post_processing_size": null, "dataset_size": 798625, "size_in_bytes": 6774215}}
dummy/subtask5.arabic/1.1.0/dummy_data.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4d05b1db3c9e7c239d0dedfcf6d819236df5f5c7a8f24c8a4f73aa8eef40b43d
3
- size 2424
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:888ecf1ae00a93b99aab1e557ff87a72511fdc45d0117055d4e2cd2187b069b5
3
+ size 3563
dummy/subtask5.english/1.1.0/dummy_data.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a220918ffe6a80c0e5cfab1a807278dc657ee07a1b5f11517822ff6f011b6aba
3
- size 2258
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6208e50ba1d701b5a2a461d161e1c06639efeea2778c4cef94ce9378bda9efb
3
+ size 3414
dummy/subtask5.spanish/1.1.0/dummy_data.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d10c00e90e2e4411b48717fb45af9030b175fa0c7188dac1769427dcacba211d
3
- size 2155
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:895f600d1b6acca340ebb7badaee6726081d0480b7fce68fe9b85cb183093be9
3
+ size 3302
sem_eval_2018_task_1.py CHANGED
@@ -39,21 +39,9 @@ _HOMEPAGE = "https://competitions.codalab.org/competitions/17751"
39
  _LICENSE = ""
40
 
41
  _URLs = {
42
- "subtask5.english": [
43
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-train.zip",
44
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/English/2018-E-c-En-dev.zip",
45
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018englishtestfiles/2018-E-c-En-test.zip",
46
- ],
47
- "subtask5.spanish": [
48
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-train.zip",
49
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Spanish/2018-E-c-Es-dev.zip",
50
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018spanishtestfiles/2018-E-c-Es-test.zip",
51
- ],
52
- "subtask5.arabic": [
53
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-train.zip",
54
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/E-c/Arabic/2018-E-c-Ar-dev.zip",
55
- "http://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/AIT2018-TEST-DATA/semeval2018arabictestfiles/2018-E-c-Ar-test.zip",
56
- ],
57
  }
58
 
59
 
@@ -112,30 +100,42 @@ class SemEval2018Task1(datasets.GeneratorBasedBuilder):
112
  my_urls = _URLs[self.config.name]
113
  if self.config.name == "subtask5.english":
114
  shortname = "En"
 
115
  if self.config.name == "subtask5.spanish":
116
  shortname = "Es"
 
117
  if self.config.name == "subtask5.arabic":
118
  shortname = "Ar"
 
119
  data_dir = dl_manager.download_and_extract(my_urls)
120
  return [
121
  datasets.SplitGenerator(
122
  name=datasets.Split.TRAIN,
123
  gen_kwargs={
124
- "filepath": os.path.join(data_dir[0], "2018-E-c-" + shortname + "-train.txt"),
 
 
 
125
  "split": "train",
126
  },
127
  ),
128
  datasets.SplitGenerator(
129
  name=datasets.Split.TEST,
130
  gen_kwargs={
131
- "filepath": os.path.join(data_dir[2], "2018-E-c-" + shortname + "-test.txt"),
 
 
 
132
  "split": "test",
133
  },
134
  ),
135
  datasets.SplitGenerator(
136
  name=datasets.Split.VALIDATION,
137
  gen_kwargs={
138
- "filepath": os.path.join(data_dir[1], "2018-E-c-" + shortname + "-dev.txt"),
 
 
 
139
  "split": "dev",
140
  },
141
  ),
@@ -151,15 +151,15 @@ class SemEval2018Task1(datasets.GeneratorBasedBuilder):
151
  yield id_, {
152
  "ID": data[0],
153
  "Tweet": data[1],
154
- "anger": int(data[2]) if split != "test" else None,
155
- "anticipation": int(data[3]) if split != "test" else None,
156
- "disgust": int(data[4]) if split != "test" else None,
157
- "fear": int(data[5]) if split != "test" else None,
158
- "joy": int(data[6]) if split != "test" else None,
159
- "love": int(data[7]) if split != "test" else None,
160
- "optimism": int(data[8]) if split != "test" else None,
161
- "pessimism": int(data[9]) if split != "test" else None,
162
- "sadness": int(data[10]) if split != "test" else None,
163
- "surprise": int(data[11]) if split != "test" else None,
164
- "trust": int(data[12]) if split != "test" else None,
165
  }
39
  _LICENSE = ""
40
 
41
  _URLs = {
42
+ "subtask5.english": ["https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip"],
43
+ "subtask5.spanish": ["https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip"],
44
+ "subtask5.arabic": ["https://saifmohammad.com/WebDocs/AIT-2018/AIT2018-DATA/SemEval2018-Task1-all-data.zip"],
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
 
100
  my_urls = _URLs[self.config.name]
101
  if self.config.name == "subtask5.english":
102
  shortname = "En"
103
+ longname = "English"
104
  if self.config.name == "subtask5.spanish":
105
  shortname = "Es"
106
+ longname = "Spanish"
107
  if self.config.name == "subtask5.arabic":
108
  shortname = "Ar"
109
+ longname = "Arabic"
110
  data_dir = dl_manager.download_and_extract(my_urls)
111
  return [
112
  datasets.SplitGenerator(
113
  name=datasets.Split.TRAIN,
114
  gen_kwargs={
115
+ "filepath": os.path.join(
116
+ data_dir[0],
117
+ "SemEval2018-Task1-all-data/" + longname + "/E-c/2018-E-c-" + shortname + "-train.txt",
118
+ ),
119
  "split": "train",
120
  },
121
  ),
122
  datasets.SplitGenerator(
123
  name=datasets.Split.TEST,
124
  gen_kwargs={
125
+ "filepath": os.path.join(
126
+ data_dir[0],
127
+ "SemEval2018-Task1-all-data/" + longname + "/E-c/2018-E-c-" + shortname + "-test-gold.txt",
128
+ ),
129
  "split": "test",
130
  },
131
  ),
132
  datasets.SplitGenerator(
133
  name=datasets.Split.VALIDATION,
134
  gen_kwargs={
135
+ "filepath": os.path.join(
136
+ data_dir[0],
137
+ "SemEval2018-Task1-all-data/" + longname + "/E-c/2018-E-c-" + shortname + "-dev.txt",
138
+ ),
139
  "split": "dev",
140
  },
141
  ),
151
  yield id_, {
152
  "ID": data[0],
153
  "Tweet": data[1],
154
+ "anger": int(data[2]),
155
+ "anticipation": int(data[3]),
156
+ "disgust": int(data[4]),
157
+ "fear": int(data[5]),
158
+ "joy": int(data[6]),
159
+ "love": int(data[7]),
160
+ "optimism": int(data[8]),
161
+ "pessimism": int(data[9]),
162
+ "sadness": int(data[10]),
163
+ "surprise": int(data[11]),
164
+ "trust": int(data[12]),
165
  }