Datasets:
Tasks:
Text Classification
Sub-tasks:
sentiment-classification
Languages:
English
Size:
1K<n<10K
ArXiv:
License:
import from S3
Browse files- README.md +116 -0
- dataset_infos.json +1 -0
- dummy/1.0.0/dummy_data.zip +0 -0
- norec_agg.py +82 -0
README.md
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- cc-by-4.0
|
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 Creation Guide
|
23 |
+
|
24 |
+
## Table of Contents
|
25 |
+
|
26 |
+
- [Dataset Description](#dataset-description)
|
27 |
+
- [Dataset Summary](#dataset-summary)
|
28 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
29 |
+
- [Languages](#languages)
|
30 |
+
- [Dataset Structure](#dataset-structure)
|
31 |
+
- [Data Instances](#data-instances)
|
32 |
+
- [Data Fields](#data-instances)
|
33 |
+
- [Data Splits](#data-instances)
|
34 |
+
- [Dataset Creation](#dataset-creation)
|
35 |
+
- [Curation Rationale](#curation-rationale)
|
36 |
+
- [Source Data](#source-data)
|
37 |
+
- [Annotations](#annotations)
|
38 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
39 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
40 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
41 |
+
- [Discussion of Biases](#discussion-of-biases)
|
42 |
+
- [Other Known Limitations](#other-known-limitations)
|
43 |
+
- [Additional Information](#additional-information)
|
44 |
+
- [Dataset Curators](#dataset-curators)
|
45 |
+
- [Licensing Information](#licensing-information)
|
46 |
+
- [Citation Information](#citation-information)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:** N/A
|
51 |
+
- **Repository:** [GitHub](https://github.com/ltgoslo/NorBERT/)
|
52 |
+
- **Paper:** [A Fine-grained Sentiment Dataset for Norwegian](https://www.aclweb.org/anthology/2020.lrec-1.618/)
|
53 |
+
- **Leaderboard:** N/A
|
54 |
+
- **Point of Contact:** -
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
Aggregated NoRec_fine: A Fine-grained Sentiment Dataset for Norwegian.
|
59 |
+
This dataset was created by the Nordic Language Processing Laboratory by aggregating the fine-grained annotations in NoReC_fine and removing sentences with conflicting or no sentiment.
|
60 |
+
|
61 |
+
### Supported Tasks and Leaderboards
|
62 |
+
|
63 |
+
[More Information Needed]
|
64 |
+
|
65 |
+
### Languages
|
66 |
+
|
67 |
+
The text in the dataset is in Norwegian.
|
68 |
+
|
69 |
+
## Dataset Structure
|
70 |
+
|
71 |
+
### Data Instances
|
72 |
+
|
73 |
+
Example of one instance in the dataset.
|
74 |
+
|
75 |
+
```{'label': 0, 'text': 'Verre er det med slagsmålene .'}```
|
76 |
+
|
77 |
+
### Data Fields
|
78 |
+
|
79 |
+
- `id`: index of the example
|
80 |
+
- `text`: Text of a sentence
|
81 |
+
- `label`: The sentiment label. Here
|
82 |
+
- 0 = negative
|
83 |
+
- 1 = positive
|
84 |
+
|
85 |
+
### Data Splits
|
86 |
+
|
87 |
+
The dataset is split into a `train`, `validation`, and `test` split with the following sizes:
|
88 |
+
|
89 |
+
| | Tain | Valid | Test |
|
90 |
+
| ----- | ------ | ----- | ----- |
|
91 |
+
| Number of examples | 2675 | 516 | 417 |
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
## Dataset Creation
|
96 |
+
|
97 |
+
This dataset is based largely on the original data described in the paper _A Fine-Grained Sentiment Dataset for Norwegian_ by L. Øvrelid, P. Mæhlum, J. Barnes, and E. Velldal, accepted at LREC 2020, [paper available](https://www.aclweb.org/anthology/2020.lrec-1.618). However, we have since added annotations for another 3476 sentences, increasing the overall size and scope of the dataset.
|
98 |
+
|
99 |
+
## Additional Information
|
100 |
+
|
101 |
+
### Licensing Information
|
102 |
+
|
103 |
+
This work is licensed under a Creative Commons Attribution 4.0 International License
|
104 |
+
|
105 |
+
### Citation Information
|
106 |
+
|
107 |
+
```latex
|
108 |
+
@misc{sheng2020investigating,
|
109 |
+
title={Investigating Societal Biases in a Poetry Composition System},
|
110 |
+
author={Emily Sheng and David Uthus},
|
111 |
+
year={2020},
|
112 |
+
eprint={2011.02686},
|
113 |
+
archivePrefix={arXiv},
|
114 |
+
primaryClass={cs.CL}
|
115 |
+
}
|
116 |
+
```
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "Aggregated NoRec_fine: A Fine-grained Sentiment Dataset for Norwegian\nThis dataset was created by the Nordic Language Processing Laboratory by\naggregating the fine-grained annotations in NoReC_fine and removing sentences\nwith conflicting or no sentiment.\n", "citation": "\n@InProceedings{OvrMaeBar20,\n author = {Lilja {\\O}vrelid and Petter M{\u0007e}hlum and Jeremy Barnes and Erik Velldal},\n title = {A Fine-grained Sentiment Dataset for {N}orwegian},\n booktitle = {{Proceedings of the 12th Edition of the Language Resources and Evaluation Conference}},\n year = 2020,\n address = \"Marseille, France, 2020\"\n}\n", "homepage": "https://github.com/ltgoslo/NorBERT/", "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": "norec_agg", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 300859, "num_examples": 2675, "dataset_name": "norec_agg"}, "validation": {"name": "validation", "num_bytes": 59711, "num_examples": 516, "dataset_name": "norec_agg"}, "test": {"name": "test", "num_bytes": 48499, "num_examples": 417, "dataset_name": "norec_agg"}}, "download_checksums": {"https://raw.githubusercontent.com/ltgoslo/NorBERT/main/benchmarking/data/sentiment/no/train.csv": {"num_bytes": 282595, "checksum": "4789892063b70fe6f1cc69dc3973968a98762a61d91f03eaa99cd8102ccba8b3"}, "https://raw.githubusercontent.com/ltgoslo/NorBERT/main/benchmarking/data/sentiment/no/dev.csv": {"num_bytes": 56101, "checksum": "f85f5bde866162c86aa9d6c443532757a173e626704c5011078b41c18ebec941"}, "https://raw.githubusercontent.com/ltgoslo/NorBERT/main/benchmarking/data/sentiment/no/test.csv": {"num_bytes": 45655, "checksum": "28c95c7b1f13ac887b6efe245576d3f469f8481833ec1188bdd1a7b450a43231"}}, "download_size": 384351, "post_processing_size": null, "dataset_size": 409069, "size_in_bytes": 793420}}
|
dummy/1.0.0/dummy_data.zip
ADDED
Binary file (1.44 kB). View file
|
|
norec_agg.py
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"""Aggregated NoRec_fine: A Fine-grained Sentiment Dataset for Norwegian"""
|
16 |
+
import csv
|
17 |
+
|
18 |
+
import datasets
|
19 |
+
|
20 |
+
|
21 |
+
_CITATION = """
|
22 |
+
@InProceedings{OvrMaeBar20,
|
23 |
+
author = {Lilja {\O}vrelid and Petter M{\ae}hlum and Jeremy Barnes and Erik Velldal},
|
24 |
+
title = {A Fine-grained Sentiment Dataset for {N}orwegian},
|
25 |
+
booktitle = {{Proceedings of the 12th Edition of the Language Resources and Evaluation Conference}},
|
26 |
+
year = 2020,
|
27 |
+
address = "Marseille, France, 2020"
|
28 |
+
}
|
29 |
+
"""
|
30 |
+
|
31 |
+
_DESCRIPTION = """\
|
32 |
+
Aggregated NoRec_fine: A Fine-grained Sentiment Dataset for Norwegian
|
33 |
+
This dataset was created by the Nordic Language Processing Laboratory by
|
34 |
+
aggregating the fine-grained annotations in NoReC_fine and removing sentences
|
35 |
+
with conflicting or no sentiment.
|
36 |
+
"""
|
37 |
+
|
38 |
+
|
39 |
+
_HOMEPAGE = "https://github.com/ltgoslo/NorBERT/"
|
40 |
+
|
41 |
+
_BASE_URL = "https://raw.githubusercontent.com/ltgoslo/NorBERT/main/benchmarking/data/sentiment/no"
|
42 |
+
_URLS = {
|
43 |
+
"train": f"{_BASE_URL}/train.csv",
|
44 |
+
"dev": f"{_BASE_URL}/dev.csv",
|
45 |
+
"test": f"{_BASE_URL}/test.csv",
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
class NorecAgg(datasets.GeneratorBasedBuilder):
|
50 |
+
"""Aggregated NoRec_fine: A Fine-grained Sentiment Dataset for Norwegian"""
|
51 |
+
|
52 |
+
VERSION = datasets.Version("1.0.0")
|
53 |
+
|
54 |
+
def _info(self):
|
55 |
+
return datasets.DatasetInfo(
|
56 |
+
description=_DESCRIPTION,
|
57 |
+
features=datasets.Features(
|
58 |
+
{
|
59 |
+
"text": datasets.Value("string"),
|
60 |
+
"label": datasets.features.ClassLabel(names=["negative", "positive"]),
|
61 |
+
}
|
62 |
+
),
|
63 |
+
supervised_keys=None,
|
64 |
+
homepage=_HOMEPAGE,
|
65 |
+
citation=_CITATION,
|
66 |
+
)
|
67 |
+
|
68 |
+
def _split_generators(self, dl_manager):
|
69 |
+
downloaded_files = dl_manager.download(_URLS)
|
70 |
+
return [
|
71 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
72 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
73 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
74 |
+
]
|
75 |
+
|
76 |
+
def _generate_examples(self, filepath):
|
77 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
78 |
+
csv_reader = csv.reader(csv_file, delimiter=",")
|
79 |
+
for idx, row in enumerate(csv_reader):
|
80 |
+
label, text = row
|
81 |
+
label = int(label)
|
82 |
+
yield int(idx), {"text": text, "label": label}
|