Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
Arabic
Size:
1K - 10K
License:
Commit
•
b8efa50
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +170 -0
- ar_res_reviews.py +86 -0
- dataset_infos.json +1 -0
- dummy/0.0.0/dummy_data.zip +3 -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,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- sentiment-classification
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for ArRestReviews
|
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:** [Large Arabic Sentiment Analysis Resources](https://github.com/hadyelsahar/large-arabic-sentiment-analysis-resouces)
|
49 |
+
- **Repository:** [Large Arabic Sentiment Analysis Resources](https://github.com/hadyelsahar/large-arabic-sentiment-analysis-resouces)
|
50 |
+
- **Paper:** [ Building Large Arabic Multi-domain Resources for Sentiment Analysis](https://github.com/hadyelsahar/large-arabic-sentiment-analysis-resouces/blob/master/Paper%20-%20Building%20Large%20Arabic%20Multi-domain%20Resources%20for%20Sentiment%20Analysis.pdf)
|
51 |
+
- **Point of Contact:** [hady elsahar]([email protected])
|
52 |
+
|
53 |
+
### Dataset Summary
|
54 |
+
|
55 |
+
Dataset of 8364 restaurant reviews from qaym.com in Arabic for sentiment analysis
|
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 |
+
A typical data point comprises of the following:
|
70 |
+
|
71 |
+
- "polarity": which is a string value of either 0 or 1 indicating the sentiment around the review
|
72 |
+
|
73 |
+
- "text": is the review plain text of a restaurant in Arabic
|
74 |
+
|
75 |
+
- "restaurant_id": the restaurant ID on the website
|
76 |
+
|
77 |
+
- "user_id": the user ID on the website
|
78 |
+
|
79 |
+
example:
|
80 |
+
```
|
81 |
+
{
|
82 |
+
'polarity': 0, # negative
|
83 |
+
'restaurant_id': '1412',
|
84 |
+
'text': 'عادي جدا مامن زود',
|
85 |
+
'user_id': '21294'
|
86 |
+
}
|
87 |
+
```
|
88 |
+
|
89 |
+
### Data Fields
|
90 |
+
|
91 |
+
- "polarity": is a string value of either 0 or 1 indicating the sentiment around the review
|
92 |
+
|
93 |
+
- "text": is the review plain text of a restaurant in Arabic
|
94 |
+
|
95 |
+
- "restaurant_id": the restaurant ID on the website (string)
|
96 |
+
|
97 |
+
- "user_id": the user ID on the website (string)
|
98 |
+
|
99 |
+
### Data Splits
|
100 |
+
|
101 |
+
The dataset is not split.
|
102 |
+
|
103 |
+
## Dataset Creation
|
104 |
+
|
105 |
+
### Curation Rationale
|
106 |
+
|
107 |
+
[More Information Needed]
|
108 |
+
|
109 |
+
### Source Data
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
#### Initial Data Collection and Normalization
|
114 |
+
|
115 |
+
Contains 8364 restaurant reviews from qaym.com
|
116 |
+
|
117 |
+
#### Who are the source language producers?
|
118 |
+
|
119 |
+
From tweeter.
|
120 |
+
|
121 |
+
### Annotations
|
122 |
+
|
123 |
+
The polarity field provides a label of 1 or -1 pertaining to the sentiment of the review
|
124 |
+
|
125 |
+
#### Annotation process
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
#### Who are the annotators?
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
### Personal and Sensitive Information
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
## Considerations for Using the Data
|
138 |
+
|
139 |
+
### Discussion of Social Impact and Biases
|
140 |
+
|
141 |
+
[More Information Needed]
|
142 |
+
|
143 |
+
### Other Known Limitations
|
144 |
+
|
145 |
+
[More Information Needed]
|
146 |
+
|
147 |
+
## Additional Information
|
148 |
+
|
149 |
+
### Dataset Curators
|
150 |
+
|
151 |
+
[More Information Needed]
|
152 |
+
|
153 |
+
### Licensing Information
|
154 |
+
|
155 |
+
[More Information Needed]
|
156 |
+
|
157 |
+
### Citation Information
|
158 |
+
|
159 |
+
@InProceedings{10.1007/978-3-319-18117-2_2,
|
160 |
+
author="ElSahar, Hady
|
161 |
+
and El-Beltagy, Samhaa R.",
|
162 |
+
editor="Gelbukh, Alexander",
|
163 |
+
title="Building Large Arabic Multi-domain Resources for Sentiment Analysis",
|
164 |
+
booktitle="Computational Linguistics and Intelligent Text Processing",
|
165 |
+
year="2015",
|
166 |
+
publisher="Springer International Publishing",
|
167 |
+
address="Cham",
|
168 |
+
pages="23--34",
|
169 |
+
isbn="978-3-319-18117-2"
|
170 |
+
}
|
ar_res_reviews.py
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 8364 restaurant reviews scrapped from qaym.com in Arabic for sentiment analysis"""
|
16 |
+
|
17 |
+
from __future__ import absolute_import, division, print_function
|
18 |
+
|
19 |
+
import csv
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
|
24 |
+
_CITATION = """\
|
25 |
+
@InProceedings{10.1007/978-3-319-18117-2_2,
|
26 |
+
author="ElSahar, Hady
|
27 |
+
and El-Beltagy, Samhaa R.",
|
28 |
+
editor="Gelbukh, Alexander",
|
29 |
+
title="Building Large Arabic Multi-domain Resources for Sentiment Analysis",
|
30 |
+
booktitle="Computational Linguistics and Intelligent Text Processing",
|
31 |
+
year="2015",
|
32 |
+
publisher="Springer International Publishing",
|
33 |
+
address="Cham",
|
34 |
+
pages="23--34",
|
35 |
+
isbn="978-3-319-18117-2"
|
36 |
+
}
|
37 |
+
"""
|
38 |
+
|
39 |
+
_DESCRIPTION = """\
|
40 |
+
Dataset of 8364 restaurant reviews scrapped from qaym.com in Arabic for sentiment analysis
|
41 |
+
"""
|
42 |
+
|
43 |
+
_HOMEPAGE = "https://github.com/hadyelsahar/large-arabic-sentiment-analysis-resouces"
|
44 |
+
|
45 |
+
_DOWNLOAD_URL = (
|
46 |
+
"https://raw.githubusercontent.com/hadyelsahar/large-arabic-sentiment-analysis-resouces/master/datasets/RES1.csv"
|
47 |
+
)
|
48 |
+
|
49 |
+
|
50 |
+
class ArResReviews(datasets.GeneratorBasedBuilder):
|
51 |
+
"""Dataset of 8364 restaurant reviews in Arabic for sentiment analysis"""
|
52 |
+
|
53 |
+
def _info(self):
|
54 |
+
return datasets.DatasetInfo(
|
55 |
+
description=_DESCRIPTION,
|
56 |
+
features=datasets.Features(
|
57 |
+
{
|
58 |
+
"polarity": datasets.ClassLabel(names=["negative", "positive"]),
|
59 |
+
"text": datasets.Value("string"),
|
60 |
+
"restaurant_id": datasets.Value("string"),
|
61 |
+
"user_id": datasets.Value("string"),
|
62 |
+
}
|
63 |
+
),
|
64 |
+
homepage=_HOMEPAGE,
|
65 |
+
citation=_CITATION,
|
66 |
+
)
|
67 |
+
|
68 |
+
def _split_generators(self, dl_manager):
|
69 |
+
"""Returns SplitGenerators."""
|
70 |
+
|
71 |
+
data_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
|
72 |
+
return [
|
73 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir}),
|
74 |
+
]
|
75 |
+
|
76 |
+
def _generate_examples(self, filepath):
|
77 |
+
"""Generate arabic restaurant reviews examples."""
|
78 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
79 |
+
next(csv_file)
|
80 |
+
csv_reader = csv.reader(
|
81 |
+
csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
|
82 |
+
)
|
83 |
+
for id_, row in enumerate(csv_reader):
|
84 |
+
polarity, text, restaurant_id, user_id = row
|
85 |
+
polarity = "negative" if polarity == "-1" else "positive"
|
86 |
+
yield id_, {"polarity": polarity, "text": text, "restaurant_id": restaurant_id, "user_id": user_id}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "Dataset of 8364 restaurant reviews scrapped from qaym.com in Arabic for sentiment analysis\n", "citation": "@InProceedings{10.1007/978-3-319-18117-2_2,\nauthor=\"ElSahar, Hady\nand El-Beltagy, Samhaa R.\",\neditor=\"Gelbukh, Alexander\",\ntitle=\"Building Large Arabic Multi-domain Resources for Sentiment Analysis\",\nbooktitle=\"Computational Linguistics and Intelligent Text Processing\",\nyear=\"2015\",\npublisher=\"Springer International Publishing\",\naddress=\"Cham\",\npages=\"23--34\",\nisbn=\"978-3-319-18117-2\"\n}\n", "homepage": "https://github.com/hadyelsahar/large-arabic-sentiment-analysis-resouces", "license": "", "features": {"polarity": {"num_classes": 2, "names": ["negative", "positive"], "names_file": null, "id": null, "_type": "ClassLabel"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "restaurant_id": {"dtype": "string", "id": null, "_type": "Value"}, "user_id": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "ar_res_reviews", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3617097, "num_examples": 8364, "dataset_name": "ar_res_reviews"}}, "download_checksums": {"https://raw.githubusercontent.com/hadyelsahar/large-arabic-sentiment-analysis-resouces/master/datasets/RES1.csv": {"num_bytes": 3503230, "checksum": "afdb587d41310302372ed154a91a7231f566c137cadeea9df166e7326c2c4b19"}}, "download_size": 3503230, "post_processing_size": null, "dataset_size": 3617097, "size_in_bytes": 7120327}}
|
dummy/0.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:36d466c8f0d2fc307893971a21f114e8c2716554ad5e46e83fd642f791acac81
|
3 |
+
size 631
|