Datasets:

Languages:
English
ArXiv:
License:
system HF staff commited on
Commit
dd11548
0 Parent(s):

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.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
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "In Event2Mind, we explore the task of understanding stereotypical intents and reactions to events. Through crowdsourcing, we create a large corpus with 25,000 events and free-form descriptions of their intents and reactions, both of the event's subject and (potentially implied) other participants.\n", "citation": "@inproceedings{event2Mind,\n title={Event2Mind: Commonsense Inference on Events, Intents, and Reactions},\n author={Hannah Rashkin and Maarten Sap and Emily Allaway and Noah A. Smith\u2020 Yejin Choi},\n year={2018}\n}\n", "homepage": "https://uwnlp.github.io/event2mind/", "license": "", "features": {"Source": {"dtype": "string", "id": null, "_type": "Value"}, "Event": {"dtype": "string", "id": null, "_type": "Value"}, "Xintent": {"dtype": "string", "id": null, "_type": "Value"}, "Xemotion": {"dtype": "string", "id": null, "_type": "Value"}, "Otheremotion": {"dtype": "string", "id": null, "_type": "Value"}, "Xsent": {"dtype": "string", "id": null, "_type": "Value"}, "Osent": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "event2mind", "config_name": "default", "version": {"version_str": "0.1.0", "description": null, "datasets_version_to_prepare": null, "major": 0, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 649273, "num_examples": 5221, "dataset_name": "event2mind"}, "train": {"name": "train", "num_bytes": 5916384, "num_examples": 46472, "dataset_name": "event2mind"}, "validation": {"name": "validation", "num_bytes": 672365, "num_examples": 5401, "dataset_name": "event2mind"}}, "download_checksums": {"https://uwnlp.github.io/event2mind/data/event2mind.zip": {"num_bytes": 1300770, "checksum": "07dcd0a1278b474ffbe29eff309ff8e0c512521022e2623cbecd417402802a2e"}}, "download_size": 1300770, "dataset_size": 7238022, "size_in_bytes": 8538792}}
dummy/0.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0183a29221ff1865199067a41c086ec093daf984bc818c1a5bb98eadcbb05a08
3
+ size 1250
event2Mind.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """TODO(event2Mind): Add a description here."""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+
5
+ import csv
6
+ import os
7
+
8
+ import datasets
9
+
10
+
11
+ # TODO(event2Mind): BibTeX citation
12
+ _CITATION = """\
13
+ @inproceedings{event2Mind,
14
+ title={Event2Mind: Commonsense Inference on Events, Intents, and Reactions},
15
+ author={Hannah Rashkin and Maarten Sap and Emily Allaway and Noah A. Smith† Yejin Choi},
16
+ year={2018}
17
+ }
18
+ """
19
+
20
+ # TODO(event2Mind):\
21
+
22
+ _DESCRIPTION = """\
23
+ In Event2Mind, we explore the task of understanding stereotypical intents and reactions to events. Through crowdsourcing, we create a large corpus with 25,000 events and free-form descriptions of their intents and reactions, both of the event's subject and (potentially implied) other participants.
24
+ """
25
+ _URL = "https://uwnlp.github.io/event2mind/data/event2mind.zip"
26
+
27
+
28
+ class Event2mind(datasets.GeneratorBasedBuilder):
29
+ """TODO(event2Mind): Short description of my dataset."""
30
+
31
+ # TODO(event2Mind): Set up version.
32
+ VERSION = datasets.Version("0.1.0")
33
+
34
+ def _info(self):
35
+ # TODO(event2Mind): Specifies the datasets.DatasetInfo object
36
+ return datasets.DatasetInfo(
37
+ # This is the description that will appear on the datasets page.
38
+ description=_DESCRIPTION,
39
+ # datasets.features.FeatureConnectors
40
+ features=datasets.Features(
41
+ {
42
+ # These are the features of your dataset like images, labels ...
43
+ "Source": datasets.Value("string"),
44
+ "Event": datasets.Value("string"),
45
+ "Xintent": datasets.Value("string"),
46
+ "Xemotion": datasets.Value("string"),
47
+ "Otheremotion": datasets.Value("string"),
48
+ "Xsent": datasets.Value("string"),
49
+ "Osent": datasets.Value("string"),
50
+ }
51
+ ),
52
+ # If there's a common (input, target) tuple from the features,
53
+ # specify them here. They'll be used if as_supervised=True in
54
+ # builder.as_dataset.
55
+ supervised_keys=None,
56
+ # Homepage of the dataset for documentation
57
+ homepage="https://uwnlp.github.io/event2mind/",
58
+ citation=_CITATION,
59
+ )
60
+
61
+ def _split_generators(self, dl_manager):
62
+ """Returns SplitGenerators."""
63
+ # TODO(event2Mind): Downloads the data and defines the splits
64
+ # dl_manager is a datasets.download.DownloadManager that can be used to
65
+ # download and extract URLs
66
+ dl_dir = dl_manager.download_and_extract(_URL)
67
+ return [
68
+ datasets.SplitGenerator(
69
+ name=datasets.Split.TRAIN,
70
+ # These kwargs will be passed to _generate_examples
71
+ gen_kwargs={"filepath": os.path.join(dl_dir, "train.csv")},
72
+ ),
73
+ datasets.SplitGenerator(
74
+ name=datasets.Split.TEST,
75
+ # These kwargs will be passed to _generate_examples
76
+ gen_kwargs={"filepath": os.path.join(dl_dir, "test.csv")},
77
+ ),
78
+ datasets.SplitGenerator(
79
+ name=datasets.Split.VALIDATION,
80
+ # These kwargs will be passed to _generate_examples
81
+ gen_kwargs={"filepath": os.path.join(dl_dir, "dev.csv")},
82
+ ),
83
+ ]
84
+
85
+ def _generate_examples(self, filepath):
86
+ """Yields examples."""
87
+ # TODO(event2Mind): Yields (key, example) tuples from the dataset
88
+ with open(filepath, encoding="utf-8") as f:
89
+ data = csv.DictReader(f)
90
+ for id_, row in enumerate(data):
91
+ yield id_, {
92
+ "Source": row["Source"],
93
+ "Event": row["Event"],
94
+ "Xintent": row["Xintent"],
95
+ "Xemotion": row["Xemotion"],
96
+ "Otheremotion": row["Otheremotion"],
97
+ "Xsent": row["Xsent"],
98
+ "Osent": row["Osent"],
99
+ }