You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Our models are intended for academic use only. If you are not affiliated with an academic institution, please provide a rationale for using our models. Please allow us a few business days to manually review subscriptions.
If you use our models for your work or research, please cite this paper: Sebők, M., Máté, Á., Ring, O., Kovács, V., & Lehoczki, R. (2024). Leveraging Open Large Language Models for Multilingual Policy Topic Classification: The Babel Machine Approach. Social Science Computer Review, 43(2), 295-317. https://doi.org/10.1177/08944393241259434

Log in or Sign Up to review the conditions and access this model content.

xlm-roberta-large-norwegian-cap-v3

An xlm-roberta-large model finetuned on norwegian training data containing texts labelled with major topic codes from the Comparative Agendas Project.

How to use the model

from transformers import AutoTokenizer, pipeline

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
pipe = pipeline(
    model=poltextlab/xlm-roberta-large-norwegian-cap-v3,
    task="text-classification",
    tokenizer=tokenizer,
    use_fast=False,
    token="<your_hf_read_only_token>"
)

text = "<text_to_classify>"
pipe(text)

Classification Report

Overall Performance:

  • Accuracy: 89%
  • Macro Avg: Precision: 0.81, Recall: 0.77, F1-score: 0.77
  • Weighted Avg: Precision: 0.89, Recall: 0.89, F1-score: 0.89

Per-Class Metrics:

Label Precision Recall F1-score Support
(1) Macroeconomics 0.92 0.91 0.92 946
(2) Civil Rights 0.75 0.9 0.82 119
(3) Health 0.93 0.94 0.93 1007
(4) Agriculture 0.79 0.83 0.81 138
(5) Labor 0.58 0.6 0.59 75
(6) Education 0.94 0.92 0.93 507
(7) Environment 0.86 0.84 0.85 582
(8) Energy 0.94 0.89 0.91 306
(9) Immigration 0.96 0.86 0.91 108
(10) Transportation 0.89 0.93 0.91 696
(12) Law and Crime 0.94 0.92 0.93 352
(13) Social Welfare 0.92 0.89 0.9 711
(14) Housing 0.86 0.86 0.86 1296
(15) Banking, Finance, and Domestic Commerce 0.83 0.89 0.86 980
(16) Defense 0.75 0.67 0.71 9
(17) Technology 0.77 0.72 0.74 32
(18) Foreign Trade 0 0 0 1
(19) International Affairs 0.67 0.61 0.64 23
(20) Government Operations 0.92 0.91 0.92 2411
(21) Public Lands 0.81 0.83 0.82 434
(23) Culture 0.79 0.81 0.8 230
(999) No Policy Content 1 0.12 0.22 16

Reference

Sebők, M., Máté, Á., Ring, O., Kovács, V., & Lehoczki, R. (2024). Leveraging Open Large Language Models for Multilingual Policy Topic Classification: The Babel Machine Approach. Social Science Computer Review, 43(2), 295-317. https://doi.org/10.1177/08944393241259434

Inference platform

This model is used by the CAP Babel Machine, an open-source and free natural language processing tool, designed to simplify and speed up projects for comparative research.

Cooperation

Model performance can be significantly improved by extending our training sets. We appreciate every submission of CAP-coded corpora (of any domain and language) at poltextlab{at}poltextlab{dot}com or by using the CAP Babel Machine.

Debugging and issues

This architecture uses the sentencepiece tokenizer. In order to run the model before transformers==4.27 you need to install it manually.

Downloads last month
1,248
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for poltextlab/xlm-roberta-large-norwegian-cap-v3

Finetuned
(870)
this model

Collection including poltextlab/xlm-roberta-large-norwegian-cap-v3

Evaluation results