readmefix
Browse files- .DS_Store +0 -0
- README.md +142 -99
- eu_debates.py +0 -110
- eu_debates.zip +0 -3
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
| 3 |
source_datasets:
|
| 4 |
-
-
|
| 5 |
language_creators:
|
| 6 |
- found
|
| 7 |
multilinguality:
|
|
@@ -34,133 +34,175 @@ tags:
|
|
| 34 |
- politics
|
| 35 |
size_categories:
|
| 36 |
- 10K<n<100K
|
| 37 |
-
pretty_name: EU Debates
|
| 38 |
---
|
| 39 |
|
| 40 |
-
|
| 41 |
# Dataset Description
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
# Data Fields
|
| 50 |
|
| 51 |
-
|
| 52 |
-
- `speaker_party`: a `string` with the name of the euro-party (group) that the MEP is affiliated with.
|
| 53 |
-
- `speaker_role`: a `string` with the role of the speaker (Member of the European Parliament (MEP), EUROPARL President, etc.)
|
| 54 |
-
- `debate_title`: a `string` with the title of the debate in the European Parliament.
|
| 55 |
-
- `date`: a `string` with the full date (YYYY-MM-DD) of the speech.
|
| 56 |
-
- `year` a `string` with the year (YYYY).
|
| 57 |
-
- `text`: a `string` with the full speech of the speaker.
|
| 58 |
-
- `translated_text`: a `string` with the translation of the speech in English, if the original is not.
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
# Data Instances
|
| 62 |
|
| 63 |
-
Example of a data instance
|
| 64 |
|
| 65 |
-
```
|
| 66 |
{
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
```
|
| 77 |
|
| 78 |
-
# How to
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
from datasets import load_dataset
|
| 83 |
-
eu_debates_dataset = load_dataset('coastalcph/eu_debates', split='train')
|
| 84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
```
|
| 86 |
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
<tr><td>ALDE </td> <td> 8,946 (10%)</td> </tr>
|
| 96 |
-
<tr><td>ECR </td> <td> 7,493 (9%)</td> </tr>
|
| 97 |
-
<tr><td>ID </td> <td> 6,970 (8%) </td> </tr>
|
| 98 |
-
<tr><td>GUE/NGL </td> <td>6,780 (8%)</td> </tr>
|
| 99 |
-
<tr><td>Greens/EFA </td> <td> 6,398 (7%)</td> </tr>
|
| 100 |
-
<tr><td>NI </td> <td> 5,127 (6%)</td> </tr>
|
| 101 |
-
<tr><td>Total </td> <td> 87,221 </td> </tr>
|
| 102 |
-
</table>
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
Distribution of speeches across years and euro-parties:
|
| 106 |
-
|
| 107 |
-
<table>
|
| 108 |
-
<tr><td><b>Year</b></td><td><b>EPP</b></td><td><b>S&D</b></td><td><b>ALDE</b></td><td><b>ECR</b></td><td><b>ID</b></td><td><b>GUE/NGL</b></td><td><b>Greens/EFA</b></td><td><b>NI</b></td><td><b>Total</b></td></tr>
|
| 109 |
-
<tr><td> 2009 </td><td> 748 </td><td> 456 </td><td> 180 </td><td> 138 </td><td> 72 </td><td> 174 </td><td> 113 </td><td> 163 </td><td> 2044 </td></tr>
|
| 110 |
-
<tr><td> 2010 </td><td> 3205 </td><td> 1623 </td><td> 616 </td><td> 340 </td><td> 341 </td><td> 529 </td><td> 427 </td><td> 546 </td><td> 7627 </td></tr>
|
| 111 |
-
<tr><td> 2011 </td><td> 4479 </td><td> 2509 </td><td> 817 </td><td> 418 </td><td> 761 </td><td> 792 </td><td> 490 </td><td> 614 </td><td> 10880 </td></tr>
|
| 112 |
-
<tr><td> 2012 </td><td> 3366 </td><td> 1892 </td><td> 583 </td><td> 419 </td><td> 560 </td><td> 486 </td><td> 351 </td><td> 347 </td><td> 8004 </td></tr>
|
| 113 |
-
<tr><td> 2013 </td><td> 724 </td><td> 636 </td><td> 240 </td><td> 175 </td><td> 152 </td><td> 155 </td><td> 170 </td><td> 154 </td><td> 2406 </td></tr>
|
| 114 |
-
<tr><td> 2014 </td><td> 578 </td><td> 555 </td><td> 184 </td><td> 180 </td><td> 131 </td><td> 160 </td><td> 144 </td><td> 180 </td><td> 2112 </td></tr>
|
| 115 |
-
<tr><td> 2015 </td><td> 978 </td><td> 1029 </td><td> 337 </td><td> 405 </td><td> 398 </td><td> 325 </td><td> 246 </td><td> 240 </td><td> 3958 </td></tr>
|
| 116 |
-
<tr><td> 2016 </td><td> 919 </td><td> 972 </td><td> 309 </td><td> 387 </td><td> 457 </td><td> 317 </td><td> 225 </td><td> 151 </td><td> 3737 </td></tr>
|
| 117 |
-
<tr><td> 2017 </td><td> 649 </td><td> 766 </td><td> 181 </td><td> 288 </td><td> 321 </td><td> 229 </td><td> 162 </td><td> 135 </td><td> 2731 </td></tr>
|
| 118 |
-
<tr><td> 2018 </td><td> 554 </td><td> 611 </td><td> 161 </td><td> 242 </td><td> 248 </td><td> 175 </td><td> 160 </td><td> 133 </td><td> 2284 </td></tr>
|
| 119 |
-
<tr><td> 2019 </td><td> 1296 </td><td> 1339 </td><td> 719 </td><td> 556 </td><td> 513 </td><td> 463 </td><td> 490 </td><td> 353 </td><td> 5729 </td></tr>
|
| 120 |
-
<tr><td> 2020 </td><td> 1660 </td><td> 1564 </td><td> 823 </td><td> 828 </td><td> 661 </td><td> 526 </td><td> 604 </td><td> 346 </td><td> 7012 </td></tr>
|
| 121 |
-
<tr><td> 2021 </td><td> 2147 </td><td> 2189 </td><td> 1290 </td><td> 1062 </td><td> 909 </td><td> 708 </td><td> 990 </td><td> 625 </td><td> 9920 </td></tr>
|
| 122 |
-
<tr><td> 2022 </td><td> 2436 </td><td> 2273 </td><td> 1466 </td><td> 1177 </td><td> 827 </td><td> 962 </td><td> 1031 </td><td> 641 </td><td> 10813 </td></tr>
|
| 123 |
-
<tr><td> 2023 </td><td> 1716 </td><td> 1628 </td><td> 1040 </td><td> 878 </td><td> 619 </td><td> 779 </td><td> 795 </td><td> 499 </td><td> 7954 </td></tr>
|
| 124 |
-
</table>
|
| 125 |
-
|
| 126 |
-
Distribution of speeches across the 23 EU official languages:
|
| 127 |
-
|
| 128 |
-
| Language | Examples |
|
| 129 |
-
| ----------- | -------- |
|
| 130 |
-
| en | 40736 (46.7%) |
|
| 131 |
-
| de | 6497 (7.5%) |
|
| 132 |
-
| fr | 6024 (6.9%) |
|
| 133 |
-
| es | 5172 (5.9%) |
|
| 134 |
-
| it | 4506 (5.2%) |
|
| 135 |
-
| pl | 3792 (4.4%) |
|
| 136 |
-
| pt | 2713 (3.1%) |
|
| 137 |
-
| ro | 2308 (2.7%) |
|
| 138 |
-
| el | 2290 (2.6%) |
|
| 139 |
-
| nl | 2286 (2.6%) |
|
| 140 |
-
| hu | 1661 (1.9%) |
|
| 141 |
-
| hr | 1509 (1.7%) |
|
| 142 |
-
| cs | 1428 (1.6%) |
|
| 143 |
-
| sv | 1210 (1.4%) |
|
| 144 |
-
| bg | 928 (1.1%) |
|
| 145 |
-
| sk | 916 (1.1%) |
|
| 146 |
-
| sl | 753 (0.9%) |
|
| 147 |
-
| fi | 693 (0.8%) |
|
| 148 |
-
| lt | 618 (0.7%) |
|
| 149 |
-
| da | 578 (0.7%) |
|
| 150 |
-
| et | 342 (0.4%) |
|
| 151 |
-
| lv | 184 (0.2%) |
|
| 152 |
-
| mt | 0 (0.0%) |
|
| 153 |
|
|
|
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
|
| 156 |
# Citation Information
|
| 157 |
|
| 158 |
-
|
| 159 |
-
Ilias Chalkidis and Stephanie Brandl.
|
| 160 |
-
In the Proceedings of the Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL),
|
| 161 |
-
Mexico City, Mexico, June 16–21, 2024.](https://arxiv.org/abs/2403.13592)*
|
| 162 |
|
| 163 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
@inproceedings{chalkidis-and-brandl-eu-llama-2024,
|
| 165 |
title = "Llama meets EU: Investigating the European political spectrum through the lens of LLMs",
|
| 166 |
author = "Chalkidis, Ilias and Brandl, Stephanie",
|
|
@@ -170,5 +212,6 @@ Mexico City, Mexico, June 16–21, 2024.](https://arxiv.org/abs/2403.13592)*
|
|
| 170 |
address = "Mexico City, Mexico",
|
| 171 |
publisher = "Association for Computational Linguistics",
|
| 172 |
}
|
|
|
|
| 173 |
|
| 174 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
| 3 |
source_datasets:
|
| 4 |
+
- coastalcph/eu_debates
|
| 5 |
language_creators:
|
| 6 |
- found
|
| 7 |
multilinguality:
|
|
|
|
| 34 |
- politics
|
| 35 |
size_categories:
|
| 36 |
- 10K<n<100K
|
| 37 |
+
pretty_name: EU Debates (JSONL Conversion)
|
| 38 |
---
|
| 39 |
|
|
|
|
| 40 |
# Dataset Description
|
| 41 |
|
| 42 |
+
This dataset is a **conversion of the original [`coastalcph/eu_debates`](https://huggingface.co/datasets/coastalcph/eu_debates)** dataset released by [Chalkidis and Brandl (2024)](https://arxiv.org/abs/2403.13592).
|
| 43 |
+
|
| 44 |
+
The goal of this repository is to provide the same underlying data **without a Python loading script**, in a standard format (JSON Lines / Parquet) compatible with the current Hugging Face `datasets` library and automated data loading.
|
| 45 |
+
|
| 46 |
+
The original EU Debates corpus consists of approx. 87k individual speeches in the period 2009–2023.
|
| 47 |
+
The data was exhaustively scraped from the official European Parliament Plenary website ([link](https://www.europarl.europa.eu/)). All speeches are time-stamped, thematically organized in debates, and include metadata about:
|
| 48 |
+
|
| 49 |
+
- the speaker's identity (full name, euro-party affiliation, speaker role),
|
| 50 |
+
- the debate (date and title),
|
| 51 |
+
- language information, and (where available) machine-translated versions in English.
|
| 52 |
+
|
| 53 |
+
Older debate speeches are originally in English, while newer ones are linguistically diverse across the 23 official EU languages. Machine-translated English versions are provided using the EasyNMT framework with the [M2M-100 (418M)](https://huggingface.co/facebook/m2m100_418M) model (Fan et al., 2020).
|
| 54 |
+
|
| 55 |
+
This repository only changes the **storage format** (to `train.jsonl` / Parquet) and **removes the Python loading script**.
|
| 56 |
+
The data contents and fields are preserved from the original dataset.
|
| 57 |
|
| 58 |
# Data Fields
|
| 59 |
|
| 60 |
+
Each row / JSONL line is a single speech with the following fields:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
+
- `speaker_name`: `string`, full name of the speaker.
|
| 63 |
+
- `speaker_party`: `string`, name of the euro-party (group) that the MEP is affiliated with.
|
| 64 |
+
- `speaker_role`: `string`, role of the speaker (e.g., Member of the European Parliament (MEP), EUROPARL President).
|
| 65 |
+
- `debate_title`: `string`, title of the debate in the European Parliament.
|
| 66 |
+
- `date`: `string`, full date of the speech in `YYYY-MM-DD` format.
|
| 67 |
+
- `year`: `string`, year of the speech in `YYYY` format.
|
| 68 |
+
- `intervention_language`: `string`, language code of the original intervention.
|
| 69 |
+
- `original_language`: `string`, language code of the original text.
|
| 70 |
+
- `text`: `string`, full original speech of the speaker.
|
| 71 |
+
- `translated_text`: `string` or `null`, machine translation of the speech into English if the original is not English, otherwise `null`.
|
| 72 |
|
| 73 |
# Data Instances
|
| 74 |
|
| 75 |
+
Example of a data instance:
|
| 76 |
|
| 77 |
+
```json
|
| 78 |
{
|
| 79 |
+
"speaker_name": "Michèle Striffler",
|
| 80 |
+
"speaker_party": "PPE",
|
| 81 |
+
"speaker_role": "MEP",
|
| 82 |
+
"debate_title": "Famine in East Africa (debate)",
|
| 83 |
+
"date": "2011-09-15",
|
| 84 |
+
"year": "2011",
|
| 85 |
+
"intervention_language": "fr",
|
| 86 |
+
"original_language": "fr",
|
| 87 |
+
"text": "Monsieur le Président, Madame le Commissaire, chers collègues, la situation humanitaire sans précédent que connaît la Corne de l'Afrique continue [...]",
|
| 88 |
+
"translated_text": "Mr. President, Mr. Commissioner, dear colleagues, the unprecedented humanitarian situation of the Horn of Africa continues [...]"
|
| 89 |
}
|
| 90 |
```
|
| 91 |
|
| 92 |
+
# How to Use
|
| 93 |
+
|
| 94 |
+
### From the Hugging Face Hub
|
| 95 |
+
|
| 96 |
+
If the dataset is hosted under `RJuro/eu_debates`:
|
| 97 |
|
| 98 |
```python
|
| 99 |
+
from datasets import load_dataset
|
| 100 |
+
|
| 101 |
+
eu_debates = load_dataset("RJuro/eu_debates", split="train")
|
| 102 |
+
```
|
| 103 |
|
| 104 |
+
### From Local Files
|
| 105 |
+
|
| 106 |
+
If you downloaded the `train.jsonl` file locally:
|
| 107 |
+
|
| 108 |
+
```python
|
| 109 |
from datasets import load_dataset
|
|
|
|
| 110 |
|
| 111 |
+
eu_debates = load_dataset(
|
| 112 |
+
"json",
|
| 113 |
+
data_files={"train": "train.jsonl"},
|
| 114 |
+
split="train",
|
| 115 |
+
)
|
| 116 |
```
|
| 117 |
|
| 118 |
+
If you use Parquet instead:
|
| 119 |
+
|
| 120 |
+
```python
|
| 121 |
+
from datasets import load_dataset
|
| 122 |
|
| 123 |
+
eu_debates = load_dataset(
|
| 124 |
+
"parquet",
|
| 125 |
+
data_files={"train": "train.parquet"},
|
| 126 |
+
split="train",
|
| 127 |
+
)
|
| 128 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
+
# Dataset Statistics
|
| 131 |
|
| 132 |
+
The statistics below are inherited from the original `coastalcph/eu_debates` dataset.
|
| 133 |
+
|
| 134 |
+
### Distribution of speeches across euro-parties:
|
| 135 |
+
|
| 136 |
+
| Euro-party | No. of Speeches |
|
| 137 |
+
|-------------|-----------------|
|
| 138 |
+
| EPP | 25,455 (29%) |
|
| 139 |
+
| S&D | 20,042 (23%) |
|
| 140 |
+
| ALDE | 8,946 (10%) |
|
| 141 |
+
| ECR | 7,493 (9%) |
|
| 142 |
+
| ID | 6,970 (8%) |
|
| 143 |
+
| GUE/NGL | 6,780 (8%) |
|
| 144 |
+
| Greens/EFA | 6,398 (7%) |
|
| 145 |
+
| NI | 5,127 (6%) |
|
| 146 |
+
| **Total** | **87,221** |
|
| 147 |
+
|
| 148 |
+
### Distribution of speeches across years and euro-parties:
|
| 149 |
+
|
| 150 |
+
| Year | EPP | S&D | ALDE | ECR | ID | GUE/NGL | Greens/EFA | NI | Total |
|
| 151 |
+
|---|---|---|---|---|---|---|---|---|---|
|
| 152 |
+
| 2009 | 748 | 456 | 180 | 138 | 72 | 174 | 113 | 163 | **2044** |
|
| 153 |
+
| 2010 | 3205 | 1623 | 616 | 340 | 341 | 529 | 427 | 546 | **7627** |
|
| 154 |
+
| 2011 | 4479 | 2509 | 817 | 418 | 761 | 792 | 490 | 614 | **10880** |
|
| 155 |
+
| 2012 | 3366 | 1892 | 583 | 419 | 560 | 486 | 351 | 347 | **8004** |
|
| 156 |
+
| 2013 | 724 | 636 | 240 | 175 | 152 | 155 | 170 | 154 | **2406** |
|
| 157 |
+
| 2014 | 578 | 555 | 184 | 180 | 131 | 160 | 144 | 180 | **2112** |
|
| 158 |
+
| 2015 | 978 | 1029 | 337 | 405 | 398 | 325 | 246 | 240 | **3958** |
|
| 159 |
+
| 2016 | 919 | 972 | 309 | 387 | 457 | 317 | 225 | 151 | **3737** |
|
| 160 |
+
| 2017 | 649 | 766 | 181 | 288 | 321 | 229 | 162 | 135 | **2731** |
|
| 161 |
+
| 2018 | 554 | 611 | 161 | 242 | 248 | 175 | 160 | 133 | **2284** |
|
| 162 |
+
| 2019 | 1296 | 1339 | 719 | 556 | 513 | 463 | 490 | 353 | **5729** |
|
| 163 |
+
| 2020 | 1660 | 1564 | 823 | 828 | 661 | 526 | 604 | 346 | **7012** |
|
| 164 |
+
| 2021 | 2147 | 2189 | 1290 | 1062 | 909 | 708 | 990 | 625 | **9920** |
|
| 165 |
+
| 2022 | 2436 | 2273 | 1466 | 1177 | 827 | 962 | 1031 | 641 | **10813** |
|
| 166 |
+
| 2023 | 1716 | 1628 | 1040 | 878 | 619 | 779 | 795 | 499 | **7954** |
|
| 167 |
+
|
| 168 |
+
### Distribution of speeches across the 23 EU official languages:
|
| 169 |
+
|
| 170 |
+
| Language | No. of Speeches |
|
| 171 |
+
|----------|-----------------|
|
| 172 |
+
| en | 40,736 (46.7%) |
|
| 173 |
+
| de | 6,497 (7.5%) |
|
| 174 |
+
| fr | 6,024 (6.9%) |
|
| 175 |
+
| es | 5,172 (5.9%) |
|
| 176 |
+
| it | 4,506 (5.2%) |
|
| 177 |
+
| pl | 3,792 (4.4%) |
|
| 178 |
+
| pt | 2,713 (3.1%) |
|
| 179 |
+
| ro | 2,308 (2.7%) |
|
| 180 |
+
| el | 2,290 (2.6%) |
|
| 181 |
+
| nl | 2,286 (2.6%) |
|
| 182 |
+
| hu | 1,661 (1.9%) |
|
| 183 |
+
| hr | 1,509 (1.7%) |
|
| 184 |
+
| cs | 1,428 (1.6%) |
|
| 185 |
+
| sv | 1,210 (1.4%) |
|
| 186 |
+
| bg | 928 (1.1%) |
|
| 187 |
+
| sk | 916 (1.1%) |
|
| 188 |
+
| sl | 753 (0.9%) |
|
| 189 |
+
| fi | 693 (0.8%) |
|
| 190 |
+
| lt | 618 (0.7%) |
|
| 191 |
+
| da | 578 (0.7%) |
|
| 192 |
+
| et | 342 (0.4%) |
|
| 193 |
+
| lv | 184 (0.2%) |
|
| 194 |
+
| mt | 0 (0.0%) |
|
| 195 |
|
| 196 |
# Citation Information
|
| 197 |
|
| 198 |
+
If you use this dataset, please cite the original work:
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
+
> Llama meets EU: Investigating the European political spectrum through the lens of LLMs.
|
| 201 |
+
> Ilias Chalkidis and Stephanie Brandl.
|
| 202 |
+
> In the Proceedings of the Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL),
|
| 203 |
+
> Mexico City, Mexico, June 16–21, 2024.
|
| 204 |
+
|
| 205 |
+
```bibtex
|
| 206 |
@inproceedings{chalkidis-and-brandl-eu-llama-2024,
|
| 207 |
title = "Llama meets EU: Investigating the European political spectrum through the lens of LLMs",
|
| 208 |
author = "Chalkidis, Ilias and Brandl, Stephanie",
|
|
|
|
| 212 |
address = "Mexico City, Mexico",
|
| 213 |
publisher = "Association for Computational Linguistics",
|
| 214 |
}
|
| 215 |
+
```
|
| 216 |
|
| 217 |
+
This repository only provides a format-converted, script-free version of the original dataset; all credit for data collection and annotation goes to the original authors.
|
eu_debates.py
DELETED
|
@@ -1,110 +0,0 @@
|
|
| 1 |
-
"""EU Debates"""
|
| 2 |
-
|
| 3 |
-
import json
|
| 4 |
-
import os
|
| 5 |
-
import textwrap
|
| 6 |
-
|
| 7 |
-
import datasets
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
MAIN_CITATION = """
|
| 11 |
-
@inproceedings{chalkidis-and-brandl-eu-llama-2024,
|
| 12 |
-
title = "Llama meets EU: Investigating the European political spectrum through the lens of LLMs",
|
| 13 |
-
author = "Chalkidis, Ilias and
|
| 14 |
-
Stephanie Brandl",
|
| 15 |
-
booktitle = "Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics",
|
| 16 |
-
month = jun,
|
| 17 |
-
year = "2021",
|
| 18 |
-
address = "Mexico City, Mexico",
|
| 19 |
-
publisher = "Association for Computational Linguistics",
|
| 20 |
-
}
|
| 21 |
-
"""
|
| 22 |
-
|
| 23 |
-
_DESCRIPTION = """
|
| 24 |
-
EU Debates is a corpus of parliamentary proceedings (debates) from the EU parliament. The corpus consists of approx. 87k individual speeches in the period 2009-2023.
|
| 25 |
-
We exhaustively scrape the data from the official European Parliament Plenary website. All speeches are time-stamped, thematically organized on debates,
|
| 26 |
-
and include metadata relevant to the speaker's identity (full name, euro-party affiliation, speaker role), and the debate (date and title).
|
| 27 |
-
Older debate speeches are originally in English, while newer ones are linguistically diverse across the 23 official EU languages, thus we also provide machine-translated
|
| 28 |
-
versions in English, when official translations are missing.
|
| 29 |
-
"""
|
| 30 |
-
MAIN_PATH = 'https://huggingface.co/datasets/coastalcph/eu_debates/resolve/main'
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
class EUDebatesConfig(datasets.BuilderConfig):
|
| 34 |
-
"""BuilderConfig for EU Debates"""
|
| 35 |
-
|
| 36 |
-
def __init__(
|
| 37 |
-
self,
|
| 38 |
-
data_url,
|
| 39 |
-
citation,
|
| 40 |
-
**kwargs,
|
| 41 |
-
):
|
| 42 |
-
"""BuilderConfig for EU Debates.
|
| 43 |
-
|
| 44 |
-
Args:
|
| 45 |
-
data_url: `string`, url to download the zip file from
|
| 46 |
-
data_file: `string`, filename for data set
|
| 47 |
-
**kwargs: keyword arguments forwarded to super.
|
| 48 |
-
"""
|
| 49 |
-
super(EUDebatesConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
|
| 50 |
-
self.data_url = data_url
|
| 51 |
-
self.citation = citation
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
class EUDebates(datasets.GeneratorBasedBuilder):
|
| 55 |
-
"""EU Debates. Version 1.0"""
|
| 56 |
-
|
| 57 |
-
BUILDER_CONFIGS = [
|
| 58 |
-
EUDebatesConfig(
|
| 59 |
-
name="eu_debates",
|
| 60 |
-
data_url=os.path.join(MAIN_PATH, "eu_debates.zip"),
|
| 61 |
-
citation=textwrap.dedent(MAIN_CITATION),
|
| 62 |
-
),
|
| 63 |
-
]
|
| 64 |
-
|
| 65 |
-
def _info(self):
|
| 66 |
-
features = {"text": datasets.Value("string"),
|
| 67 |
-
"translated_text": datasets.Value("string"),
|
| 68 |
-
"speaker_party": datasets.Value("string"),
|
| 69 |
-
"speaker_role": datasets.Value("string"),
|
| 70 |
-
"speaker_name": datasets.Value("string"),
|
| 71 |
-
"debate_title": datasets.Value("string"),
|
| 72 |
-
"date": datasets.Value("string"),
|
| 73 |
-
"year": datasets.Value("string")}
|
| 74 |
-
return datasets.DatasetInfo(
|
| 75 |
-
description=self.config.description,
|
| 76 |
-
features=datasets.Features(features),
|
| 77 |
-
homepage='https://www.europarl.europa.eu/',
|
| 78 |
-
citation=MAIN_CITATION,
|
| 79 |
-
)
|
| 80 |
-
|
| 81 |
-
def _split_generators(self, dl_manager):
|
| 82 |
-
data_dir = dl_manager.download_and_extract(self.config.data_url)
|
| 83 |
-
return [
|
| 84 |
-
datasets.SplitGenerator(
|
| 85 |
-
name=datasets.Split.TRAIN,
|
| 86 |
-
# These kwargs will be passed to _generate_examples
|
| 87 |
-
gen_kwargs={
|
| 88 |
-
"filepath": os.path.join(data_dir, f"train.jsonl"),
|
| 89 |
-
"split": "train",
|
| 90 |
-
},
|
| 91 |
-
),
|
| 92 |
-
]
|
| 93 |
-
|
| 94 |
-
def _generate_examples(self, filepath, split):
|
| 95 |
-
"""This function returns the examples."""
|
| 96 |
-
with open(filepath, encoding="utf-8") as f:
|
| 97 |
-
for id_, row in enumerate(f):
|
| 98 |
-
data = json.loads(row)
|
| 99 |
-
if data['speaker_role'] == 'MEP':
|
| 100 |
-
example = {
|
| 101 |
-
"text": data["text"] if 'text' in data else None,
|
| 102 |
-
"translated_text": data["translated_text"] if 'translated_text' in data else None,
|
| 103 |
-
"speaker_party": data["speaker_party"],
|
| 104 |
-
"speaker_role": data["speaker_role"],
|
| 105 |
-
"speaker_name": data["speaker_name"],
|
| 106 |
-
"debate_title": data["debate_title"],
|
| 107 |
-
"date": data["date"],
|
| 108 |
-
"year": data["year"]
|
| 109 |
-
}
|
| 110 |
-
yield id_, example
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eu_debates.zip
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:16a1d5d57ac70e4f0b86c8488674ccf571ab2eb2ef0d2d1b575152eb912229a6
|
| 3 |
-
size 89476072
|
|
|
|
|
|
|
|
|
|
|
|