system HF staff commited on
Commit
a6b5dca
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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +165 -0
  3. dataset_infos.json +1 -0
  4. dummy/0.0.0/dummy_data.zip +3 -0
  5. emotone_ar.py +78 -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,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ar
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1k<n<10k
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text_classification
18
+ task_ids:
19
+ - emotion-classification
20
+ ---
21
+
22
+ # Dataset Card for MetRec
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
+ - [Discussion of Social Impact and Biases](#discussion-of-social-impact-and-biases)
40
+ - [Other Known Limitations](#other-known-limitations)
41
+ - [Additional Information](#additional-information)
42
+ - [Dataset Curators](#dataset-curators)
43
+ - [Licensing Information](#licensing-information)
44
+ - [Citation Information](#citation-information)
45
+
46
+ ## Dataset Description
47
+
48
+ - **Homepage:** [Homepage](https://github.com/AmrMehasseb/Emotional-Tone)
49
+ - **Repository:** [Repository](https://github.com/AmrMehasseb/Emotional-Tone)
50
+ - **Paper:** [Emotional Tone Detection in Arabic Tweets](https://www.researchgate.net/publication/328164296_Emotional_Tone_Detection_in_Arabic_Tweets_18th_International_Conference_CICLing_2017_Budapest_Hungary_April_17-23_2017_Revised_Selected_Papers_Part_II)
51
+ - **Point of Contact:** [Amr Al-Khatib](https://github.com/AmrMehasseb)
52
+
53
+ ### Dataset Summary
54
+
55
+ Dataset of 10065 tweets in Arabic for Emotion detection in Arabic text
56
+
57
+ ### Supported Tasks and Leaderboards
58
+
59
+ [More Information Needed]
60
+
61
+ ### Languages
62
+
63
+ The dataset is based on Arabic.
64
+
65
+ ## Dataset Structure
66
+
67
+ ### Data Instances
68
+
69
+ example:
70
+ ```
71
+ >>> {'label': 0, 'tweet': 'الاوليمبياد الجايه هكون لسه ف الكليه ..'}
72
+ ```
73
+
74
+ ### Data Fields
75
+
76
+ - "tweet": plain text tweet in Arabic
77
+
78
+ - "label": emotion class label
79
+
80
+ the dataset distribution and balance for each class looks like the following
81
+
82
+ |label||Label description | Count |
83
+ |---------|---------| ------- |
84
+ |0 |none | 1550 |
85
+ |1 |anger | 1444 |
86
+ |2 |joy | 1281 |
87
+ |3 |sadness | 1256 |
88
+ |4 |love | 1220 |
89
+ |5 |sympathy | 1062 |
90
+ |6 |surprise | 1045 |
91
+ |7 |fear | 1207 |
92
+
93
+ ### Data Splits
94
+
95
+ The dataset is not split.
96
+
97
+ | | Tain |
98
+ |---------- | ------ |
99
+ |no split | 10,065 |
100
+
101
+ ## Dataset Creation
102
+
103
+ ### Curation Rationale
104
+
105
+ [More Information Needed]
106
+
107
+ ### Source Data
108
+
109
+ [More Information Needed]
110
+
111
+ #### Initial Data Collection and Normalization
112
+
113
+ [More Information Needed]
114
+
115
+ #### Who are the source language producers?
116
+
117
+ [More Information Needed]
118
+
119
+ ### Annotations
120
+
121
+
122
+
123
+ #### Annotation process
124
+
125
+ [More Information Needed]
126
+
127
+ #### Who are the annotators?
128
+
129
+ [More Information Needed]
130
+
131
+ ### Personal and Sensitive Information
132
+
133
+ [More Information Needed]
134
+
135
+ ## Considerations for Using the Data
136
+
137
+ ### Discussion of Social Impact and 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
+
153
+ [More Information Needed]
154
+
155
+ ### Citation Information
156
+
157
+ @inbook{inbook,
158
+ author = {Al-Khatib, Amr and El-Beltagy, Samhaa},
159
+ year = {2018},
160
+ month = {01},
161
+ pages = {105-114},
162
+ title = {Emotional Tone Detection in Arabic Tweets: 18th International Conference, CICLing 2017, Budapest, Hungary, April 17–23, 2017, Revised Selected Papers, Part II},
163
+ isbn = {978-3-319-77115-1},
164
+ doi = {10.1007/978-3-319-77116-8_8}
165
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "Dataset of 10065 tweets in Arabic for Emotion detection in Arabic text", "citation": "@inbook{inbook,\nauthor = {Al-Khatib, Amr and El-Beltagy, Samhaa},\nyear = {2018},\nmonth = {01},\npages = {105-114},\ntitle = {Emotional Tone Detection in Arabic Tweets: 18th International Conference, CICLing 2017, Budapest, Hungary, April 17\u201323, 2017, Revised Selected Papers, Part II},\nisbn = {978-3-319-77115-1},\ndoi = {10.1007/978-3-319-77116-8_8}\n}\n", "homepage": "https://github.com/AmrMehasseb/Emotional-Tone", "license": "", "features": {"tweet": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 8, "names": ["none", "anger", "joy", "sadness", "love", "sympathy", "surprise", "fear"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "emotone_ar", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1541746, "num_examples": 10065, "dataset_name": "emotone_ar"}}, "download_checksums": {"https://raw.githubusercontent.com/AmrMehasseb/Emotional-Tone/master/Emotional-Tone-Dataset.csv": {"num_bytes": 1563138, "checksum": "f799c5ee86ea407de33609f1bbf607369fc7610551fa073b9fc59cd211098715"}}, "download_size": 1563138, "post_processing_size": null, "dataset_size": 1541746, "size_in_bytes": 3104884}}
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d9d07709203c482fd89834c8b5df75def0e339a2727976af4a0ab2634dfd058
3
+ size 551
emotone_ar.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Dataset of 10065 tweets in Arabic for Emotion detection in Arabic text """
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @inbook{inbook,
26
+ author = {Al-Khatib, Amr and El-Beltagy, Samhaa},
27
+ year = {2018},
28
+ month = {01},
29
+ pages = {105-114},
30
+ title = {Emotional Tone Detection in Arabic Tweets: 18th International Conference, CICLing 2017, Budapest, Hungary, April 17–23, 2017, Revised Selected Papers, Part II},
31
+ isbn = {978-3-319-77115-1},
32
+ doi = {10.1007/978-3-319-77116-8_8}
33
+ }
34
+ """
35
+
36
+
37
+ _DESCRIPTION = """\
38
+ Dataset of 10065 tweets in Arabic for Emotion detection in Arabic text"""
39
+
40
+
41
+ _HOMEPAGE = "https://github.com/AmrMehasseb/Emotional-Tone"
42
+
43
+
44
+ _DOWNLOAD_URL = "https://raw.githubusercontent.com/AmrMehasseb/Emotional-Tone/master/Emotional-Tone-Dataset.csv"
45
+
46
+
47
+ class EmotoneAr(datasets.GeneratorBasedBuilder):
48
+ """Dataset of 10065 tweets in Arabic for Emotions detection in Arabic text"""
49
+
50
+ def _info(self):
51
+ return datasets.DatasetInfo(
52
+ description=_DESCRIPTION,
53
+ features=datasets.Features(
54
+ {
55
+ "tweet": datasets.Value("string"),
56
+ "label": datasets.features.ClassLabel(
57
+ names=["none", "anger", "joy", "sadness", "love", "sympathy", "surprise", "fear"]
58
+ ),
59
+ }
60
+ ),
61
+ homepage=_HOMEPAGE,
62
+ citation=_CITATION,
63
+ )
64
+
65
+ def _split_generators(self, dl_manager):
66
+ """Returns SplitGenerators."""
67
+ data_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
68
+ return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir})]
69
+
70
+ def _generate_examples(self, filepath):
71
+ """Generate labeled arabic tweets examples for emoptions detection."""
72
+ with open(filepath, encoding="utf-8", mode="r") as csv_file:
73
+ next(csv_file) # skip header
74
+ csv_reader = csv.reader(csv_file, quotechar='"', delimiter=",")
75
+
76
+ for id_, row in enumerate(csv_reader):
77
+ _, tweet, label = row
78
+ yield id_, {"tweet": tweet, "label": label}