finiteautomata commited on
Commit
7e819c8
1 Parent(s): a214688

First version

Browse files
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Irony detection in Spanish
2
+ ## robertuito-irony
3
+
4
+ Repository: [https://github.com/pysentimiento/pysentimiento/](https://github.com/finiteautomata/pysentimiento/)
5
+
6
+
7
+
8
+ Model trained with IRosVA 2019 dataset for irony detection. Base model is [RoBERTuito](https://github.com/pysentimiento/robertuito), a RoBERTa model trained in Spanish tweets.
9
+
10
+ The positive class marks irony, the negative class marks not irony.
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 (HS+TR+AG detection)
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,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "not ironic",
16
+ "1": "ironic"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": {
21
+ "ironic": 1,
22
+ "not ironic": 0
23
+ },
24
+ "layer_norm_eps": 1e-12,
25
+ "max_position_embeddings": 130,
26
+ "model_type": "roberta",
27
+ "num_attention_heads": 12,
28
+ "num_hidden_layers": 12,
29
+ "pad_token_id": 1,
30
+ "position_embedding_type": "absolute",
31
+ "problem_type": "single_label_classification",
32
+ "torch_dtype": "float32",
33
+ "transformers_version": "4.11.3",
34
+ "type_vocab_size": 1,
35
+ "use_cache": true,
36
+ "vocab_size": 30002
37
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb554c7fed80b7220134bad550f5eb0ff13485f269210e2f59bbdecb9de03c37
3
+ size 435243437
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,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_loss": 1.247560739517212,
3
+ "test_not ironic_f1": 0.8370808678500986,
4
+ "test_not ironic_precision": 0.795352323838081,
5
+ "test_not ironic_recall": 0.8834304746044963,
6
+ "test_ironic_f1": 0.612206572769953,
7
+ "test_ironic_precision": 0.6995708154506438,
8
+ "test_ironic_recall": 0.5442404006677797,
9
+ "test_micro_f1": 0.7705555555555557,
10
+ "test_acc": 0.7705555555555555,
11
+ "test_macro_f1": 0.7246437072753906,
12
+ "test_macro_precision": 0.7474615573883057,
13
+ "test_macro_recall": 0.7138354778289795,
14
+ "test_runtime": 4.0387,
15
+ "test_samples_per_second": 445.685,
16
+ "test_steps_per_second": 27.979
17
+ }
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:6acd820218ac5099b6d42c9140518f868886df394f2a21d30f220636ff08adc8
3
+ size 2799