Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
Thai
Size:
10K - 100K
License:
Update files from the datasets library (from 1.8.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.8.0
- dataset_infos.json +1 -1
- wongnai_reviews.py +2 -0
dataset_infos.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"default": {"description": "Wongnai's review dataset contains restaurant reviews and ratings, mainly in Thai language.\nThe reviews are in 5 classes ranging from 1 to 5 stars.\n", "citation": "", "homepage": "https://github.com/wongnai/wongnai-corpus", "license": "LGPL-3.0", "features": {"review_body": {"dtype": "string", "id": null, "_type": "Value"}, "star_rating": {"num_classes": 5, "names": ["1", "2", "3", "4", "5"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "wongnai_reviews", "config_name": "default", "version": {"version_str": "1.0.1", "description": null, "major": 1, "minor": 0, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 60691428, "num_examples": 40000, "dataset_name": "wongnai_reviews"}, "test": {"name": "test", "num_bytes": 9913686, "num_examples": 6203, "dataset_name": "wongnai_reviews"}}, "download_checksums": {"https://archive.org/download/wongnai_reviews/wongnai_reviews_withtest.zip": {"num_bytes": 16556587, "checksum": "d3d1de39d28346023db55f2a97735be667dae8480ab765a1764138c5cec17b36"}}, "download_size": 16556587, "post_processing_size": null, "dataset_size": 70605114, "size_in_bytes": 87161701}}
|
|
|
1 |
+
{"default": {"description": "Wongnai's review dataset contains restaurant reviews and ratings, mainly in Thai language.\nThe reviews are in 5 classes ranging from 1 to 5 stars.\n", "citation": "", "homepage": "https://github.com/wongnai/wongnai-corpus", "license": "LGPL-3.0", "features": {"review_body": {"dtype": "string", "id": null, "_type": "Value"}, "star_rating": {"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": "review_body", "label_column": "star_rating", "labels": ["1", "2", "3", "4", "5"]}], "builder_name": "wongnai_reviews", "config_name": "default", "version": {"version_str": "1.0.1", "description": null, "major": 1, "minor": 0, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 60691428, "num_examples": 40000, "dataset_name": "wongnai_reviews"}, "test": {"name": "test", "num_bytes": 9913686, "num_examples": 6203, "dataset_name": "wongnai_reviews"}}, "download_checksums": {"https://archive.org/download/wongnai_reviews/wongnai_reviews_withtest.zip": {"num_bytes": 16556587, "checksum": "d3d1de39d28346023db55f2a97735be667dae8480ab765a1764138c5cec17b36"}}, "download_size": 16556587, "post_processing_size": null, "dataset_size": 70605114, "size_in_bytes": 87161701}}
|
wongnai_reviews.py
CHANGED
@@ -19,6 +19,7 @@ import csv
|
|
19 |
import os
|
20 |
|
21 |
import datasets
|
|
|
22 |
|
23 |
|
24 |
# no BibTeX citation
|
@@ -51,6 +52,7 @@ class WongnaiReviews(datasets.GeneratorBasedBuilder):
|
|
51 |
homepage="https://github.com/wongnai/wongnai-corpus",
|
52 |
license=_LICENSE,
|
53 |
citation=_CITATION,
|
|
|
54 |
)
|
55 |
|
56 |
def _split_generators(self, dl_manager):
|
|
|
19 |
import os
|
20 |
|
21 |
import datasets
|
22 |
+
from datasets.tasks import TextClassification
|
23 |
|
24 |
|
25 |
# no BibTeX citation
|
|
|
52 |
homepage="https://github.com/wongnai/wongnai-corpus",
|
53 |
license=_LICENSE,
|
54 |
citation=_CITATION,
|
55 |
+
task_templates=[TextClassification(text_column="review_body", label_column="star_rating")],
|
56 |
)
|
57 |
|
58 |
def _split_generators(self, dl_manager):
|