Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
3 |
tags:
|
4 |
-
-
|
5 |
datasets:
|
6 |
- catalonia_independence
|
7 |
metrics:
|
@@ -20,29 +21,24 @@ model-index:
|
|
20 |
- name: Accuracy
|
21 |
type: accuracy
|
22 |
value: 0.7880893300248138
|
|
|
|
|
|
|
23 |
---
|
24 |
|
25 |
-
|
26 |
-
should probably proofread and complete it, then remove this comment. -->
|
27 |
-
|
28 |
-
# roberta-base-bne-finetuned-mnli
|
29 |
|
30 |
This model is a fine-tuned version of [BSC-TeMU/roberta-base-bne](https://huggingface.co/BSC-TeMU/roberta-base-bne) on the catalonia_independence dataset.
|
31 |
It achieves the following results on the evaluation set:
|
32 |
- Loss: 0.9415
|
33 |
- Accuracy: 0.7881
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
More information needed
|
38 |
|
39 |
-
##
|
40 |
-
|
41 |
-
More information needed
|
42 |
-
|
43 |
-
## Training and evaluation data
|
44 |
|
45 |
-
|
|
|
46 |
|
47 |
## Training procedure
|
48 |
|
@@ -67,6 +63,42 @@ The following hyperparameters were used during training:
|
|
67 |
| 0.0605 | 4.0 | 1512 | 0.8809 | 0.7866 |
|
68 |
| 0.0605 | 5.0 | 1890 | 0.9415 | 0.7881 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
### Framework versions
|
72 |
|
@@ -74,3 +106,11 @@ The following hyperparameters were used during training:
|
|
74 |
- Pytorch 1.9.0+cu111
|
75 |
- Datasets 1.12.1
|
76 |
- Tokenizers 0.10.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
language: es
|
4 |
tags:
|
5 |
+
- "spanish"
|
6 |
datasets:
|
7 |
- catalonia_independence
|
8 |
metrics:
|
|
|
21 |
- name: Accuracy
|
22 |
type: accuracy
|
23 |
value: 0.7880893300248138
|
24 |
+
widget:
|
25 |
+
- text: "Junqueras, sobre la decisión judicial sobre Puigdemont: La justicia que falta en el Estado llega y llegará de Europa"
|
26 |
+
- text: "Desconvocada la manifestación del domingo en Barcelona en apoyo a Puigdemont"
|
27 |
---
|
28 |
|
29 |
+
# roberta-base-bne-finetuned-catalonia-independence-detector
|
|
|
|
|
|
|
30 |
|
31 |
This model is a fine-tuned version of [BSC-TeMU/roberta-base-bne](https://huggingface.co/BSC-TeMU/roberta-base-bne) on the catalonia_independence dataset.
|
32 |
It achieves the following results on the evaluation set:
|
33 |
- Loss: 0.9415
|
34 |
- Accuracy: 0.7881
|
35 |
|
36 |
+
<details>
|
|
|
|
|
37 |
|
38 |
+
## Model description
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
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.
|
41 |
+
Each corpus is annotated with three classes: AGAINST, FAVOR and NEUTRAL, which express the stance towards the target - independence of Catalonia.
|
42 |
|
43 |
## Training procedure
|
44 |
|
|
|
63 |
| 0.0605 | 4.0 | 1512 | 0.8809 | 0.7866 |
|
64 |
| 0.0605 | 5.0 | 1890 | 0.9415 | 0.7881 |
|
65 |
|
66 |
+
</details>
|
67 |
+
|
68 |
+
### Model in action 🚀
|
69 |
+
|
70 |
+
Fast usage with **pipelines**:
|
71 |
+
|
72 |
+
```python
|
73 |
+
|
74 |
+
from transformers import pipeline
|
75 |
+
|
76 |
+
model_path = "JonatanGk/roberta-base-bne-finetuned-catalonia-independence-detector"
|
77 |
+
independence_analysis = pipeline("text-classification", model=model_path, tokenizer=model_path)
|
78 |
+
|
79 |
+
independence_analysis(
|
80 |
+
"Junqueras, sobre la decisión judicial sobre Puigdemont: La justicia que falta en el Estado llega y llegará de Europa"
|
81 |
+
)
|
82 |
+
|
83 |
+
# Output:
|
84 |
+
[{'label': 'FAVOR', 'score': 0.9936726093292236}]
|
85 |
+
|
86 |
+
independence_analysis(
|
87 |
+
"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")
|
88 |
+
|
89 |
+
# Output:
|
90 |
+
[{'label': 'AGAINST', 'score': 0.7508948445320129}]
|
91 |
+
|
92 |
+
independence_analysis(
|
93 |
+
"Desconvocada la manifestación del domingo en Barcelona en apoyo a Puigdemont"
|
94 |
+
)
|
95 |
+
|
96 |
+
# Output:
|
97 |
+
[{'label': 'NEUTRAL', 'score': 0.9966907501220703}]
|
98 |
+
|
99 |
+
```
|
100 |
+
|
101 |
+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JonatanGk/Shared-Colab/blob/master/Catalonia_independence_Detector_(SPANISH).ipynb#scrollTo=uNMOXJz38W6U)
|
102 |
|
103 |
### Framework versions
|
104 |
|
|
|
106 |
- Pytorch 1.9.0+cu111
|
107 |
- Datasets 1.12.1
|
108 |
- Tokenizers 0.10.3
|
109 |
+
|
110 |
+
## Citation
|
111 |
+
Thx to HF.co & [@lewtun](https://github.com/lewtun) for Dataset ;)
|
112 |
+
|
113 |
+
|
114 |
+
> Special thx to [Manuel Romero/@mrm8488](https://huggingface.co/mrm8488) as my mentor & R.C.
|
115 |
+
|
116 |
+
> Created by [Jonatan Luna](https://JonatanGk.github.io) | [LinkedIn](https://www.linkedin.com/in/JonatanGk/)
|