system HF staff commited on
Commit
4567927
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 +158 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.1.0/dummy_data.zip +3 -0
  5. roman_urdu.py +93 -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,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - ur
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - sentiment-classification
20
+ ---
21
+
22
+ # Dataset Card for Roman Urdu Dataset
23
+
24
+ ## Table of Contents
25
+
26
+ - [Dataset Description](#dataset-description)
27
+ - [Dataset Summary](#dataset-summary)
28
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
29
+ - [Languages](#languages)
30
+ - [Dataset Structure](#dataset-structure)
31
+ - [Data Instances](#data-instances)
32
+ - [Data Fields](#data-instances)
33
+ - [Data Splits](#data-instances)
34
+ - [Dataset Creation](#dataset-creation)
35
+ - [Curation Rationale](#curation-rationale)
36
+ - [Source Data](#source-data)
37
+ - [Annotations](#annotations)
38
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
39
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
40
+ - [Social Impact of Dataset](#social-impact-of-dataset)
41
+ - [Discussion of Biases](#discussion-of-biases)
42
+ - [Other Known Limitations](#other-known-limitations)
43
+ - [Additional Information](#additional-information)
44
+ - [Dataset Curators](#dataset-curators)
45
+ - [Licensing Information](#licensing-information)
46
+ - [Citation Information](#citation-information)
47
+
48
+ ## Dataset Description
49
+
50
+ - **Repository:** [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets/Roman+Urdu+Data+Set)
51
+ - **Point of Contact:** [Zareen Sharf](mailto:zareensharf76@gmail.com)
52
+
53
+ ### Dataset Summary
54
+
55
+ [More Information Needed]
56
+
57
+ ### Supported Tasks and Leaderboards
58
+
59
+ [More Information Needed]
60
+
61
+ ### Languages
62
+
63
+ Urdu
64
+
65
+ ## Dataset Structure
66
+
67
+ [More Information Needed]
68
+
69
+ ### Data Instances
70
+
71
+ ```
72
+ Wah je wah,Positive,
73
+ ```
74
+
75
+ ### Data Fields
76
+
77
+ Each row consists of a short Urdu text, followed by a sentiment label. The labels are one of `Positive`, `Negative`, and `Neutral`. Note that the original source file is a comma-separated values file.
78
+
79
+ * `sentence`: A short Urdu text
80
+ * `label`: One of `Positive`, `Negative`, and `Neutral`, indicating the polarity of the sentiment expressed in the sentence
81
+
82
+ ## Dataset Creation
83
+
84
+ ### Curation Rationale
85
+
86
+ [More Information Needed]
87
+
88
+ ### Source Data
89
+
90
+ [More Information Needed]
91
+
92
+ #### Initial Data Collection and Normalization
93
+
94
+ [More Information Needed]
95
+
96
+ #### Who are the source language producers?
97
+
98
+ [More Information Needed]
99
+
100
+ ### Annotations
101
+
102
+ #### Annotation process
103
+
104
+ [More Information Needed]
105
+
106
+ #### Who are the annotators?
107
+
108
+ [More Information Needed]
109
+
110
+ ### Personal and Sensitive Information
111
+
112
+ [More Information Needed]
113
+
114
+ ## Considerations for Using the Data
115
+
116
+ ### Social Impact of Dataset
117
+
118
+ [More Information Needed]
119
+
120
+ ### Discussion of Biases
121
+
122
+ [More Information Needed]
123
+
124
+ ### Other Known Limitations
125
+
126
+ [More Information Needed]
127
+
128
+ ## Additional Information
129
+
130
+ ### Dataset Curators
131
+
132
+ [More Information Needed]
133
+
134
+ ### Licensing Information
135
+
136
+ [More Information Needed]
137
+
138
+ ### Citation Information
139
+
140
+ ```
141
+ @InProceedings{Sharf:2018,
142
+ title = "Performing Natural Language Processing on Roman Urdu Datasets",
143
+ authors = "Zareen Sharf and Saif Ur Rahman",
144
+ booktitle = "International Journal of Computer Science and Network Security",
145
+ volume = "18",
146
+ number = "1",
147
+ pages = "141-148",
148
+ year = "2018"
149
+ }
150
+
151
+ @misc{Dua:2019,
152
+ author = "Dua, Dheeru and Graff, Casey",
153
+ year = "2017",
154
+ title = "{UCI} Machine Learning Repository",
155
+ url = "http://archive.ics.uci.edu/ml",
156
+ institution = "University of California, Irvine, School of Information and Computer Sciences"
157
+ }
158
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "This is an extensive compilation of Roman Urdu Dataset (Urdu written in Latin/Roman script) tagged for sentiment analysis.\n", "citation": "@InProceedings{Sharf:2018,\ntitle = \"Performing Natural Language Processing on Roman Urdu Datasets\",\nauthors = \"Zareen Sharf and Saif Ur Rahman\",\nbooktitle = \"International Journal of Computer Science and Network Security\",\nvolume = \"18\",\nnumber = \"1\",\npages = \"141-148\",\nyear = \"2018\"\n}\n\n@misc{Dua:2019,\nauthor = \"Dua, Dheeru and Graff, Casey\",\nyear = \"2017\",\ntitle = \"{UCI} Machine Learning Repository\",\nurl = \"http://archive.ics.uci.edu/ml\",\ninstitution = \"University of California, Irvine, School of Information and Computer Sciences\"\n}\n", "homepage": "https://archive.ics.uci.edu/ml/datasets/Roman+Urdu+Data+Set", "license": "", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "sentiment": {"num_classes": 3, "names": ["Positive", "Negative", "Neutral"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "roman_urdu_dataset", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1633423, "num_examples": 20229, "dataset_name": "roman_urdu_dataset"}}, "download_checksums": {"https://archive.ics.uci.edu/ml/machine-learning-databases/00458/Roman%20Urdu%20DataSet.csv": {"num_bytes": 1628349, "checksum": "d9b54d3685b6ef691cb4a2cc0783fc189dcfa0560cca9afec1099b015c798c7c"}}, "download_size": 1628349, "post_processing_size": null, "dataset_size": 1633423, "size_in_bytes": 3261772}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:def524b4fb553a8c1f835ac784007990c00b16a5221042b790c12e42d5b2447f
3
+ size 404
roman_urdu.py ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Roman Urdu data corpus with 20,000 polarity labeled records"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @InProceedings{Sharf:2018,
27
+ title = "Performing Natural Language Processing on Roman Urdu Datasets",
28
+ authors = "Zareen Sharf and Saif Ur Rahman",
29
+ booktitle = "International Journal of Computer Science and Network Security",
30
+ volume = "18",
31
+ number = "1",
32
+ pages = "141-148",
33
+ year = "2018"
34
+ }
35
+
36
+ @misc{Dua:2019,
37
+ author = "Dua, Dheeru and Graff, Casey",
38
+ year = "2017",
39
+ title = "{UCI} Machine Learning Repository",
40
+ url = "http://archive.ics.uci.edu/ml",
41
+ institution = "University of California, Irvine, School of Information and Computer Sciences"
42
+ }
43
+ """
44
+
45
+ _DESCRIPTION = """\
46
+ This is an extensive compilation of Roman Urdu Dataset (Urdu written in Latin/Roman script) tagged for sentiment analysis.
47
+ """
48
+
49
+ _HOMEPAGE = "https://archive.ics.uci.edu/ml/datasets/Roman+Urdu+Data+Set"
50
+
51
+ _URL = "https://archive.ics.uci.edu/ml/machine-learning-databases/00458/Roman%20Urdu%20DataSet.csv"
52
+
53
+
54
+ class RomanUrdu(datasets.GeneratorBasedBuilder):
55
+ """Roman Urdu sentences gathered from reviews of various e-commerce websites, comments on public Facebook pages, and twitter accounts, with positive, neutral, and negative polarity labels per each row."""
56
+
57
+ VERSION = datasets.Version("1.1.0")
58
+
59
+ def _info(self):
60
+ return datasets.DatasetInfo(
61
+ description=_DESCRIPTION,
62
+ features=datasets.Features(
63
+ {
64
+ "sentence": datasets.Value("string"),
65
+ "sentiment": datasets.features.ClassLabel(names=["Positive", "Negative", "Neutral"]),
66
+ }
67
+ ),
68
+ supervised_keys=None,
69
+ homepage=_HOMEPAGE,
70
+ citation=_CITATION,
71
+ )
72
+
73
+ def _split_generators(self, dl_manager):
74
+ data_dir = dl_manager.download_and_extract(_URL)
75
+ return [
76
+ datasets.SplitGenerator(
77
+ name=datasets.Split.TRAIN,
78
+ gen_kwargs={
79
+ "filepath": os.path.join(data_dir),
80
+ "split": "train",
81
+ },
82
+ ),
83
+ ]
84
+
85
+ def _generate_examples(self, filepath, split):
86
+ with open(filepath, encoding="utf-8") as f:
87
+ reader = csv.reader(f, delimiter=",")
88
+ for id_, row in enumerate(reader):
89
+ yield id_, {
90
+ "sentence": row[0],
91
+ # 'Neative' typo in original dataset
92
+ "sentiment": "Negative" if row[1] == "Neative" else row[1],
93
+ }