Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Arabic
Size:
100K - 1M
License:
Commit
·
7a48373
1
Parent(s):
8c5082b
Update parquet files
Browse files- .gitattributes +0 -27
- README.md +0 -161
- dataset_infos.json +0 -1
- hard.py +0 -105
- plain_text/hard-train.parquet +3 -0
.gitattributes
DELETED
|
@@ -1,27 +0,0 @@
|
|
| 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
DELETED
|
@@ -1,161 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
annotations_creators:
|
| 3 |
-
- found
|
| 4 |
-
language_creators:
|
| 5 |
-
- found
|
| 6 |
-
language:
|
| 7 |
-
- ar
|
| 8 |
-
license:
|
| 9 |
-
- unknown
|
| 10 |
-
multilinguality:
|
| 11 |
-
- monolingual
|
| 12 |
-
size_categories:
|
| 13 |
-
- 100K<n<1M
|
| 14 |
-
source_datasets:
|
| 15 |
-
- original
|
| 16 |
-
task_categories:
|
| 17 |
-
- text-classification
|
| 18 |
-
task_ids:
|
| 19 |
-
- multi-class-classification
|
| 20 |
-
paperswithcode_id: hard
|
| 21 |
-
pretty_name: Hotel Arabic-Reviews Dataset
|
| 22 |
-
dataset_info:
|
| 23 |
-
features:
|
| 24 |
-
- name: text
|
| 25 |
-
dtype: string
|
| 26 |
-
- name: label
|
| 27 |
-
dtype:
|
| 28 |
-
class_label:
|
| 29 |
-
names:
|
| 30 |
-
0: '1'
|
| 31 |
-
1: '2'
|
| 32 |
-
2: '3'
|
| 33 |
-
3: '4'
|
| 34 |
-
4: '5'
|
| 35 |
-
config_name: plain_text
|
| 36 |
-
splits:
|
| 37 |
-
- name: train
|
| 38 |
-
num_bytes: 27507085
|
| 39 |
-
num_examples: 105698
|
| 40 |
-
download_size: 8508677
|
| 41 |
-
dataset_size: 27507085
|
| 42 |
-
---
|
| 43 |
-
|
| 44 |
-
# Dataset Card for Hard
|
| 45 |
-
|
| 46 |
-
## Table of Contents
|
| 47 |
-
- [Dataset Description](#dataset-description)
|
| 48 |
-
- [Dataset Summary](#dataset-summary)
|
| 49 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
| 50 |
-
- [Languages](#languages)
|
| 51 |
-
- [Dataset Structure](#dataset-structure)
|
| 52 |
-
- [Data Instances](#data-instances)
|
| 53 |
-
- [Data Fields](#data-fields)
|
| 54 |
-
- [Data Splits](#data-splits)
|
| 55 |
-
- [Dataset Creation](#dataset-creation)
|
| 56 |
-
- [Curation Rationale](#curation-rationale)
|
| 57 |
-
- [Source Data](#source-data)
|
| 58 |
-
- [Annotations](#annotations)
|
| 59 |
-
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
| 60 |
-
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
| 61 |
-
- [Social Impact of Dataset](#social-impact-of-dataset)
|
| 62 |
-
- [Discussion of Biases](#discussion-of-biases)
|
| 63 |
-
- [Other Known Limitations](#other-known-limitations)
|
| 64 |
-
- [Additional Information](#additional-information)
|
| 65 |
-
- [Dataset Curators](#dataset-curators)
|
| 66 |
-
- [Licensing Information](#licensing-information)
|
| 67 |
-
- [Citation Information](#citation-information)
|
| 68 |
-
- [Contributions](#contributions)
|
| 69 |
-
|
| 70 |
-
## Dataset Description
|
| 71 |
-
|
| 72 |
-
- **Homepage:** [Hard](https://github.com/elnagara/HARD-Arabic-Dataset)
|
| 73 |
-
- **Repository:** [Hard](https://github.com/elnagara/HARD-Arabic-Dataset)
|
| 74 |
-
- **Paper:** [Hotel Arabic-Reviews Dataset Construction for Sentiment Analysis Applications](https://link.springer.com/chapter/10.1007/978-3-319-67056-0_3)
|
| 75 |
-
- **Point of Contact:** [Ashraf Elnagar](ashraf@sharjah.ac.ae)
|
| 76 |
-
|
| 77 |
-
### Dataset Summary
|
| 78 |
-
|
| 79 |
-
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.
|
| 80 |
-
|
| 81 |
-
### Supported Tasks and Leaderboards
|
| 82 |
-
|
| 83 |
-
[More Information Needed]
|
| 84 |
-
|
| 85 |
-
### Languages
|
| 86 |
-
|
| 87 |
-
The dataset is based on Arabic.
|
| 88 |
-
|
| 89 |
-
## Dataset Structure
|
| 90 |
-
|
| 91 |
-
### Data Instances
|
| 92 |
-
|
| 93 |
-
A typical data point comprises a rating from 1 to 5 for hotels.
|
| 94 |
-
|
| 95 |
-
### Data Fields
|
| 96 |
-
|
| 97 |
-
[More Information Needed]
|
| 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 |
-
#### 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 |
-
#### Annotation process
|
| 122 |
-
|
| 123 |
-
[More Information Needed]
|
| 124 |
-
|
| 125 |
-
#### Who are the annotators?
|
| 126 |
-
|
| 127 |
-
[More Information Needed]
|
| 128 |
-
|
| 129 |
-
### Personal and Sensitive Information
|
| 130 |
-
|
| 131 |
-
[More Information Needed]
|
| 132 |
-
|
| 133 |
-
## Considerations for Using the Data
|
| 134 |
-
|
| 135 |
-
### Social Impact of Dataset
|
| 136 |
-
|
| 137 |
-
[More Information Needed]
|
| 138 |
-
|
| 139 |
-
### Discussion of 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 |
-
### Contributions
|
| 160 |
-
|
| 161 |
-
Thanks to [@zaidalyafeai](https://github.com/zaidalyafeai) for adding this dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataset_infos.json
DELETED
|
@@ -1 +0,0 @@
|
|
| 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, "task_templates": [{"task": "text-classification", "text_column": "text", "label_column": "label", "labels": ["1", "2", "3", "4", "5"]}], "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}}
|
|
|
|
|
|
hard.py
DELETED
|
@@ -1,105 +0,0 @@
|
|
| 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 |
-
|
| 20 |
-
import os
|
| 21 |
-
|
| 22 |
-
import datasets
|
| 23 |
-
from datasets.tasks import TextClassification
|
| 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 |
-
task_templates=[TextClassification(text_column="text", label_column="label")],
|
| 90 |
-
)
|
| 91 |
-
|
| 92 |
-
def _split_generators(self, dl_manager):
|
| 93 |
-
data_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
|
| 94 |
-
return [
|
| 95 |
-
datasets.SplitGenerator(
|
| 96 |
-
name=datasets.Split.TRAIN, gen_kwargs={"directory": os.path.join(data_dir, "balanced-reviews.txt")}
|
| 97 |
-
),
|
| 98 |
-
]
|
| 99 |
-
|
| 100 |
-
def _generate_examples(self, directory):
|
| 101 |
-
"""Generate examples."""
|
| 102 |
-
with open(directory, mode="r", encoding="utf-16") as file:
|
| 103 |
-
for id_, line in enumerate(file.read().splitlines()[1:]):
|
| 104 |
-
_, _, rating, _, _, _, review_text = line.split("\t")
|
| 105 |
-
yield str(id_), {"text": review_text, "label": rating}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plain_text/hard-train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2085b218e8ab11306169796f3b67130cd7aedf7cd75e92266c6c8d4e09df4c4e
|
| 3 |
+
size 13607960
|