Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Arabic
Size:
100K - 1M
License:
Commit
•
29b683a
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 +134 -0
- dataset_infos.json +1 -0
- dummy/plain_text/1.0.0/dummy_data.zip +3 -0
- hard.py +104 -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,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- 10k<n<100k
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- text-classification
|
18 |
+
task_ids:
|
19 |
+
- multi-class-classification
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card for Hard
|
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 |
+
|
49 |
+
- **Homepage:** [Hard](https://github.com/elnagara/HARD-Arabic-Dataset)
|
50 |
+
- **Repository:** [Hard](https://github.com/elnagara/HARD-Arabic-Dataset)
|
51 |
+
- **Paper:** [Hotel Arabic-Reviews Dataset Construction for Sentiment Analysis Applications](https://link.springer.com/chapter/10.1007/978-3-319-67056-0_3)
|
52 |
+
- **Point of Contact:** [Ashraf Elnagar]([email protected])
|
53 |
+
|
54 |
+
### Dataset Summary
|
55 |
+
|
56 |
+
This dataset contains 93,700 hotel reviews in Arabic language.The hotel reviews were collected from Booking.com website during June/July 2016.The reviews are expressed in Modern Standard Arabic as well as dialectal Arabic.The following table summarize some tatistics on the HARD Dataset.
|
57 |
+
|
58 |
+
### Supported Tasks and Leaderboards
|
59 |
+
|
60 |
+
[More Information Needed]
|
61 |
+
|
62 |
+
### Languages
|
63 |
+
|
64 |
+
The dataset is based on Arabic.
|
65 |
+
|
66 |
+
## Dataset Structure
|
67 |
+
|
68 |
+
### Data Instances
|
69 |
+
|
70 |
+
A typical data point comprises a rating from 1 to 5 for hotels.
|
71 |
+
|
72 |
+
### Data Fields
|
73 |
+
|
74 |
+
[More Information Needed]
|
75 |
+
|
76 |
+
### Data Splits
|
77 |
+
|
78 |
+
The dataset is not split.
|
79 |
+
|
80 |
+
## Dataset Creation
|
81 |
+
|
82 |
+
### Curation Rationale
|
83 |
+
|
84 |
+
[More Information Needed]
|
85 |
+
|
86 |
+
### Source Data
|
87 |
+
|
88 |
+
#### Initial Data Collection and Normalization
|
89 |
+
|
90 |
+
[More Information Needed]
|
91 |
+
|
92 |
+
#### Who are the source language producers?
|
93 |
+
|
94 |
+
[More Information Needed]
|
95 |
+
|
96 |
+
### Annotations
|
97 |
+
|
98 |
+
#### Annotation process
|
99 |
+
|
100 |
+
[More Information Needed]
|
101 |
+
|
102 |
+
#### Who are the annotators?
|
103 |
+
|
104 |
+
[More Information Needed]
|
105 |
+
|
106 |
+
### Personal and Sensitive Information
|
107 |
+
|
108 |
+
[More Information Needed]
|
109 |
+
|
110 |
+
## Considerations for Using the Data
|
111 |
+
|
112 |
+
### Social Impact of Dataset
|
113 |
+
|
114 |
+
[More Information Needed]
|
115 |
+
|
116 |
+
### Discussion of Biases
|
117 |
+
|
118 |
+
[More Information Needed]
|
119 |
+
|
120 |
+
### Other Known Limitations
|
121 |
+
|
122 |
+
[More Information Needed]
|
123 |
+
|
124 |
+
## Additional Information
|
125 |
+
|
126 |
+
### Dataset Curators
|
127 |
+
|
128 |
+
[More Information Needed]
|
129 |
+
|
130 |
+
### Licensing Information
|
131 |
+
|
132 |
+
[More Information Needed]
|
133 |
+
|
134 |
+
### Citation Information
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"plain_text": {"description": "This dataset contains 93700 hotel reviews in Arabic language.The hotel reviews were collected from Booking.com website during June/July 2016.The reviews are expressed in Modern Standard Arabic as well as dialectal Arabic.The following table summarize some tatistics on the HARD Dataset.\n", "citation": "@incollection{elnagar2018hotel,\n title={Hotel Arabic-reviews dataset construction for sentiment analysis applications},\n author={Elnagar, Ashraf and Khalifa, Yasmin S and Einea, Anas},\n booktitle={Intelligent Natural Language Processing: Trends and Applications},\n pages={35--52},\n year={2018},\n publisher={Springer}\n}\n", "homepage": "https://github.com/elnagara/HARD-Arabic-Dataset", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 5, "names": ["1", "2", "3", "4", "5"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "hard", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 27507085, "num_examples": 105698, "dataset_name": "hard"}}, "download_checksums": {"https://raw.githubusercontent.com/elnagara/HARD-Arabic-Dataset/master/data/balanced-reviews.zip": {"num_bytes": 8508677, "checksum": "1939c1ca59ff50bd3887223b153c7fb5c9fd232b405320244c55791bc8b5d448"}}, "download_size": 8508677, "post_processing_size": null, "dataset_size": 27507085, "size_in_bytes": 36015762}}
|
dummy/plain_text/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3db1abfa2e9cc8a6bfb3c5598a2a8138c6c6dca8a6c4c2ea406b23bf3b3194a
|
3 |
+
size 556
|
hard.py
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
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 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
"""Hotel Reviews in Arabic language"""
|
18 |
+
|
19 |
+
from __future__ import absolute_import, division, print_function
|
20 |
+
|
21 |
+
import os
|
22 |
+
|
23 |
+
import datasets
|
24 |
+
|
25 |
+
|
26 |
+
_DESCRIPTION = """\
|
27 |
+
This dataset contains 93700 hotel reviews in Arabic language.\
|
28 |
+
The hotel reviews were collected from Booking.com website during June/July 2016.\
|
29 |
+
The reviews are expressed in Modern Standard Arabic as well as dialectal Arabic.\
|
30 |
+
The following table summarize some tatistics on the HARD Dataset.
|
31 |
+
"""
|
32 |
+
|
33 |
+
_CITATION = """\
|
34 |
+
@incollection{elnagar2018hotel,
|
35 |
+
title={Hotel Arabic-reviews dataset construction for sentiment analysis applications},
|
36 |
+
author={Elnagar, Ashraf and Khalifa, Yasmin S and Einea, Anas},
|
37 |
+
booktitle={Intelligent Natural Language Processing: Trends and Applications},
|
38 |
+
pages={35--52},
|
39 |
+
year={2018},
|
40 |
+
publisher={Springer}
|
41 |
+
}
|
42 |
+
"""
|
43 |
+
|
44 |
+
_DOWNLOAD_URL = "https://raw.githubusercontent.com/elnagara/HARD-Arabic-Dataset/master/data/balanced-reviews.zip"
|
45 |
+
|
46 |
+
|
47 |
+
class HardConfig(datasets.BuilderConfig):
|
48 |
+
"""BuilderConfig for Hard."""
|
49 |
+
|
50 |
+
def __init__(self, **kwargs):
|
51 |
+
"""BuilderConfig for Hard.
|
52 |
+
|
53 |
+
Args:
|
54 |
+
**kwargs: keyword arguments forwarded to super.
|
55 |
+
"""
|
56 |
+
super(HardConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
57 |
+
|
58 |
+
|
59 |
+
class Hard(datasets.GeneratorBasedBuilder):
|
60 |
+
"""Hard dataset."""
|
61 |
+
|
62 |
+
BUILDER_CONFIGS = [
|
63 |
+
HardConfig(
|
64 |
+
name="plain_text",
|
65 |
+
description="Plain text",
|
66 |
+
)
|
67 |
+
]
|
68 |
+
|
69 |
+
def _info(self):
|
70 |
+
return datasets.DatasetInfo(
|
71 |
+
description=_DESCRIPTION,
|
72 |
+
features=datasets.Features(
|
73 |
+
{
|
74 |
+
"text": datasets.Value("string"),
|
75 |
+
"label": datasets.features.ClassLabel(
|
76 |
+
names=[
|
77 |
+
"1",
|
78 |
+
"2",
|
79 |
+
"3",
|
80 |
+
"4",
|
81 |
+
"5",
|
82 |
+
]
|
83 |
+
),
|
84 |
+
}
|
85 |
+
),
|
86 |
+
supervised_keys=None,
|
87 |
+
homepage="https://github.com/elnagara/HARD-Arabic-Dataset",
|
88 |
+
citation=_CITATION,
|
89 |
+
)
|
90 |
+
|
91 |
+
def _split_generators(self, dl_manager):
|
92 |
+
data_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
|
93 |
+
return [
|
94 |
+
datasets.SplitGenerator(
|
95 |
+
name=datasets.Split.TRAIN, gen_kwargs={"directory": os.path.join(data_dir, "balanced-reviews.txt")}
|
96 |
+
),
|
97 |
+
]
|
98 |
+
|
99 |
+
def _generate_examples(self, directory):
|
100 |
+
"""Generate examples."""
|
101 |
+
with open(directory, mode="r", encoding="utf-16") as file:
|
102 |
+
for id_, line in enumerate(file.read().splitlines()[1:]):
|
103 |
+
_, _, rating, _, _, _, review_text = line.split("\t")
|
104 |
+
yield str(id_), {"text": review_text, "label": rating}
|