Downloads · 30 days
24
2% of all-time downloads
JonatanGk/roberta-base-ca-finetuned-catalonia-independence-detector
roberta-base-ca-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-ca on the cataloniaindependence dataset. It achieves the following results on the evaluation set: - Loss: 0.6065 - Accuracy: 0.7612
Downloads · 30 days
24
2% of all-time downloads
All-time downloads
1.3K
Public
Repo size
5 GB
Likes
1
Public
Click a slice to open those files.
.bin504 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of BSC-TeMU/roberta-base-ca 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 | 377 | 0.6311 | 0.7453 |
| 0.7393 | 2.0 | 754 | 0.6065 | 0.7612 |
| 0.5019 | 3.0 | 1131 | 0.6340 | 0.7547 |
| 0.3837 | 4.0 | 1508 | 0.6777 | 0.7597 |
| 0.3837 | 5.0 | 1885 | 0.7232 | 0.7582 |
Fast usage with pipelines:
from transformers import pipeline
model_path = "JonatanGk/roberta-base-ca-finetuned-catalonia-independence-detector"
independence_analysis = pipeline("text-classification", model=model_path, tokenizer=model_path)
independence_analysis(
"Assegura l'expert que en un 46% els catalans s'inclouen dins del que es denomina com el doble sentiment identitari. És a dir, se senten tant catalans com espanyols. 1 de cada cinc, en canvi, té un sentiment excloent, només se senten catalans, i un 4% sol espanyol."
)
# Output:
[{'label': 'AGAINST', 'score': 0.7457581758499146}]
independence_analysis(
"Llarena demana la detenció de Comín i Ponsatí aprofitant que són a Itàlia amb Puigdemont"
)
# Output:
[{'label': 'NEUTRAL', 'score': 0.7436802983283997}]
independence_analysis(
"Puigdemont, a l'estat espanyol: Quatre anys després, ens hem guanyat el dret a dir prou"
)
# Output:
[{'label': 'FAVOR', 'score': 0.9040119647979736}]
Thx to HF.co & @lewtun for Dataset ;)
Special thx to Manuel Romero/@mrm8488 as my mentor & R.C.
Created by Jonatan Luna | LinkedIn