File size: 1,461 Bytes
090d775 840d25c 090d775 840d25c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ---
language: multilingual
license: mit
tags:
- text-classification
- political-science
- euroscepticism
- parliamentary-speech
base_model: jhu-clsp/mmBERT-base
---
# EU_Ukraine
Binary classifier: is a parliamentary sentence about the European Union (EU=1)
or not (EU=0)? Fine-tuned from `jhu-clsp/mmBERT-base` on hand-annotated parliamentary
speeches, including Ukrainian Rada data alongside other European parliaments.
## Labels
- `0` — Non-EU
- `1` — EU
## Training
- Base model: `jhu-clsp/mmBERT-base`
- Max sequence length: 320
- Train/val/test split: leakage-safe (StratifiedGroupKFold on country × speech_ID)
- Loss: cross-entropy with balanced class weights
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tok = AutoTokenizer.from_pretrained("LBenoit/EU_Ukraine")
mdl = AutoModelForSequenceClassification.from_pretrained("LBenoit/EU_Ukraine")
text = "The European Commission proposed new climate targets."
enc = tok(text, truncation=True, max_length=320, return_tensors="pt")
with torch.no_grad():
logits = mdl(**enc).logits
probs = torch.softmax(logits, dim=-1)[0]
pred = int(probs.argmax().item())
prob = probs[1].item()
print(pred, prob)
```
## Intended use
Research on parliamentary discourse about the EU. Outputs reflect the
training corpus and annotation scheme; downstream prevalence estimates
should ideally be calibrated against a base-rate-representative sample.
|