finiteautomata
commited on
Commit
•
91676c9
1
Parent(s):
740571f
First version of robertuito
Browse files- README.md +51 -0
- config.json +39 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- test_results.json +20 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Sentiment Analysis in Spanish
|
2 |
+
## robertuito-sentiment-analysis
|
3 |
+
|
4 |
+
Repository: [https://github.com/pysentimiento/pysentimiento/](https://github.com/finiteautomata/pysentimiento/)
|
5 |
+
|
6 |
+
|
7 |
+
Model trained with TASS 2020 corpus (around ~5k tweets) of several dialects of Spanish. Base model is [RoBERTuito](https://github.com/pysentimiento/robertuito), a RoBERTa model trained in Spanish tweets.
|
8 |
+
|
9 |
+
Uses `POS`, `NEG`, `NEU` labels.
|
10 |
+
|
11 |
+
|
12 |
+
## Results
|
13 |
+
|
14 |
+
Results for the four tasks evaluated in `pysentimiento`. Results are expressed as Macro F1 scores
|
15 |
+
|
16 |
+
|
17 |
+
| model | emotion | hate_speech | irony | sentiment |
|
18 |
+
|:--------------|:--------------|:--------------|:--------------|:--------------|
|
19 |
+
| robertuito | 0.560 ± 0.010 | 0.759 ± 0.007 | 0.739 ± 0.005 | 0.705 ± 0.003 |
|
20 |
+
| roberta | 0.527 ± 0.015 | 0.741 ± 0.012 | 0.721 ± 0.008 | 0.670 ± 0.006 |
|
21 |
+
| bertin | 0.524 ± 0.007 | 0.738 ± 0.007 | 0.713 ± 0.012 | 0.666 ± 0.005 |
|
22 |
+
| beto_uncased | 0.532 ± 0.012 | 0.727 ± 0.016 | 0.701 ± 0.007 | 0.651 ± 0.006 |
|
23 |
+
| beto_cased | 0.516 ± 0.012 | 0.724 ± 0.012 | 0.705 ± 0.009 | 0.662 ± 0.005 |
|
24 |
+
| mbert_uncased | 0.493 ± 0.010 | 0.718 ± 0.011 | 0.681 ± 0.010 | 0.617 ± 0.003 |
|
25 |
+
| biGRU | 0.264 ± 0.007 | 0.592 ± 0.018 | 0.631 ± 0.011 | 0.585 ± 0.011 |
|
26 |
+
|
27 |
+
|
28 |
+
Note that for Hate Speech, these are the results for Semeval 2019, Task 5 Subtask B
|
29 |
+
|
30 |
+
## Citation
|
31 |
+
|
32 |
+
If you use this model in your research, please cite pysentimiento and RoBERTuito papers:
|
33 |
+
|
34 |
+
```
|
35 |
+
@misc{perez2021pysentimiento,
|
36 |
+
title={pysentimiento: A Python Toolkit for Sentiment Analysis and SocialNLP tasks},
|
37 |
+
author={Juan Manuel Pérez and Juan Carlos Giudici and Franco Luque},
|
38 |
+
year={2021},
|
39 |
+
eprint={2106.09462},
|
40 |
+
archivePrefix={arXiv},
|
41 |
+
primaryClass={cs.CL}
|
42 |
+
}
|
43 |
+
@misc{perez2021robertuito,
|
44 |
+
title={RoBERTuito: a pre-trained language model for social media text in Spanish},
|
45 |
+
author={Juan Manuel Pérez and Damián A. Furman and Laura Alonso Alemany and Franco Luque},
|
46 |
+
year={2021},
|
47 |
+
eprint={2111.09453},
|
48 |
+
archivePrefix={arXiv},
|
49 |
+
primaryClass={cs.CL}
|
50 |
+
}
|
51 |
+
```
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "pysentimiento/robertuito-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"gradient_checkpointing": false,
|
11 |
+
"hidden_act": "gelu",
|
12 |
+
"hidden_dropout_prob": 0.1,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "NEG",
|
16 |
+
"1": "NEU",
|
17 |
+
"2": "POS"
|
18 |
+
},
|
19 |
+
"initializer_range": 0.02,
|
20 |
+
"intermediate_size": 3072,
|
21 |
+
"label2id": {
|
22 |
+
"NEG": 0,
|
23 |
+
"NEU": 1,
|
24 |
+
"POS": 2
|
25 |
+
},
|
26 |
+
"layer_norm_eps": 1e-12,
|
27 |
+
"max_position_embeddings": 130,
|
28 |
+
"model_type": "roberta",
|
29 |
+
"num_attention_heads": 12,
|
30 |
+
"num_hidden_layers": 12,
|
31 |
+
"pad_token_id": 1,
|
32 |
+
"position_embedding_type": "absolute",
|
33 |
+
"problem_type": "single_label_classification",
|
34 |
+
"torch_dtype": "float32",
|
35 |
+
"transformers_version": "4.11.3",
|
36 |
+
"type_vocab_size": 1,
|
37 |
+
"use_cache": true,
|
38 |
+
"vocab_size": 30002
|
39 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c09a0038e4456ae5ff46a780cc37449191c71497ae6bf56283b610145ac7a46c
|
3 |
+
size 435246509
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": "<mask>"}
|
test_results.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"test_loss": 0.9389793872833252,
|
3 |
+
"test_neg_f1": 0.7858959145617902,
|
4 |
+
"test_neg_precision": 0.7831081081081082,
|
5 |
+
"test_neg_recall": 0.7887036406941137,
|
6 |
+
"test_neu_f1": 0.5708963911525029,
|
7 |
+
"test_neu_precision": 0.5264061829111206,
|
8 |
+
"test_neu_recall": 0.6236012207527976,
|
9 |
+
"test_pos_f1": 0.7628057221965852,
|
10 |
+
"test_pos_precision": 0.8369620253164557,
|
11 |
+
"test_pos_recall": 0.7007206443408224,
|
12 |
+
"test_micro_f1": 0.7154460352422908,
|
13 |
+
"test_acc": 0.7154460352422908,
|
14 |
+
"test_macro_f1": 0.7065326571464539,
|
15 |
+
"test_macro_precision": 0.7154920697212219,
|
16 |
+
"test_macro_recall": 0.7043418884277344,
|
17 |
+
"test_runtime": 9.0426,
|
18 |
+
"test_samples_per_second": 803.305,
|
19 |
+
"test_steps_per_second": 50.207
|
20 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": "<mask>", "special_tokens_map_file": "models/twerto-base-uncased/special_tokens_map.json", "name_or_path": "pysentimiento/robertuito-base-uncased", "tokenizer_class": "PreTrainedTokenizerFast"}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:73e12e93645ff390c7c7162b01f620d8e28cb70ab82a9316d565de9c9e6254f7
|
3 |
+
size 2799
|