Datasets:
polemo2

Task Categories: text-classification
Languages: Polish
Multilinguality: monolingual
Size Categories: 1K<n<10K
Language Creators: other
Annotations Creators: expert-generated
Source Datasets: original
system
HF staff
commited on
Commit
0eb59bc
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - other
6
+ languages:
7
+ - pl
8
+ licenses:
9
+ - bsd-3-clause
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 for [Dataset Name]
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:**
50
+ https://clarin-pl.eu/dspace/handle/11321/710
51
+ - **Repository:**
52
+ - **Paper:**
53
+ - **Leaderboard:**
54
+ - **Point of Contact:**
55
+
56
+ ### Dataset Summary
57
+
58
+ The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ Polish
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Instances
71
+
72
+ [More Information Needed]
73
+
74
+ ### Data Fields
75
+
76
+ - sentence: string, the review
77
+ - target: sentiment of the sentence class
78
+
79
+ The same tag system is used in plWordNet Emo for lexical units: [+m] (strong positive), [+s] (weak positive), [-m] (strong negative), [-s] (weak negative), [amb] (ambiguous) and [0] (neutral).
80
+
81
+ Note that the test set doesn't have targets so -1 is used instead
82
+
83
+ ### Data Splits
84
+
85
+ [More Information Needed]
86
+
87
+ ## Dataset Creation
88
+
89
+ ### Curation Rationale
90
+
91
+ [More Information Needed]
92
+
93
+ ### Source Data
94
+
95
+ #### Initial Data Collection and Normalization
96
+
97
+ [More Information Needed]
98
+
99
+ #### Who are the source language producers?
100
+
101
+ [More Information Needed]
102
+
103
+ ### Annotations
104
+
105
+ #### Annotation process
106
+
107
+ [More Information Needed]
108
+
109
+ #### Who are the annotators?
110
+
111
+ [More Information Needed]
112
+
113
+ ### Personal and Sensitive Information
114
+
115
+ [More Information Needed]
116
+
117
+ ## Considerations for Using the Data
118
+
119
+ ### Social Impact of Dataset
120
+
121
+ [More Information Needed]
122
+
123
+ ### Discussion of Biases
124
+
125
+ [More Information Needed]
126
+
127
+ ### Other Known Limitations
128
+
129
+ [More Information Needed]
130
+
131
+ ## Additional Information
132
+
133
+ ### Dataset Curators
134
+
135
+ [More Information Needed]
136
+
137
+ ### Licensing Information
138
+
139
+ CC BY-NC-SA 4.0
140
+
141
+ ### Citation Information
142
+
143
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"in": {"description": "The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.\n", "citation": "@inproceedings{kocon-etal-2019-multi,\ntitle = \"Multi-Level Sentiment Analysis of {P}ol{E}mo 2.0: Extended Corpus of Multi-Domain Consumer Reviews\",\nauthor = \"Koco{'n}, Jan and\nMi{\\l}kowski, Piotr and\nZa{'s}ko-Zieli{'n}ska, Monika\",\nbooktitle = \"Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL)\",\nmonth = nov,\nyear = \"2019\",\naddress = \"Hong Kong, China\",\npublisher = \"Association for Computational Linguistics\",\nurl = \"https://www.aclweb.org/anthology/K19-1092\",\ndoi = \"10.18653/v1/K19-1092\",\npages = \"980--991\",\n}\n", "homepage": "https://clarin-pl.eu/dspace/handle/11321/710", "license": "CC BY-NC-SA 4.0", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"num_classes": 4, "names": ["__label__meta_amb", "__label__meta_minus_m", "__label__meta_plus_m", "__label__meta_zero"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "polemo2", "config_name": "in", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4810215, "num_examples": 5783, "dataset_name": "polemo2"}, "test": {"name": "test", "num_bytes": 582052, "num_examples": 722, "dataset_name": "polemo2"}, "validation": {"name": "validation", "num_bytes": 593530, "num_examples": 723, "dataset_name": "polemo2"}}, "download_checksums": {"https://klejbenchmark.com/static/data/klej_polemo2.0-in.zip": {"num_bytes": 2350339, "checksum": "ec9ccfa232686081577e6c250c79c028411076e84db60d4cd192f9a567a2cb96"}}, "download_size": 2350339, "post_processing_size": null, "dataset_size": 5985797, "size_in_bytes": 8336136}, "out": {"description": "The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.\n", "citation": "@inproceedings{kocon-etal-2019-multi,\ntitle = \"Multi-Level Sentiment Analysis of {P}ol{E}mo 2.0: Extended Corpus of Multi-Domain Consumer Reviews\",\nauthor = \"Koco{'n}, Jan and\nMi{\\l}kowski, Piotr and\nZa{'s}ko-Zieli{'n}ska, Monika\",\nbooktitle = \"Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL)\",\nmonth = nov,\nyear = \"2019\",\naddress = \"Hong Kong, China\",\npublisher = \"Association for Computational Linguistics\",\nurl = \"https://www.aclweb.org/anthology/K19-1092\",\ndoi = \"10.18653/v1/K19-1092\",\npages = \"980--991\",\n}\n", "homepage": "https://clarin-pl.eu/dspace/handle/11321/710", "license": "CC BY-NC-SA 4.0", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "target": {"num_classes": 4, "names": ["__label__meta_amb", "__label__meta_minus_m", "__label__meta_plus_m", "__label__meta_zero"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "polemo2", "config_name": "out", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4810215, "num_examples": 5783, "dataset_name": "polemo2"}, "test": {"name": "test", "num_bytes": 309790, "num_examples": 494, "dataset_name": "polemo2"}, "validation": {"name": "validation", "num_bytes": 310977, "num_examples": 494, "dataset_name": "polemo2"}}, "download_checksums": {"https://klejbenchmark.com/static/data/klej_polemo2.0-out.zip": {"num_bytes": 2139891, "checksum": "202668a59ce18cf476a7d3a8c76a802fe1eeaa869caa687313c43246988046ba"}}, "download_size": 2139891, "post_processing_size": null, "dataset_size": 5430982, "size_in_bytes": 7570873}}
dummy/in/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3cba992c418f8da334add9e6e1bbcafbac136cc262b3fa33744364e4297ec939
3
+ size 5498
dummy/out/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7554922eed6e53d21cd85daa0fba76dbdf3905b3439213791916c50471161f5f
3
+ size 4647
polemo2.py ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """PolEmo2.0 IN and OUT"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{kocon-etal-2019-multi,
27
+ title = "Multi-Level Sentiment Analysis of {P}ol{E}mo 2.0: Extended Corpus of Multi-Domain Consumer Reviews",
28
+ author = "Koco{\'n}, Jan and
29
+ Milkowski, Piotr and
30
+ Za{\'s}ko-Zieli{\'n}ska, Monika",
31
+ booktitle = "Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL)",
32
+ month = nov,
33
+ year = "2019",
34
+ address = "Hong Kong, China",
35
+ publisher = "Association for Computational Linguistics",
36
+ url = "https://www.aclweb.org/anthology/K19-1092",
37
+ doi = "10.18653/v1/K19-1092",
38
+ pages = "980--991",
39
+ }
40
+ """
41
+
42
+ _DESCRIPTION = """\
43
+ The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.
44
+ """
45
+
46
+ _HOMEPAGE = "https://clarin-pl.eu/dspace/handle/11321/710"
47
+
48
+ _LICENSE = "CC BY-NC-SA 4.0"
49
+
50
+ _URLs = {
51
+ "in": "https://klejbenchmark.com/static/data/klej_polemo2.0-in.zip",
52
+ "out": "https://klejbenchmark.com/static/data/klej_polemo2.0-out.zip",
53
+ }
54
+
55
+
56
+ class Polemo2(datasets.GeneratorBasedBuilder):
57
+ """PolEmo2.0"""
58
+
59
+ VERSION = datasets.Version("1.1.0")
60
+
61
+ BUILDER_CONFIGS = [
62
+ datasets.BuilderConfig(
63
+ name="in",
64
+ version=VERSION,
65
+ description="The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.",
66
+ ),
67
+ datasets.BuilderConfig(
68
+ name="out",
69
+ version=VERSION,
70
+ description="The PolEmo2.0 is a set of online reviews from medicine and hotels domains. The task is to predict the sentiment of a review. There are two separate test sets, to allow for in-domain (medicine and hotels) as well as out-of-domain (products and university) validation.",
71
+ ),
72
+ ]
73
+
74
+ DEFAULT_CONFIG_NAME = "in"
75
+
76
+ def _info(self):
77
+ return datasets.DatasetInfo(
78
+ description=_DESCRIPTION,
79
+ features=datasets.Features(
80
+ {
81
+ "sentence": datasets.Value("string"),
82
+ "target": datasets.ClassLabel(
83
+ names=[
84
+ "__label__meta_amb",
85
+ "__label__meta_minus_m",
86
+ "__label__meta_plus_m",
87
+ "__label__meta_zero",
88
+ ]
89
+ ),
90
+ }
91
+ ),
92
+ supervised_keys=None,
93
+ homepage=_HOMEPAGE,
94
+ license=_LICENSE,
95
+ citation=_CITATION,
96
+ )
97
+
98
+ def _split_generators(self, dl_manager):
99
+ """Returns SplitGenerators."""
100
+ my_urls = _URLs[self.config.name]
101
+ data_dir = dl_manager.download_and_extract(my_urls)
102
+ return [
103
+ datasets.SplitGenerator(
104
+ name=datasets.Split.TRAIN,
105
+ gen_kwargs={
106
+ "filepath": os.path.join(data_dir, "train.tsv"),
107
+ "split": "train",
108
+ },
109
+ ),
110
+ datasets.SplitGenerator(
111
+ name=datasets.Split.TEST,
112
+ gen_kwargs={"filepath": os.path.join(data_dir, "test_features.tsv"), "split": "test"},
113
+ ),
114
+ datasets.SplitGenerator(
115
+ name=datasets.Split.VALIDATION,
116
+ gen_kwargs={
117
+ "filepath": os.path.join(data_dir, "dev.tsv"),
118
+ "split": "dev",
119
+ },
120
+ ),
121
+ ]
122
+
123
+ def _generate_examples(self, filepath, split):
124
+ """ Yields examples. """
125
+ with open(filepath, encoding="utf-8") as f:
126
+ reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
127
+ for id_, row in enumerate(reader):
128
+ yield id_, {
129
+ "sentence": row["sentence"],
130
+ "target": -1 if split == "test" else row["target"],
131
+ }