Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Sub-tasks:
multi-class-classification
Languages:
Danish
Size:
1K - 10K
License:
Commit
·
ce0525a
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 +139 -0
- danish_political_comments.py +72 -0
- dataset_infos.json +1 -0
- dummy/0.9.1/dummy_data.zip +3 -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,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- other
|
6 |
+
languages:
|
7 |
+
- da
|
8 |
+
licenses:
|
9 |
+
- unknown
|
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 |
+
- multi-class-classification
|
20 |
+
---
|
21 |
+
|
22 |
+
# Dataset Card Creation Guide
|
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:** https://github.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media
|
50 |
+
- **Repository:** https://github.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media
|
51 |
+
- **Paper:** https://github.com/lucaspuvis/SAM/blob/master/Thesis.pdf
|
52 |
+
- **Point of Contact:** [More Information Needed]
|
53 |
+
|
54 |
+
### Dataset Summary
|
55 |
+
|
56 |
+
[More Information Needed]
|
57 |
+
|
58 |
+
### Supported Tasks and Leaderboards
|
59 |
+
|
60 |
+
[More Information Needed]
|
61 |
+
|
62 |
+
### Languages
|
63 |
+
|
64 |
+
[More Information Needed]
|
65 |
+
|
66 |
+
## Dataset Structure
|
67 |
+
|
68 |
+
### Data Instances
|
69 |
+
|
70 |
+
[More Information Needed]
|
71 |
+
|
72 |
+
### Data Fields
|
73 |
+
|
74 |
+
[More Information Needed]
|
75 |
+
|
76 |
+
### Data Splits
|
77 |
+
|
78 |
+
[More Information Needed]
|
79 |
+
## Dataset Creation
|
80 |
+
|
81 |
+
### Curation Rationale
|
82 |
+
|
83 |
+
[More Information Needed]
|
84 |
+
|
85 |
+
### Source Data
|
86 |
+
|
87 |
+
[More Information Needed]
|
88 |
+
|
89 |
+
#### Initial Data Collection and Normalization
|
90 |
+
|
91 |
+
[More Information Needed]
|
92 |
+
|
93 |
+
#### Who are the source language producers?
|
94 |
+
|
95 |
+
[More Information Needed]
|
96 |
+
|
97 |
+
### Annotations
|
98 |
+
|
99 |
+
[More Information Needed]
|
100 |
+
|
101 |
+
#### Annotation process
|
102 |
+
|
103 |
+
[More Information Needed]
|
104 |
+
|
105 |
+
#### Who are the annotators?
|
106 |
+
|
107 |
+
[More Information Needed]
|
108 |
+
|
109 |
+
### Personal and Sensitive Information
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
## Considerations for Using the Data
|
114 |
+
|
115 |
+
### Social Impact of Dataset
|
116 |
+
|
117 |
+
[More Information Needed]
|
118 |
+
|
119 |
+
### Discussion of Biases
|
120 |
+
|
121 |
+
[More Information Needed]
|
122 |
+
|
123 |
+
### Other Known Limitations
|
124 |
+
|
125 |
+
[More Information Needed]
|
126 |
+
|
127 |
+
## Additional Information
|
128 |
+
|
129 |
+
### Dataset Curators
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
### Licensing Information
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
### Citation Information
|
138 |
+
|
139 |
+
[More Information Needed]
|
danish_political_comments.py
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 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 |
+
import datasets
|
18 |
+
|
19 |
+
|
20 |
+
_DESCRIPTION = """\
|
21 |
+
The dataset consists of 9008 sentences that are labelled with fine-grained polarity in the range from -2 to 2 (negative to postive). The quality of the fine-grained is not cross validated and is therefore subject to uncertainties; however, the simple polarity has been cross validated and therefore is considered to be more correct.
|
22 |
+
"""
|
23 |
+
_HOMEPAGE_URL = "https://github.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media"
|
24 |
+
_URL = (
|
25 |
+
"https://raw.githubusercontent.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media/master/all_sentences.tsv"
|
26 |
+
)
|
27 |
+
_CITATION = "https://github.com/lucaspuvis/SAM/blob/master/Thesis.pdf"
|
28 |
+
|
29 |
+
|
30 |
+
class DanishPoliticalComments(datasets.GeneratorBasedBuilder):
|
31 |
+
VERSION = datasets.Version("0.9.1")
|
32 |
+
|
33 |
+
def _info(self):
|
34 |
+
return datasets.DatasetInfo(
|
35 |
+
description=_DESCRIPTION,
|
36 |
+
features=datasets.Features(
|
37 |
+
{
|
38 |
+
"id": datasets.Value("string"),
|
39 |
+
"sentence": datasets.Value("string"),
|
40 |
+
"target": datasets.features.ClassLabel(names=["2", "1", "0", "-1", "-2"]),
|
41 |
+
},
|
42 |
+
),
|
43 |
+
supervised_keys=None,
|
44 |
+
homepage=_HOMEPAGE_URL,
|
45 |
+
citation=_CITATION,
|
46 |
+
)
|
47 |
+
|
48 |
+
def _split_generators(self, dl_manager):
|
49 |
+
path = dl_manager.download_and_extract(_URL)
|
50 |
+
return [
|
51 |
+
datasets.SplitGenerator(
|
52 |
+
name=datasets.Split.TRAIN,
|
53 |
+
gen_kwargs={"datapath": path},
|
54 |
+
)
|
55 |
+
]
|
56 |
+
|
57 |
+
def _generate_examples(self, datapath):
|
58 |
+
sentence_counter = 0
|
59 |
+
with open(datapath, encoding="utf-8") as f:
|
60 |
+
for row in f:
|
61 |
+
row = row.strip()
|
62 |
+
target, sentence = row.split("\t")
|
63 |
+
result = (
|
64 |
+
sentence_counter,
|
65 |
+
{
|
66 |
+
"id": str(sentence_counter),
|
67 |
+
"sentence": sentence,
|
68 |
+
"target": target,
|
69 |
+
},
|
70 |
+
)
|
71 |
+
sentence_counter += 1
|
72 |
+
yield result
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"default": {"description": "The dataset consists of 9008 sentences that are labelled with fine-grained polarity in the range from -2 to 2 (negative to postive). The quality of the fine-grained is not cross validated and is therefore subject to uncertainties; however, the simple polarity has been cross validated and therefore is considered to be more correct.\n", "citation": "https://github.com/lucaspuvis/SAM/blob/master/Thesis.pdf", "homepage": "https://github.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "sentence": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"num_classes": 5, "names": ["2", "1", "0", "-1", "-2"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "danish_political_comments", "config_name": "default", "version": {"version_str": "0.9.1", "description": null, "major": 0, "minor": 9, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 829569, "num_examples": 9008, "dataset_name": "danish_political_comments"}}, "download_checksums": {"https://raw.githubusercontent.com/steffan267/Sentiment-Analysis-on-Danish-Social-Media/master/all_sentences.tsv": {"num_bytes": 690873, "checksum": "43739298a30b44e7e442a7cebd5572289746202d595544c0dc2d7b0ee2d2240b"}}, "download_size": 690873, "post_processing_size": null, "dataset_size": 829569, "size_in_bytes": 1520442}}
|
dummy/0.9.1/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a329b83dc4dc908d2f51a5926500906fbb6d8541c9ddf8f2d83d11817258bbf2
|
3 |
+
size 418
|