cornelius commited on
Commit
5f4bcb6
1 Parent(s): c8fdb4e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +125 -19
README.md CHANGED
@@ -1,48 +1,154 @@
1
  ---
2
  license: cc-by-sa-4.0
 
 
 
 
 
3
  tags:
4
- - generated_from_keras_callback
5
- model-index:
6
- - name: partypress-monolingual-ireland
7
- results: []
 
 
8
  ---
9
 
10
- <!-- This model card has been generated automatically according to the information Keras had access to. You should
11
- probably proofread and complete it, then remove this comment. -->
12
 
13
- # partypress-monolingual-ireland
14
 
15
- This model is a fine-tuned version of [cornelius/partypress-monolingual-ireland](https://huggingface.co/cornelius/partypress-monolingual-ireland) on an unknown dataset.
16
- It achieves the following results on the evaluation set:
 
 
17
 
18
 
19
  ## Model description
20
 
21
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ## Intended uses & limitations
24
 
25
- More information needed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- ## Training and evaluation data
28
 
29
- More information needed
 
 
 
 
30
 
31
  ## Training procedure
32
 
33
- ### Training hyperparameters
 
 
 
 
 
 
 
 
 
 
34
 
35
- The following hyperparameters were used during training:
36
- - optimizer: None
37
- - training_precision: float32
38
 
39
- ### Training results
40
 
 
41
 
42
 
43
- ### Framework versions
44
 
45
  - Transformers 4.28.0
46
  - TensorFlow 2.12.0
47
  - Datasets 2.12.0
48
  - Tokenizers 0.13.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-sa-4.0
3
+ language:
4
+ - en
5
+ metrics:
6
+ - accuracy
7
+ pipeline_tag: text-classification
8
  tags:
9
+ - partypress
10
+ - political science
11
+ - parties
12
+ - press releases
13
+ widget:
14
+ - text: "The Labour Party will seek to re-open negotiations on sugar production on the possibility of regaining sugar quota when the matter comes up for review at EU level.The commitment follows last week's hearing of the Oireachtas Agricultural Committee at which it was stated that Ireland could not have access to sugar quota at this time.Sean Sherlock said: What this means in real terms is that Ireland is not allowed to produce sugar for the EU domestic market nor for export to countries outside the EU. However, the review of the current EU sugar regime scheduled to take place in 2014 must be seized as an opportunity to secure an allocation of tonnage or quota to enable Ireland produce sugar again. While this is an issue dominated by countries such as Germany and France the Labour Party will adopt a strong position and we will be seeking a feasibility study involving all stakeholders and a renegotiation at European level through intense dialogue with our European partners."
15
  ---
16
 
17
+ # PARTYPRESS monolingual Ireland
 
18
 
 
19
 
20
+
21
+
22
+ Fine-tuned model, based on [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english). Used in Erfort et al. (2023), building on the PARTYPRESS database. For the downstream task of classyfing press releases from political parties into 23 unique policy areas we achieve a performance comparable to expert human coders.
23
+
24
 
25
 
26
  ## Model description
27
 
28
+ The PARTYPRESS monolingual model builds on [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) but has a supervised component. This means, it was fine-tuned using texts labeled by humans. The labels indicate 23 different political issue categories derived from the Comparative Agendas Project (CAP):
29
+ | Code | Issue |
30
+ |--|-------|
31
+ | 1 | Macroeconomics |
32
+ | 2 | Civil Rights |
33
+ | 3 | Health |
34
+ | 4 | Agriculture |
35
+ | 5 | Labor |
36
+ | 6 | Education |
37
+ | 7 | Environment |
38
+ | 8 | Energy |
39
+ | 9 | Immigration |
40
+ | 10 | Transportation |
41
+ | 12 | Law and Crime |
42
+ | 13 | Social Welfare |
43
+ | 14 | Housing |
44
+ | 15 | Domestic Commerce |
45
+ | 16 | Defense |
46
+ | 17 | Technology |
47
+ | 18 | Foreign Trade |
48
+ | 19.1 | International Affairs |
49
+ | 19.2 | European Union |
50
+ | 20 | Government Operations |
51
+ | 23 | Culture |
52
+ | 98 | Non-thematic |
53
+ | 99 | Other |
54
+
55
+ ## Model variations
56
+
57
+ There are several monolingual models for different countries, and a multilingual model. The multilingual model can be easily extended to other languages, country contexts, or time periods by fine-tuning it with minimal additional labeled texts.
58
 
59
  ## Intended uses & limitations
60
 
61
+ The main use of the model is for text classification of press releases from political parties. It may also be useful for other political texts.
62
+
63
+ The classification can then be used to measure which issues parties are discussing in their communication.
64
+
65
+ ### How to use
66
+
67
+ This model can be used directly with a pipeline for text classification:
68
+
69
+ ```python
70
+ >>> from transformers import pipeline
71
+ >>> tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512}
72
+ >>> partypress = pipeline("text-classification", model = "cornelius/partypress-monolingual-ireland", tokenizer = "cornelius/partypress-monolingual-ireland", **tokenizer_kwargs)
73
+ >>> partypress("Your text here.")
74
+ ```
75
+
76
+ ### Limitations and bias
77
+
78
+ The model was trained with data from parties in Ireland. For use in other countries, the model may be further fine-tuned. Without further fine-tuning, the performance of the model may be lower.
79
 
80
+ The model may have biased predictions. We discuss some biases by country, party, and over time in the release paper for the PARTYPRESS database. For example, the performance is highest for press releases from Ireland (75%) and lowest for Poland (55%).
81
 
82
+ ## Training data
83
+
84
+ The PARTYPRESS multilingual model was fine-tuned with about 3,000 press releases from parties in Ireland. The press releases were labeled by two expert human coders.
85
+
86
+ For the training data of the underlying model, please refer to [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english)
87
 
88
  ## Training procedure
89
 
90
+ ### Preprocessing
91
+
92
+ For the preprocessing, please refer to [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english)
93
+
94
+
95
+
96
+ ### Pretraining
97
+
98
+ For the pretraining, please refer to [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english)
99
+
100
+ ### Fine-tuning
101
 
102
+ We fine-tuned the model using about 3,000 labeled press releases from political parties in Ireland.
 
 
103
 
104
+ #### Training Hyperparameters
105
 
106
+ The batch size for training was 12, for testing 2, with four epochs. All other hyperparameters were the standard from the transformers library.
107
 
108
 
109
+ #### Framework versions
110
 
111
  - Transformers 4.28.0
112
  - TensorFlow 2.12.0
113
  - Datasets 2.12.0
114
  - Tokenizers 0.13.3
115
+
116
+
117
+ ## Evaluation results
118
+
119
+ Fine-tuned on our downstream task, this model achieves the following results in a five-fold cross validation that are comparable to the performance of our expert human coders. Please refer to Erfort et al. (2023)
120
+
121
+ ### BibTeX entry and citation info
122
+
123
+ ```bibtex
124
+ @article{erfort_partypress_2023,
125
+ author = {Cornelius Erfort and
126
+ Lukas F. Stoetzer and
127
+ Heike Klüver},
128
+ title = {The PARTYPRESS Database: A New Comparative Database of Parties’ Press Releases},
129
+ journal = {Research and Politics},
130
+ volume = {forthcoming},
131
+ year = {2023},
132
+ }
133
+ ```
134
+
135
+ ### Further resources
136
+
137
+ Github: [cornelius-erfort/partypress](https://github.com/cornelius-erfort/partypress)
138
+
139
+ Research and Politics Dataverse: [Replication Data for: The PARTYPRESS Database: A New Comparative Database of Parties’ Press Releases](https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi%3A10.7910%2FDVN%2FOINX7Q)
140
+
141
+
142
+
143
+ ## Acknowledgements
144
+
145
+ Research for this contribution is part of the Cluster of Excellence "Contestations of the Liberal Script" (EXC 2055, Project-ID: 390715649), funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Ireland´s Excellence Strategy. Cornelius Erfort is moreover grateful for generous funding provided by the DFG through the Research Training Group DYNAMICS (GRK 2458/1).
146
+
147
+ ## Contact
148
+
149
+ Cornelius Erfort
150
+
151
+ Humboldt-Universität zu Berlin
152
+
153
+ [corneliuserfort.de](corneliuserfort.de)
154
+