Datasets:

Languages:
Polish
Multilinguality:
monolingual
Size Categories:
5K
1K<n<10K
Language Creators:
other
Annotations Creators:
expert-generated
Source Datasets:
original
License:
piotr-rybak asawczyn commited on
Commit
b913a4e
1 Parent(s): 2ea9349

Create README.md (#1)

Browse files

- Create README.md (5a26b76fa606844c082c2de2efc237ab7a95881b)


Co-authored-by: Albert Sawczyn <asawczyn@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +148 -0
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - other
6
+ language:
7
+ - pl
8
+ license:
9
+ - cc-by-sa-3.0
10
+ multilinguality:
11
+ - monolingual
12
+ pretty_name: 'Polish Summaries Corpus'
13
+ size_categories:
14
+ - 5K
15
+ - 1K<n<10K
16
+ source_datasets:
17
+ - original
18
+ task_categories:
19
+ - text-classification
20
+ task_ids:
21
+ - paraphrase-classification
22
+ ---
23
+
24
+ # klej-psc
25
+
26
+ ## Description
27
+
28
+ The Polish Summaries Corpus (PSC) is a dataset of summaries for 569 news articles. The human annotators created five extractive summaries for each article by choosing approximately 5% of the original text. A different annotator created each summary. The subset of 154 articles was also supplemented with additional five abstractive summaries each, i.e., not created from the fragments of the original article. In huggingface version of this dataset, summaries of the same article are used as positive pairs, and the most similar summaries of different articles are sampled as negatives.
29
+
30
+ ## Tasks (input, output, and metrics)
31
+
32
+ The task is to predict whether the extract text and summary are similar.
33
+
34
+ Based on PSC, we formulate a text-similarity task. We generate the positive pairs (i.e., referring
35
+ to the same article) using only those news articles with both extractive and abstractive summaries. We match each extractive summary with two least similar abstractive ones of the same article. To create negative pairs, we follow a similar procedure. We find two most similar abstractive summaries for each extractive summary, but from different articles.
36
+
37
+ **Input** (*'extract_text'*, *'summary_text'* columns): extract text and summary text sentences
38
+
39
+ **Output** (*'label'* column): label: 1 indicates summary is similar, 0 means that it is not similar
40
+
41
+ **Domain**: News articles
42
+
43
+ **Measurements**: F1-Score
44
+
45
+ **Example**:
46
+
47
+ extract_text: *Mit o potopie jest prastary, sięga czasów, gdy topniał lodowiec. Na skutek tego wydarzenia w dziejach planety, poziom mórz i oceanów podniósł się o kilkadziesiąt metrów. Potop polodowcowy z całą, naukową pewnością, miał miejsce, ale najprawdopodobniej został przez ludzkość przegapiony. I oto pojawiła się w tej sprawie kolejna glosa. Jej autorami są amerykańscy geofizycy. (eng. The myth of the Flood is an ancient one, dating back to the time when glaciers melted. As a result of this event in the history of the planet, sea and ocean levels rose by several tens of meters. The post-glacial flood, with all scientific certainty, took place, but most likely it was missed by mankind. And here is another gloss on the matter. Its authors are American geophysicists.)*
48
+
49
+ summary_text: *Dwójka amerykańskich geofizyków przedstawiła swój scenariusz pochodzenia mitu o potopie. Przed 7500 laty do będącego jeszcze jeziorem Morza Czarnego wlały się wezbrane wskutek topnienia lodowców wody Morza Śródziemnego. Geofizycy twierdzą, że dzięki temu rozkwitło rolnictwo, bo ludzie musieli migrować i szerzyć rolniczy tryb życia. Środowiska naukowe twierdzą jednak, że potop był tylko jednym z czynników ekspansji rolnictwa. (eng. Two American geophysicists presented their scenario of the origin of the Flood myth. 7500 years ago, the waters of the Mediterranean Sea flooded into the Black Sea, which was still a lake, due to the melting of glaciers. Geophysicists claim that this made agriculture flourish because people had to migrate and spread their agricultural lifestyle. However, the scientific community argues that the Flood was only one factor in the expansion of agriculture.)*
50
+
51
+ label: **1 (summary is similar)**
52
+
53
+ ## Data splits
54
+
55
+ | Subset | Cardinality |
56
+ | ----------- | ----------: |
57
+ | train | 4302 |
58
+ | val | 0 |
59
+ | test | 1078 |
60
+
61
+ ## Class distribution
62
+
63
+ | Class | train | validation | test |
64
+ |:------------|--------:|-------------:|-------:|
65
+ | not similar | 0.705 | - | 0.696 |
66
+ | similar | 0.295 | - | 0.304 |
67
+
68
+ ## Citation
69
+ ```
70
+ @inproceedings{ogro:kop:14:lrec,
71
+ title={The {P}olish {S}ummaries {C}orpus},
72
+ author={Ogrodniczuk, Maciej and Kope{'c}, Mateusz},
73
+ booktitle = "Proceedings of the Ninth International {C}onference on {L}anguage {R}esources and {E}valuation, {LREC}~2014",
74
+ year = "2014",
75
+ }
76
+ ```
77
+ ## License
78
+
79
+ ```
80
+ Creative Commons Attribution ShareAlike 3.0 licence (CC-BY-SA 3.0)
81
+ ```
82
+
83
+ ## Links
84
+
85
+ [HuggingFace](https://huggingface.co/datasets/allegro/klej-psc)
86
+
87
+ [Source](http://zil.ipipan.waw.pl/PolishSummariesCorpus)
88
+
89
+ [Paper](https://aclanthology.org/L14-1145/)
90
+
91
+ ## Examples
92
+
93
+ ### Loading
94
+
95
+ ```python
96
+ from pprint import pprint
97
+
98
+ from datasets import load_dataset
99
+
100
+ dataset = load_dataset("allegro/klej-psc")
101
+ pprint(dataset['train'][100])
102
+
103
+ #{'extract_text': 'Nowe prawo energetyczne jest zagrożeniem dla małych '
104
+ # 'producentów energii ze źródeł odnawialnych. Sytuacja się '
105
+ # 'pogarsza wdobie urynkowienia energii. zniosło preferencje '
106
+ # 'wprowadzone dla energetyki wodnej. UE zamierza podwoić '
107
+ # 'udział takich źródeł energetyki jak woda, wiatr, słońce do '
108
+ # '2010 r.W Polsce 1-1,5 proc. zużycia energii wytwarza się ze '
109
+ # 'źródeł odnawialnych. W krajach Unii udział ten wynosi '
110
+ # 'średnio 5,6 proc.',
111
+ # 'label': 1,
112
+ # 'summary_text': 'W Polsce w niewielkim stopniu wykorzystuje się elektrownie '
113
+ # 'wodne oraz inne sposoby tworzenia energii ze źródeł '
114
+ # 'odnawialnych. Podczas gdy w innych krajach europejskich jest '
115
+ # 'to średnio 5,6 % w Polsce jest to 1-1,5 %. Powodem jest '
116
+ # 'niska opłacalność posiadania tego typu elektrowni-zakład '
117
+ # 'energetyczny płaci ok. 17 gr. za 1kWh, podczas gdy '
118
+ # 'wybudowanie takiej elektrowni kosztuje ok. 100 tyś. zł.'}
119
+ ```
120
+
121
+ ### Evaluation
122
+
123
+ ```python
124
+ import random
125
+ from pprint import pprint
126
+
127
+ from datasets import load_dataset, load_metric
128
+
129
+ dataset = load_dataset("allegro/klej-psc")
130
+ dataset = dataset.class_encode_column("label")
131
+ references = dataset["test"]["label"]
132
+
133
+ # generate random predictions
134
+ predictions = [random.randrange(max(references) + 1) for _ in range(len(references))]
135
+
136
+ acc = load_metric("accuracy")
137
+ f1 = load_metric("f1")
138
+
139
+ acc_score = acc.compute(predictions=predictions, references=references)
140
+ f1_score = f1.compute(predictions=predictions, references=references, average="macro")
141
+
142
+ pprint(acc_score)
143
+ pprint(f1_score)
144
+
145
+ # {'accuracy': 0.18588469184890655}
146
+ # {'f1': 0.17511412402843068}
147
+
148
+ ```