
### Welcome to ParlBERT-Topic-German!

🏷 **Model description**

This model was trained on \~10k manually annotated interpellations (📚 [Breunig/ Schnatterer 2019](https://oxford.universitypressscholarship.com/view/10.1093/oso/9780198835332.001.0001/oso-9780198835332)) with topics from the [Comparative Agendas Project](https://www.comparativeagendas.net/datasets_codebooks) to classify text into one of twenty labels (annotation codebook).

_Note: "Interpellation is a formal request of a parliament to the respective government."([Wikipedia](https://en.wikipedia.org/wiki/Interpellation_(politics)))_

🗃 **Dataset**

| party | speeches | tokens |
|----|----|----|
| CDU/CSU | 7,635 | 4,862,654 |
| SPD | 5,321 | 3,158,315 |
| AfD | 3,465 | 1,844,707 |
| FDP | 3,067 | 1,593,108 |
| The Greens | 2,866 | 1,522,305 |
| The Left | 2,671 | 1,394,089 |
| cross-bencher | 200 | 86,170 |

🏃🏼‍♂️**Model training**

**ParlBERT-Topic-German** was fine-tuned on a domain adapted model (GermanBERT fine-tuned on [DeuParl](https://tudatalib.ulb.tu-darmstadt.de/handle/tudatalib/2889?show=full)) for topic modeling with an interpellations dataset (📚 [Breunig/ Schnatterer 2019](https://oxford.universitypressscholarship.com/view/10.1093/oso/9780198835332.001.0001/oso-9780198835332)) from the [Comparative Agendas Project](https://www.comparativeagendas.net/datasets_codebooks).

🤖 **Use** 

```python
from transformers import pipeline

pipeline_classification_topics = pipeline("text-classification", model="chkla/parlbert-topic-german", return_all_scores=False)
text = "Das Sachgebiet Investive Ausgaben des Bundes Bundesfinanzminister Apel hat gemäß BMF Finanznachrichten vom 1. Januar erklärt, die Investitionsquote des Bundes sei in den letzten zehn Jahren nahezu konstant geblieben."
pipeline_classification_topics(text) # Macroeconomics

```


📊 **Evaluation**

The model was evaluated on an evaluation set (20%):

| Label | F1 | support |
|----|----|----|
| International | 80.0 | 1,126 |
| Defense | 85.0 | 1,099 |
| Government | 71.3 | 989 |
| Civil Rights | 76.5 | 978 |
| Environment | 76.6 | 845 |
| Transportation | 86.0 | 800 |
| Law & Crime | 67.1 | 492 |
| Energy | 78.6 | 424 |
| Health | 78.2 | 418 |
| Domestic Com. | 64.4 | 382 |
| Immigration | 81.0 | 376 |
| Labor | 69.1 | 344 |
| Macroeconom. | 62.8 | 339 |
| Agriculture | 76.3 | 292 |
| Social Welfare | 49.2 | 253 |
| Technology | 63.0 | 252 |
| Education | 71.6 | 183 |
| Housing | 79.6 | 178 |
| Foreign Trade | 61.5 | 139 |
| Culture | 54.6 | 69 |
| Public Lands | 45.4 | 55 |


⚠️ **Limitations**

Models are often highly topic dependent. Therefore, the model may perform less well on different topics and text types not included in the training set.

👥 **Cite**
```
@article{klamm2022frameast,
  title={FrameASt: A Framework for Second-level Agenda Setting in Parliamentary Debates through the Lense of Comparative Agenda Topics},
  author={Klamm, Christopher and Rehbein, Ines and Ponzetto, Simone},
  journal={ParlaCLARIN III at LREC2022},
  year={2022}
}
```

🐦 Twitter: [@chklamm](http://twitter.com/chklamm)
{"language": "de", "widget": [{"text": "Das Sachgebiet Investive Ausgaben des Bundes Bundesfinanzminister Apel hat gem\u00e4\u00df BMF Finanznachrichten vom 1. Januar erkl\u00e4rt, die Investitionsquote des Bundes sei in den letzten zehn Jahren nahezu konstant geblieben."}]}
transformers pytorch safetensors bert text-classification de autotrain_compatible endpoints_compatible has_space region:us
TAGS
#transformers #pytorch #safetensors #bert #text-classification #de #autotrain_compatible #endpoints_compatible #has_space #region-us 

### Welcome to ParlBERT-Topic-German!


Model description


This model was trained on ~10k manually annotated interpellations ( Breunig/ Schnatterer 2019) with topics from the Comparative Agendas Project to classify text into one of twenty labels (annotation codebook).


*Note: "Interpellation is a formal request of a parliament to the respective government."(Wikipedia))*


Dataset


party: CDU/CSU, speeches: 7,635, tokens: 4,862,654
party: SPD, speeches: 5,321, tokens: 3,158,315
party: AfD, speeches: 3,465, tokens: 1,844,707
party: FDP, speeches: 3,067, tokens: 1,593,108
party: The Greens, speeches: 2,866, tokens: 1,522,305
party: The Left, speeches: 2,671, tokens: 1,394,089
party: cross-bencher, speeches: 200, tokens: 86,170


‍️Model training


ParlBERT-Topic-German was fine-tuned on a domain adapted model (GermanBERT fine-tuned on DeuParl) for topic modeling with an interpellations dataset ( Breunig/ Schnatterer 2019) from the Comparative Agendas Project.


Use


Evaluation


The model was evaluated on an evaluation set (20%):


Label: International, F1: 80.0, support: 1,126
Label: Defense, F1: 85.0, support: 1,099
Label: Government, F1: 71.3, support: 989
Label: Civil Rights, F1: 76.5, support: 978
Label: Environment, F1: 76.6, support: 845
Label: Transportation, F1: 86.0, support: 800
Label: Law & Crime, F1: 67.1, support: 492
Label: Energy, F1: 78.6, support: 424
Label: Health, F1: 78.2, support: 418
Label: Domestic Com., F1: 64.4, support: 382
Label: Immigration, F1: 81.0, support: 376
Label: Labor, F1: 69.1, support: 344
Label: Macroeconom., F1: 62.8, support: 339
Label: Agriculture, F1: 76.3, support: 292
Label: Social Welfare, F1: 49.2, support: 253
Label: Technology, F1: 63.0, support: 252
Label: Education, F1: 71.6, support: 183
Label: Housing, F1: 79.6, support: 178
Label: Foreign Trade, F1: 61.5, support: 139
Label: Culture, F1: 54.6, support: 69
Label: Public Lands, F1: 45.4, support: 55


️ Limitations


Models are often highly topic dependent. Therefore, the model may perform less well on different topics and text types not included in the training set.


Cite


Twitter: @chklamm



### Welcome to ParlBERT-Topic-German!


Model description


This model was trained on ~10k manually annotated interpellations ( Breunig/ Schnatterer 2019) with topics from the Comparative Agendas Project to classify text into one of twenty labels (annotation codebook).


*Note: "Interpellation is a formal request of a parliament to the respective government."(Wikipedia))*


Dataset


party: CDU/CSU, speeches: 7,635, tokens: 4,862,654
party: SPD, speeches: 5,321, tokens: 3,158,315
party: AfD, speeches: 3,465, tokens: 1,844,707
party: FDP, speeches: 3,067, tokens: 1,593,108
party: The Greens, speeches: 2,866, tokens: 1,522,305
party: The Left, speeches: 2,671, tokens: 1,394,089
party: cross-bencher, speeches: 200, tokens: 86,170


‍️Model training


ParlBERT-Topic-German was fine-tuned on a domain adapted model (GermanBERT fine-tuned on DeuParl) for topic modeling with an interpellations dataset ( Breunig/ Schnatterer 2019) from the Comparative Agendas Project.


Use


Evaluation


The model was evaluated on an evaluation set (20%):


Label: International, F1: 80.0, support: 1,126
Label: Defense, F1: 85.0, support: 1,099
Label: Government, F1: 71.3, support: 989
Label: Civil Rights, F1: 76.5, support: 978
Label: Environment, F1: 76.6, support: 845
Label: Transportation, F1: 86.0, support: 800
Label: Law & Crime, F1: 67.1, support: 492
Label: Energy, F1: 78.6, support: 424
Label: Health, F1: 78.2, support: 418
Label: Domestic Com., F1: 64.4, support: 382
Label: Immigration, F1: 81.0, support: 376
Label: Labor, F1: 69.1, support: 344
Label: Macroeconom., F1: 62.8, support: 339
Label: Agriculture, F1: 76.3, support: 292
Label: Social Welfare, F1: 49.2, support: 253
Label: Technology, F1: 63.0, support: 252
Label: Education, F1: 71.6, support: 183
Label: Housing, F1: 79.6, support: 178
Label: Foreign Trade, F1: 61.5, support: 139
Label: Culture, F1: 54.6, support: 69
Label: Public Lands, F1: 45.4, support: 55


️ Limitations


Models are often highly topic dependent. Therefore, the model may perform less well on different topics and text types not included in the training set.


Cite


Twitter: @chklamm
TAGS
#transformers #pytorch #safetensors #bert #text-classification #de #autotrain_compatible #endpoints_compatible #has_space #region-us 
 ### Welcome to ParlBERT-Topic-German!


Model description


This model was trained on ~10k manually annotated interpellations ( Breunig/ Schnatterer 2019) with topics from the Comparative Agendas Project to classify text into one of twenty labels (annotation codebook).


*Note: "Interpellation is a formal request of a parliament to the respective government."(Wikipedia))*


Dataset


party: CDU/CSU, speeches: 7,635, tokens: 4,862,654
party: SPD, speeches: 5,321, tokens: 3,158,315
party: AfD, speeches: 3,465, tokens: 1,844,707
party: FDP, speeches: 3,067, tokens: 1,593,108
party: The Greens, speeches: 2,866, tokens: 1,522,305
party: The Left, speeches: 2,671, tokens: 1,394,089
party: cross-bencher, speeches: 200, tokens: 86,170


‍️Model training


ParlBERT-Topic-German was fine-tuned on a domain adapted model (GermanBERT fine-tuned on DeuParl) for topic modeling with an interpellations dataset ( Breunig/ Schnatterer 2019) from the Comparative Agendas Project.


Use


Evaluation


The model was evaluated on an evaluation set (20%):


Label: International, F1: 80.0, support: 1,126
Label: Defense, F1: 85.0, support: 1,099
Label: Government, F1: 71.3, support: 989
Label: Civil Rights, F1: 76.5, support: 978
Label: Environment, F1: 76.6, support: 845
Label: Transportation, F1: 86.0, support: 800
Label: Law & Crime, F1: 67.1, support: 492
Label: Energy, F1: 78.6, support: 424
Label: Health, F1: 78.2, support: 418
Label: Domestic Com., F1: 64.4, support: 382
Label: Immigration, F1: 81.0, support: 376
Label: Labor, F1: 69.1, support: 344
Label: Macroeconom., F1: 62.8, support: 339
Label: Agriculture, F1: 76.3, support: 292
Label: Social Welfare, F1: 49.2, support: 253
Label: Technology, F1: 63.0, support: 252
Label: Education, F1: 71.6, support: 183
Label: Housing, F1: 79.6, support: 178
Label: Foreign Trade, F1: 61.5, support: 139
Label: Culture, F1: 54.6, support: 69
Label: Public Lands, F1: 45.4, support: 55


️ Limitations


Models are often highly topic dependent. Therefore, the model may perform less well on different topics and text types not included in the training set.


Cite


Twitter: @chklamm
passage: TAGS
#transformers #pytorch #safetensors #bert #text-classification #de #autotrain_compatible #endpoints_compatible #has_space #region-us 
