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.

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

xlm-roberta-large-english-social-cap-v3

Model description

An xlm-roberta-large model finetuned on english training data containing texts of the social media domain 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-english-social-cap-v3,
    task="text-classification",
    tokenizer=tokenizer,
    use_fast=False,
    token="<your_hf_read_only_token>"
)

text = "<text_to_classify>"
pipe(text)

Gated access

Due to the gated access, you must pass the token parameter when loading the model. In earlier versions of the Transformers package, you may need to use the use_auth_token parameter instead.

Classification Report

Overall Performance:

  • Accuracy: 94%
  • Macro Avg: Precision: 0.93, Recall: 0.94, F1-score: 0.93
  • Weighted Avg: Precision: 0.94, Recall: 0.94, F1-score: 0.94

Per-Class Metrics:

Label Precision Recall F1-score Support
(1) Macroeconomics 0.94 0.95 0.95 14313
(2) Civil Rights 0.95 0.96 0.95 24505
(3) Health 0.96 0.96 0.96 38129
(4) Agriculture 0.95 0.96 0.95 5704
(5) Labor 0.92 0.93 0.92 4643
(6) Education 0.94 0.93 0.94 8564
(7) Environment 0.95 0.96 0.96 12957
(8) Energy 0.93 0.93 0.93 4274
(9) Immigration 0.93 0.93 0.93 5280
(10) Transportation 0.92 0.94 0.93 4936
(12) Law and Crime 0.94 0.94 0.94 24453
(13) Social Welfare 0.89 0.92 0.9 5241
(14) Housing 0.9 0.92 0.91 4753
(15) Banking, Finance, and Domestic Commerce 0.94 0.93 0.93 13285
(16) Defense 0.91 0.93 0.92 14720
(17) Technology 0.91 0.92 0.91 4180
(18) Foreign Trade 0.92 0.89 0.9 1888
(19) International Affairs 0.95 0.97 0.96 45260
(20) Government Operations 0.94 0.94 0.94 36955
(21) Public Lands 0.87 0.94 0.9 4701
(23) Culture 0.92 0.94 0.93 25099
(999) No Policy Content 0.93 0.9 0.92 85756

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,744
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for poltextlab/xlm-roberta-large-english-social-cap-v3

Finetuned
(905)
this model

Collection including poltextlab/xlm-roberta-large-english-social-cap-v3

Evaluation results