Downloads · 30 days
31
2% of all-time downloads
JonatanGk/roberta-base-bne-finetuned-catalonia-independence-detector
roberta-base-bne-finetuned-catalonia-independence-detector is a text classification model from JonatanGk. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of BSC-TeMU/roberta-base-bne on the cataloniaindependence dataset. It achieves the following results on the evaluation set: - Loss: 0.9415 - Accuracy: 0.7881
Downloads · 30 days
31
2% of all-time downloads
All-time downloads
1.5K
Public
Repo size
2.5 GB
Likes
1
Public
Click a slice to open those files.
.bin499 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of BSC-TeMU/roberta-base-bne on the catalonia_independence dataset. It achieves the following results on the evaluation set:
The data was collected over 12 days during February and March of 2019 from tweets posted in Barcelona, and during September of 2018 from tweets posted in the town of Terrassa, Catalonia. Each corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| No log | 1.0 | 378 | 0.5534 | 0.7558 |
| 0.6089 | 2.0 | 756 | 0.5315 | 0.7643 |
| 0.2678 | 3.0 | 1134 | 0.7336 | 0.7816 |
| 0.0605 | 4.0 | 1512 | 0.8809 | 0.7866 |
| 0.0605 | 5.0 | 1890 | 0.9415 | 0.7881 |
Fast usage with pipelines:
from transformers import pipeline
model_path = "JonatanGk/roberta-base-bne-finetuned-catalonia-independence-detector"
independence_analysis = pipeline("text-classification", model=model_path, tokenizer=model_path)
independence_analysis(
"Junqueras, sobre la decisión judicial sobre Puigdemont: La justicia que falta en el Estado llega y llegará de Europa"
)
# Output:
[{'label': 'FAVOR', 'score': 0.9936726093292236}]
independence_analysis(
"El desafío independentista queda adormecido, y eso que el Gobierno ha sido muy claro en que su propuesta para Cataluña es una agenda de reencuentro, centrada en inversiones e infraestructuras")
# Output:
[{'label': 'AGAINST', 'score': 0.7508948445320129}]
independence_analysis(
"Desconvocada la manifestación del domingo en Barcelona en apoyo a Puigdemont"
)
# Output:
[{'label': 'NEUTRAL', 'score': 0.9966907501220703}]
Thx to HF.co & @lewtun for Dataset ;)
Special thx to Manuel Romero/@mrm8488 as my mentor & R.C.
Created by Jonatan Luna | LinkedIn