Downloads · 30 days
22
9% of all-time downloads
pdjohn/EuroBERT-610m-term-sense
EuroBERT-610m-term-sense is a text classification model from pdjohn. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Fine-tuned EuroBERT-610M for disambiguating International Relations term senses in German.
Downloads · 30 days
22
9% of all-time downloads
All-time downloads
241
Public
Parameters
608M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
Fine-tuned EuroBERT-610M for disambiguating International Relations term senses in German.
This model distinguishes between specialized (International Relations) and colloquial usage of German political science terms:
Input: "Die internationale Norm verbietet den Einsatz von Gewalt."
Output: IR sense (specialized usage)
Input: "Das entspricht nicht den technischen Normen in Deutschland."
Output: Colloquial sense (general usage)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model_name = "pdjohn/EuroBERT-610m-term-sense"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# Classify a sentence
sentence = "Die internationale Norm verbietet den Einsatz von Gewalt."
inputs = tokenizer(sentence, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=1).item()
# Interpretation
labels = {0: "Colloquial", 1: "IR Sense"}
print(f"Prediction: {labels[prediction]}")
This work was conducted as part of the Tracing International Institutions and Behavior (TIIB) project at TU Darmstadt.
Affiliation: Chair of Transnational Governance, Department of Political Science, Technische Universität Darmstadt
We thank the TIIB project team for their support and the manual annotation of the training corpus.