Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
sentiment-classification
Languages:
Swedish
Size:
100K - 1M
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
- swedish_reviews.py +2 -0
dataset_infos.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"plain_text": {"description": "Swedish reviews scarped from various public available websites", "citation": "", "homepage": "https://github.com/timpal0l/swedish-sentiment", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["negative", "positive"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "swedish_reviews", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 6296541, "num_examples": 20697, "dataset_name": "swedish_reviews"}, "validation": {"name": "validation", "num_bytes": 6359227, "num_examples": 20696, "dataset_name": "swedish_reviews"}, "train": {"name": "train", "num_bytes": 18842891, "num_examples": 62089, "dataset_name": "swedish_reviews"}}, "download_checksums": {"https://raw.githubusercontent.com/timpal0l/swedish-sentiment/main/swedish_sentiment.zip": {"num_bytes": 11841056, "checksum": "1bf3b7111af2bd1c43b30e32201d35b70ebacb80cd505666383142183e46ca98"}}, "download_size": 11841056, "post_processing_size": null, "dataset_size": 31498659, "size_in_bytes": 43339715}}
|
|
|
1 |
+
{"plain_text": {"description": "Swedish reviews scarped from various public available websites", "citation": "", "homepage": "https://github.com/timpal0l/swedish-sentiment", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": ["negative", "positive"], "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": ["negative", "positive"]}], "builder_name": "swedish_reviews", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 6296541, "num_examples": 20697, "dataset_name": "swedish_reviews"}, "validation": {"name": "validation", "num_bytes": 6359227, "num_examples": 20696, "dataset_name": "swedish_reviews"}, "train": {"name": "train", "num_bytes": 18842891, "num_examples": 62089, "dataset_name": "swedish_reviews"}}, "download_checksums": {"https://raw.githubusercontent.com/timpal0l/swedish-sentiment/main/swedish_sentiment.zip": {"num_bytes": 11841056, "checksum": "1bf3b7111af2bd1c43b30e32201d35b70ebacb80cd505666383142183e46ca98"}}, "download_size": 11841056, "post_processing_size": null, "dataset_size": 31498659, "size_in_bytes": 43339715}}
|
swedish_reviews.py
CHANGED
@@ -20,6 +20,7 @@ import csv
|
|
20 |
import os
|
21 |
|
22 |
import datasets
|
|
|
23 |
|
24 |
|
25 |
_DOWNLOAD_URL = "https://raw.githubusercontent.com/timpal0l/swedish-sentiment/main/swedish_sentiment.zip"
|
@@ -50,6 +51,7 @@ class SwedishReviews(datasets.GeneratorBasedBuilder):
|
|
50 |
supervised_keys=None,
|
51 |
homepage="https://github.com/timpal0l/swedish-sentiment",
|
52 |
citation=_CITATION,
|
|
|
53 |
)
|
54 |
|
55 |
def _split_generators(self, dl_manager):
|
|
|
20 |
import os
|
21 |
|
22 |
import datasets
|
23 |
+
from datasets.tasks import TextClassification
|
24 |
|
25 |
|
26 |
_DOWNLOAD_URL = "https://raw.githubusercontent.com/timpal0l/swedish-sentiment/main/swedish_sentiment.zip"
|
|
|
51 |
supervised_keys=None,
|
52 |
homepage="https://github.com/timpal0l/swedish-sentiment",
|
53 |
citation=_CITATION,
|
54 |
+
task_templates=[TextClassification(text_column="text", label_column="label")],
|
55 |
)
|
56 |
|
57 |
def _split_generators(self, dl_manager):
|