Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
n<1K
Language Creators:
found
Annotations Creators:
found
Source Datasets:
original
Tags:
License:
system HF staff commited on
Commit
b31ff39
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - n<1K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - intent-classification
20
+ ---
21
+
22
+ # Dataset Card for HateOffensive
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+ - **Homepage** : https://sites.google.com/view/qanta/projects/diplomacy
49
+ - **Repository** : https://github.com/DenisPeskov/2020_acl_diplomacy
50
+ - **Paper** : http://users.umiacs.umd.edu/~jbg/docs/2020_acl_diplomacy.pdf
51
+ - **Leaderboard** :
52
+ - **Point of Contact** :
53
+
54
+ ### Dataset Summary
55
+ This dataset contains pairwise conversations annotated by the sender and the receiver for deception (and conversely truthfulness). The 17,289 messages are gathered from 12 games.
56
+
57
+ ### Supported Tasks and Leaderboards
58
+ [More Information Needed]
59
+
60
+ ### Languages
61
+ English
62
+
63
+ ## Dataset Structure
64
+ ### Data Instances
65
+ ```
66
+ {
67
+ "messages":
68
+ ["Greetings Sultan!\n\nAs your neighbor I would like to propose an alliance! What are your views on the board so far?", "I think an alliance would be great! Perhaps a dmz in the Black Sea would be a good idea to solidify this alliance?\n\nAs for my views on the board, my first moves will be Western into the Balkans and Mediterranean Sea.", "Sounds good lets call a dmz in the black sea", "What's our move this year?", "I've been away from the game for a while", "Not sure yet, what are your thoughts?", "Well I'm pretty worried about Germany attacking me (and Austria to a lesser extent) so im headed west. It looks like Italy's landing a army in Syr this fall unless you can stop it", "That sounds good to me. I'll move to defend against Italy while you move west. If it's not too much too ask, I'd like to request that you withdraw your fleet from bla.", "Oh sorry missed the msg to move out of bl sea ill do that this turn. I did bring my army down into Armenia, To help you expel the Italian. It looks like Austria and Italy are working together. If we have a chance in the region you should probably use smy to protect con. We can't afford to lose con.", "I'll defend con from both ank and smy.", "Hey sorry for stabbing you earlier, it was an especially hard choice since Turkey is usually my country of choice. It's cool we got to do this study huh?"],
69
+ "sender_labels": [false, true, false, true, true, true, true, true, true, true, true],
70
+ "receiver_labels": [true, true, true, true, true, true, true, true, true, true, "NOANNOTATION"],
71
+ "speakers": ["russia", "turkey", "russia", "russia", "russia", "turkey", "russia", "turkey", "russia", "turkey", "russia"],
72
+ "receivers": ["turkey", "russia", "turkey", "turkey", "turkey", "russia", "turkey", "russia", "turkey", "russia", "turkey"],
73
+ "absolute_message_index": [78, 107, 145, 370, 371, 374, 415, 420, 495, 497, 717],
74
+ "relative_message_index": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
75
+ "seasons": ["Spring", "Spring", "Spring", "Spring", "Spring", "Spring", "Fall", "Fall", "Spring", "Spring", "Fall"],
76
+ "years": ["1901", "1901", "1901", "1902", "1902", "1902", "1902", "1902", "1903", "1903", "1905"],
77
+ "game_score": ["4", "3", "4", "5", "5", "4", "5", "4", "5", "3", "7"],
78
+ "game_score_delta": ["1", "-1", "1", "1", "1", "-1", "1", "-1", "2", "-2", "7"],
79
+ "players": ["russia", "turkey"],
80
+ "game_id": 10
81
+ }
82
+ ```
83
+
84
+ ### Data Fields
85
+ - speakers: the sender of the message (string format. Seven possible values: russia, turkey, england, austria, germany, france, italy)
86
+ - receivers: the receiver of the message (string format. Seven possible values: russia, turkey, england, austria, germany, france, italy)
87
+ - messages: the raw message string (string format. ranges in length from one word to paragraphs in length)
88
+ - sender_labels: indicates if the sender of the message selected that the message is truthful, true, or deceptive, false. This is used for our ACTUAL_LIE calculation (true/false which can be bool or string format)
89
+ - receiver_labels: indicates if the receiver of the message selected that the message is perceived as truthful, true, or deceptive, false. In <10% of the cases, no annotation was received. This is used for our SUSPECTED_LIE calculation (string format. true/false/"NOANNOTATION" )
90
+ - game_score: the current game score---supply centers---of the sender (string format that ranges can range from 0 to 18)
91
+ - game_score_delta: the current game score---supply centers---of the sender minus the game score of the recipient (string format that ranges from -18 to 18)
92
+ - absolute_message_index: the index the message is in the entire game, across all dialogs (int format)
93
+ - relative_message_index: the index of the message in the current dialog (int format)
94
+ - seasons: the season in Diplomacy, associated with the year (string format. Spring, Fall, Winter)
95
+ - years: the year in Diplomacy, associated with the season (string format. 1901 through 1918)
96
+ - game_id: which of the 12 games the dialog comes from (int format ranging from 1 to 12)
97
+
98
+ ### Data Splits
99
+ Train, Test and Validation splits
100
+
101
+ ## Dataset Creation
102
+
103
+ ### Curation Rationale
104
+
105
+ [More Information Needed]
106
+
107
+ ### Source Data
108
+
109
+ #### Initial Data Collection and Normalization
110
+
111
+ [More Information Needed]
112
+
113
+ #### Who are the source language producers?
114
+
115
+ [More Information Needed]
116
+
117
+ ### Annotations
118
+
119
+ #### Annotation process
120
+
121
+ [More Information Needed]
122
+
123
+ #### Who are the annotators?
124
+
125
+ [More Information Needed]
126
+
127
+ ### Personal and Sensitive Information
128
+
129
+ [More Information Needed]
130
+
131
+ ## Considerations for Using the Data
132
+
133
+ ### Social Impact of Dataset
134
+
135
+ [More Information Needed]
136
+
137
+ ### Discussion of Biases
138
+
139
+ [More Information Needed]
140
+
141
+ ### Other Known Limitations
142
+
143
+ [More Information Needed]
144
+
145
+ ## Additional Information
146
+
147
+ ### Dataset Curators
148
+
149
+ [More Information Needed]
150
+
151
+ ### Licensing Information
152
+ Unknown
153
+
154
+ ### Citation Information
155
+ @inproceedings{Peskov:Cheng:Elgohary:Barrow:Danescu-Niculescu-Mizil:Boyd-Graber-2020,
156
+ Title = {It Takes Two to Lie: One to Lie and One to Listen},
157
+ Author = {Denis Peskov and Benny Cheng and Ahmed Elgohary and Joe Barrow and Cristian Danescu-Niculescu-Mizil and Jordan Boyd-Graber},
158
+ Booktitle = {Association for Computational Linguistics},
159
+ Year = {2020},
160
+ Location = {Seattle},
161
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "The Diplomacy dataset contains pairwise conversations annotated by the sender and the receiver for deception (and conversely truthfulness). The 17,289 messages are gathered from 12 games. ", "citation": "\n@inproceedings{peskov-etal-2020-takes,\n title = \"It Takes Two to Lie: One to Lie, and One to Listen\",\n author = \"Peskov, Denis and\n Cheng, Benny and\n Elgohary, Ahmed and\n Barrow, Joe and\n Danescu-Niculescu-Mizil, Cristian and\n Boyd-Graber, Jordan\",\n booktitle = \"Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics\",\n month = jul,\n year = \"2020\",\n address = \"Online\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/2020.acl-main.353\",\n doi = \"10.18653/v1/2020.acl-main.353\",\n pages = \"3811--3854\",\n abstract = \"Trust is implicit in many online text conversations{---}striking up new friendships, or asking for tech support. But trust can be betrayed through deception. We study the language and dynamics of deception in the negotiation-based game Diplomacy, where seven players compete for world domination by forging and breaking alliances with each other. Our study with players from the Diplomacy community gathers 17,289 messages annotated by the sender for their intended truthfulness and by the receiver for their perceived truthfulness. Unlike existing datasets, this captures deception in long-lasting relationships, where the interlocutors strategically combine truth with lies to advance objectives. A model that uses power dynamics and conversational contexts can predict when a lie occurs nearly as well as human players.\",\n}\n", "homepage": "https://sites.google.com/view/qanta/projects/diplomacy", "license": "", "features": {"messages": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "sender_labels": {"feature": {"num_classes": 2, "names": ["false", "true"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "receiver_labels": {"feature": {"num_classes": 3, "names": ["false", "true", "noannotation"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "speakers": {"feature": {"num_classes": 7, "names": ["italy", "turkey", "russia", "england", "austria", "germany", "france"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "receivers": {"feature": {"num_classes": 7, "names": ["italy", "turkey", "russia", "england", "austria", "germany", "france"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "absolute_message_index": {"feature": {"dtype": "int64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "relative_message_index": {"feature": {"dtype": "int64", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "seasons": {"feature": {"num_classes": 6, "names": ["spring", "fall", "winter", "Spring", "Fall", "Winter"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "years": {"feature": {"num_classes": 18, "names": ["1901", "1902", "1903", "1904", "1905", "1906", "1907", "1908", "1909", "1910", "1911", "1912", "1913", "1914", "1915", "1916", "1917", "1918"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "game_score": {"feature": {"num_classes": 19, "names": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "game_score_delta": {"feature": {"num_classes": 37, "names": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12", "-13", "-14", "-15", "-16", "-17", "-18"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "players": {"feature": {"num_classes": 7, "names": ["italy", "turkey", "russia", "england", "austria", "germany", "france"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "game_id": {"dtype": "int64", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "diplomacy_detection", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"validation": {"name": "validation", "num_bytes": 254344, "num_examples": 21, "dataset_name": "diplomacy_detection"}, "train": {"name": "train", "num_bytes": 2539778, "num_examples": 189, "dataset_name": "diplomacy_detection"}, "test": {"name": "test", "num_bytes": 506191, "num_examples": 42, "dataset_name": "diplomacy_detection"}}, "download_checksums": {"https://github.com/DenisPeskov/2020_acl_diplomacy/raw/master/data/train.jsonl": {"num_bytes": 2472563, "checksum": "833d8ef26561bbd1921e9f5e730b2ebea0a59cec24f7082bfdcacb8b6cf30792"}, "https://github.com/DenisPeskov/2020_acl_diplomacy/raw/master/data/test.jsonl": {"num_bytes": 490273, "checksum": "2061ee7f040d6d8016760cb146d7821fef57cfbb4ced868f233e63854257c050"}, "https://github.com/DenisPeskov/2020_acl_diplomacy/raw/master/data/validation.jsonl": {"num_bytes": 245870, "checksum": "6b2ca19991c7596693ea61b34b1be2d6ada3fcf6710472edd4afed841556e571"}}, "download_size": 3208706, "post_processing_size": null, "dataset_size": 3300313, "size_in_bytes": 6509019}}
diplomacy_detection.py ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ """Diplomacy: A Dataset for Deception Detection. It Takes Two to Lie: One to Lie, and One to Listen."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """
26
+ @inproceedings{peskov-etal-2020-takes,
27
+ title = "It Takes Two to Lie: One to Lie, and One to Listen",
28
+ author = "Peskov, Denis and
29
+ Cheng, Benny and
30
+ Elgohary, Ahmed and
31
+ Barrow, Joe and
32
+ Danescu-Niculescu-Mizil, Cristian and
33
+ Boyd-Graber, Jordan",
34
+ booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
35
+ month = jul,
36
+ year = "2020",
37
+ address = "Online",
38
+ publisher = "Association for Computational Linguistics",
39
+ url = "https://www.aclweb.org/anthology/2020.acl-main.353",
40
+ doi = "10.18653/v1/2020.acl-main.353",
41
+ pages = "3811--3854",
42
+ abstract = "Trust is implicit in many online text conversations{---}striking up new friendships, or asking for tech support. But trust can be betrayed through deception. We study the language and dynamics of deception in the negotiation-based game Diplomacy, where seven players compete for world domination by forging and breaking alliances with each other. Our study with players from the Diplomacy community gathers 17,289 messages annotated by the sender for their intended truthfulness and by the receiver for their perceived truthfulness. Unlike existing datasets, this captures deception in long-lasting relationships, where the interlocutors strategically combine truth with lies to advance objectives. A model that uses power dynamics and conversational contexts can predict when a lie occurs nearly as well as human players.",
43
+ }
44
+ """
45
+
46
+ _DESCRIPTION = "The Diplomacy dataset contains pairwise conversations annotated by the sender and the receiver for deception (and conversely truthfulness). The 17,289 messages are gathered from 12 games. "
47
+
48
+ _HOMEPAGE = "https://sites.google.com/view/qanta/projects/diplomacy"
49
+
50
+ # _LICENSE = ""
51
+
52
+ _URL = "https://github.com/DenisPeskov/2020_acl_diplomacy/raw/master/data/"
53
+
54
+ _PLAYABLE_COUNTRIES = ["italy", "turkey", "russia", "england", "austria", "germany", "france"]
55
+ _SEASONS = ["spring", "fall", "winter", "Spring", "Fall", "Winter"]
56
+ _YEARS = [
57
+ "1901",
58
+ "1902",
59
+ "1903",
60
+ "1904",
61
+ "1905",
62
+ "1906",
63
+ "1907",
64
+ "1908",
65
+ "1909",
66
+ "1910",
67
+ "1911",
68
+ "1912",
69
+ "1913",
70
+ "1914",
71
+ "1915",
72
+ "1916",
73
+ "1917",
74
+ "1918",
75
+ ]
76
+ _GAME_SCORE = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"]
77
+ _GAME_SCORE_DELTA = [
78
+ "0",
79
+ "1",
80
+ "2",
81
+ "3",
82
+ "4",
83
+ "5",
84
+ "6",
85
+ "7",
86
+ "8",
87
+ "9",
88
+ "10",
89
+ "11",
90
+ "12",
91
+ "13",
92
+ "14",
93
+ "15",
94
+ "16",
95
+ "17",
96
+ "18",
97
+ "-1",
98
+ "-2",
99
+ "-3",
100
+ "-4",
101
+ "-5",
102
+ "-6",
103
+ "-7",
104
+ "-8",
105
+ "-9",
106
+ "-10",
107
+ "-11",
108
+ "-12",
109
+ "-13",
110
+ "-14",
111
+ "-15",
112
+ "-16",
113
+ "-17",
114
+ "-18",
115
+ ]
116
+
117
+
118
+ class DiplomacyDetection(datasets.GeneratorBasedBuilder):
119
+ """Diplomacy: A Dataset for Deception Detection. """
120
+
121
+ VERSION = datasets.Version("1.1.0")
122
+
123
+ def _info(self):
124
+ features = datasets.Features(
125
+ {
126
+ "messages": datasets.Sequence(datasets.Value("string")),
127
+ "sender_labels": datasets.Sequence(datasets.ClassLabel(names=["false", "true"])),
128
+ "receiver_labels": datasets.Sequence(datasets.ClassLabel(names=["false", "true", "noannotation"])),
129
+ "speakers": datasets.Sequence(datasets.ClassLabel(names=_PLAYABLE_COUNTRIES)),
130
+ "receivers": datasets.Sequence(datasets.ClassLabel(names=_PLAYABLE_COUNTRIES)),
131
+ "absolute_message_index": datasets.Sequence(datasets.Value("int64")),
132
+ "relative_message_index": datasets.Sequence(datasets.Value("int64")),
133
+ "seasons": datasets.Sequence(datasets.ClassLabel(names=_SEASONS)),
134
+ "years": datasets.Sequence(datasets.ClassLabel(names=_YEARS)),
135
+ "game_score": datasets.Sequence(datasets.ClassLabel(names=_GAME_SCORE)),
136
+ "game_score_delta": datasets.Sequence(datasets.ClassLabel(names=_GAME_SCORE_DELTA)),
137
+ "players": datasets.Sequence(datasets.ClassLabel(names=_PLAYABLE_COUNTRIES)),
138
+ "game_id": datasets.Value("int64"),
139
+ }
140
+ )
141
+ return datasets.DatasetInfo(
142
+ description=_DESCRIPTION,
143
+ features=features,
144
+ supervised_keys=None,
145
+ homepage=_HOMEPAGE,
146
+ citation=_CITATION,
147
+ )
148
+
149
+ def _split_generators(self, dl_manager):
150
+ """Returns SplitGenerators."""
151
+ urls_to_download = {
152
+ "train": os.path.join(_URL, "train.jsonl"),
153
+ "test": os.path.join(_URL, "test.jsonl"),
154
+ "validation": os.path.join(_URL, "validation.jsonl"),
155
+ }
156
+ downloaded_filepath = dl_manager.download(urls_to_download)
157
+ return [
158
+ datasets.SplitGenerator(
159
+ name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_filepath["validation"]}
160
+ ),
161
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_filepath["train"]}),
162
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_filepath["test"]}),
163
+ ]
164
+
165
+ def _generate_examples(self, filepath):
166
+ """ Yields examples. """
167
+ with open(filepath, encoding="utf-8") as f:
168
+ for id_, row in enumerate(f):
169
+ data = json.loads(row)
170
+ yield id_, {
171
+ "messages": data["messages"],
172
+ "sender_labels": [str(v).lower() for v in data["sender_labels"]],
173
+ "receiver_labels": [str(v).lower() for v in data["receiver_labels"]],
174
+ "speakers": data["speakers"],
175
+ "receivers": data["receivers"],
176
+ "absolute_message_index": data["absolute_message_index"],
177
+ "relative_message_index": data["relative_message_index"],
178
+ "seasons": data["seasons"],
179
+ "years": data["years"],
180
+ "game_score": data["game_score"],
181
+ "game_score_delta": data["game_score_delta"],
182
+ "players": data["players"],
183
+ "game_id": data["game_id"],
184
+ }
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab2375cb04d74c54ed7aec0e3ee208f7a19796843295cc2e04380269c727391e
3
+ size 26863