Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Sub-tasks:
sentiment-classification
Languages:
Polish
Size:
1K - 10K
License:
parquet-converter
commited on
Commit
•
aae56f3
1
Parent(s):
9843af3
Update parquet files
Browse files- .gitattributes +0 -27
- README.md +0 -156
- allegro--klej-polemo2-in/csv-test.parquet +3 -0
- allegro--klej-polemo2-in/csv-train.parquet +3 -0
- allegro--klej-polemo2-in/csv-validation.parquet +3 -0
- test.csv +0 -0
- train.csv +0 -0
- valid.csv +0 -0
.gitattributes
DELETED
@@ -1,27 +0,0 @@
|
|
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
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- expert-generated
|
4 |
-
language_creators:
|
5 |
-
- other
|
6 |
-
language:
|
7 |
-
- pl
|
8 |
-
license:
|
9 |
-
- cc-by-sa-4.0
|
10 |
-
multilinguality:
|
11 |
-
- monolingual
|
12 |
-
pretty_name: 'PolEmo2.0-IN'
|
13 |
-
size_categories:
|
14 |
-
- 1K<n<10K
|
15 |
-
source_datasets:
|
16 |
-
- original
|
17 |
-
task_categories:
|
18 |
-
- text-classification
|
19 |
-
task_ids:
|
20 |
-
- sentiment-classification
|
21 |
-
---
|
22 |
-
|
23 |
-
# klej-polemo2-in
|
24 |
-
|
25 |
-
## Description
|
26 |
-
|
27 |
-
The PolEmo2.0 is a dataset of online consumer reviews from four domains: medicine, hotels, products, and university. It is human-annotated on a level of full reviews and individual sentences. It comprises over 8000 reviews, about 85% from the medicine and hotel domains.
|
28 |
-
|
29 |
-
We use the PolEmo2.0 dataset to form two tasks. Both use the same training dataset, i.e., reviews from medicine and hotel domains, but are evaluated on a different test set.
|
30 |
-
|
31 |
-
**In-Domain** is the first task, and we use accuracy to evaluate model performance within the in-domain context, i.e., on a test set of reviews from medicine and hotels domains.
|
32 |
-
|
33 |
-
## Tasks (input, output, and metrics)
|
34 |
-
|
35 |
-
The task is to predict the correct label of the review.
|
36 |
-
|
37 |
-
**Input** ('*text'* column): sentence
|
38 |
-
|
39 |
-
**Output** ('*target'* column): label for sentence sentiment ('zero': neutral, 'minus': negative, 'plus': positive, 'amb': ambiguous)
|
40 |
-
|
41 |
-
**Domain**: Online reviews
|
42 |
-
|
43 |
-
**Measurements**: Accuracy
|
44 |
-
|
45 |
-
**Example**:
|
46 |
-
|
47 |
-
Input: `Lekarz zalecił mi kurację alternatywną do dotychczasowej , więc jeszcze nie daję najwyższej oceny ( zobaczymy na ile okaże się skuteczna ) . Do Pana doktora nie mam zastrzeżeń : bardzo profesjonalny i kulturalny . Jedyny minus dotyczy gabinetu , który nie jest nowoczesny , co może zniechęcać pacjentki .`
|
48 |
-
|
49 |
-
Input (translated by DeepL): `The doctor recommended me an alternative treatment to the current one , so I do not yet give the highest rating ( we will see how effective it turns out to be ) . To the doctor I have no reservations : very professional and cultured . The only minus is about the office , which is not modern , which may discourage patients .`
|
50 |
-
|
51 |
-
Output: `amb` (ambiguous)
|
52 |
-
|
53 |
-
## Data splits
|
54 |
-
|
55 |
-
| Subset | Cardinality |
|
56 |
-
|:-----------|--------------:|
|
57 |
-
| train | 5783 |
|
58 |
-
| test | 722 |
|
59 |
-
| validation | 723 |
|
60 |
-
|
61 |
-
## Class distribution in train
|
62 |
-
|
63 |
-
| Class | Sentiment | train | validation | test |
|
64 |
-
|:------|:----------|------:|-----------:|------:|
|
65 |
-
| minus | positive | 0.379 | 0.375 | 0.416 |
|
66 |
-
| plus | negative | 0.271 | 0.289 | 0.273 |
|
67 |
-
| amb | ambiguous | 0.182 | 0.160 | 0.150 |
|
68 |
-
| zero | neutral | 0.168 | 0.176 | 0.162 |
|
69 |
-
|
70 |
-
## Citation
|
71 |
-
|
72 |
-
```
|
73 |
-
@inproceedings{kocon-etal-2019-multi,
|
74 |
-
title = "Multi-Level Sentiment Analysis of {P}ol{E}mo 2.0: Extended Corpus of Multi-Domain Consumer Reviews",
|
75 |
-
author = "Koco{\'n}, Jan and
|
76 |
-
Mi{\l}kowski, Piotr and
|
77 |
-
Za{\'s}ko-Zieli{\'n}ska, Monika",
|
78 |
-
booktitle = "Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL)",
|
79 |
-
month = nov,
|
80 |
-
year = "2019",
|
81 |
-
address = "Hong Kong, China",
|
82 |
-
publisher = "Association for Computational Linguistics",
|
83 |
-
url = "https://aclanthology.org/K19-1092",
|
84 |
-
doi = "10.18653/v1/K19-1092",
|
85 |
-
pages = "980--991",
|
86 |
-
abstract = "In this article we present an extended version of PolEmo {--} a corpus of consumer reviews from 4 domains: medicine, hotels, products and school. Current version (PolEmo 2.0) contains 8,216 reviews having 57,466 sentences. Each text and sentence was manually annotated with sentiment in 2+1 scheme, which gives a total of 197,046 annotations. We obtained a high value of Positive Specific Agreement, which is 0.91 for texts and 0.88 for sentences. PolEmo 2.0 is publicly available under a Creative Commons copyright license. We explored recent deep learning approaches for the recognition of sentiment, such as Bi-directional Long Short-Term Memory (BiLSTM) and Bidirectional Encoder Representations from Transformers (BERT).",
|
87 |
-
}
|
88 |
-
```
|
89 |
-
|
90 |
-
## License
|
91 |
-
|
92 |
-
```
|
93 |
-
Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
|
94 |
-
```
|
95 |
-
|
96 |
-
## Links
|
97 |
-
|
98 |
-
[HuggingFace](https://huggingface.co/datasets/allegro/klej-polemo2-in)
|
99 |
-
|
100 |
-
[Source](https://clarin-pl.eu/dspace/handle/11321/710)
|
101 |
-
|
102 |
-
[Paper](https://aclanthology.org/K19-1092/)
|
103 |
-
|
104 |
-
## Examples
|
105 |
-
|
106 |
-
### Loading
|
107 |
-
|
108 |
-
```python
|
109 |
-
from pprint import pprint
|
110 |
-
|
111 |
-
from datasets import load_dataset
|
112 |
-
|
113 |
-
dataset = load_dataset("allegro/klej-polemo2-in")
|
114 |
-
pprint(dataset['train'][0])
|
115 |
-
|
116 |
-
# {'sentence': 'Super lekarz i człowiek przez duże C . Bardzo duże doświadczenie '
|
117 |
-
# 'i trafne diagnozy . Wielka cierpliwość do ludzi starszych . Od '
|
118 |
-
# 'lat opiekuje się moją Mamą staruszką , i twierdzę , że mamy duże '
|
119 |
-
# 'szczęście , że mamy takiego lekarza . Naprawdę nie wiem cobyśmy '
|
120 |
-
# 'zrobili , gdyby nie Pan doktor . Dzięki temu , moja mama żyje . '
|
121 |
-
# 'Każda wizyta u specjalisty jest u niego konsultowana i uważam , '
|
122 |
-
# 'że jest lepszy od każdego z nich . Mamy do Niego prawie '
|
123 |
-
# 'nieograniczone zaufanie . Można wiele dobrego o Panu doktorze '
|
124 |
-
# 'jeszcze napisać . Niestety , ma bardzo dużo pacjentów , jest '
|
125 |
-
# 'przepracowany ( z tego powodu nawet obawiam się o jego zdrowie ) '
|
126 |
-
# 'i dostęp do niego jest trudny , ale zawsze możliwy .',
|
127 |
-
# 'target': '__label__meta_plus_m'}
|
128 |
-
```
|
129 |
-
|
130 |
-
### Evaluation
|
131 |
-
|
132 |
-
```python
|
133 |
-
import random
|
134 |
-
from pprint import pprint
|
135 |
-
|
136 |
-
from datasets import load_dataset, load_metric
|
137 |
-
|
138 |
-
dataset = load_dataset("allegro/klej-polemo2-in")
|
139 |
-
dataset = dataset.class_encode_column("target")
|
140 |
-
references = dataset["test"]["target"]
|
141 |
-
|
142 |
-
# generate random predictions
|
143 |
-
predictions = [random.randrange(max(references) + 1) for _ in range(len(references))]
|
144 |
-
|
145 |
-
acc = load_metric("accuracy")
|
146 |
-
f1 = load_metric("f1")
|
147 |
-
|
148 |
-
acc_score = acc.compute(predictions=predictions, references=references)
|
149 |
-
f1_score = f1.compute(predictions=predictions, references=references, average="macro")
|
150 |
-
|
151 |
-
pprint(acc_score)
|
152 |
-
pprint(f1_score)
|
153 |
-
|
154 |
-
# {'accuracy': 0.25069252077562326}
|
155 |
-
# {'f1': 0.23760962219870274}
|
156 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allegro--klej-polemo2-in/csv-test.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b9201ccbabce9473920ef0961308d755a7a0d5e4662d6c6a6a24e1a2cc581a7d
|
3 |
+
size 390836
|
allegro--klej-polemo2-in/csv-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c84d4371c18130f524a41fb3cfe83e638707088438dfdb588bb1b3562b5dd7f3
|
3 |
+
size 3213782
|
allegro--klej-polemo2-in/csv-validation.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e613fb50b44d8ac99a29719c6ee3633a96aa70b43223ecfb746cd0a720a8835f
|
3 |
+
size 396573
|
test.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
train.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
valid.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|