Add README. Correct config with human readable labels.
Browse files- README.md +59 -0
- config.json +6 -6
README.md
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: "hr"
|
3 |
+
|
4 |
+
tags:
|
5 |
+
- text-classification
|
6 |
+
- sentiment-analysis
|
7 |
+
|
8 |
+
widget:
|
9 |
+
- text: "Potpredsjednik Vlade i ministar branitelja Tomo Medved komentirao je Vladine planove za zakonsku zabranu pozdrava 'za dom spremni'."
|
10 |
+
---
|
11 |
+
# bcms-bertic-parlasent-bcs-ter
|
12 |
+
|
13 |
+
Text classification model based on [`classla/bcms-bertic`](https://huggingface.co/classla/bcms-bertic) and fine-tuned on the BCS Political Sentiment dataset.
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
## Fine-tuning hyperparameters
|
19 |
+
|
20 |
+
Fine-tuning was performed with `simpletransformers`. Beforehand a brief sweep for the optimal number of epochs was performed and the presumed best value was 9.
|
21 |
+
|
22 |
+
```python
|
23 |
+
|
24 |
+
model_args = {
|
25 |
+
"num_train_epochs": 9
|
26 |
+
}
|
27 |
+
```
|
28 |
+
|
29 |
+
## Performance
|
30 |
+
|
31 |
+
The same pipeline was run with two other transformer models and `fasttext` for comparison. Macro F1 scores were recorded for each of the 6 fine-tuning sessions and post festum analyzed.
|
32 |
+
|
33 |
+
| model | average macro F1 |
|
34 |
+
|---------------------------------|-------------------|
|
35 |
+
| bcms-bertic-parlasent-bcs-ter | 0.7941 ±0.0101 ** |
|
36 |
+
| EMBEDDIA/crosloengual-bert | 0.7709 ± 0.0113 |
|
37 |
+
| xlm-roberta-base | 0.7184 ± 0.0139 |
|
38 |
+
| fasttext + CLARIN.si embeddings | 0.6312 ± 0.0043 |
|
39 |
+
|
40 |
+
Two best performing models have been compared with the Mann-Whitney U test. (** denotes $p<0.01$).
|
41 |
+
|
42 |
+
|
43 |
+
## Citation
|
44 |
+
|
45 |
+
If you use the model, please cite the following paper on which the original model is based:
|
46 |
+
```
|
47 |
+
@inproceedings{ljubesic-lauc-2021-bertic,
|
48 |
+
title = "{BERT}i{\'c} - The Transformer Language Model for {B}osnian, {C}roatian, {M}ontenegrin and {S}erbian",
|
49 |
+
author = "Ljube{\v{s}}i{\'c}, Nikola and Lauc, Davor",
|
50 |
+
booktitle = "Proceedings of the 8th Workshop on Balto-Slavic Natural Language Processing",
|
51 |
+
month = apr,
|
52 |
+
year = "2021",
|
53 |
+
address = "Kiyv, Ukraine",
|
54 |
+
publisher = "Association for Computational Linguistics",
|
55 |
+
url = "https://www.aclweb.org/anthology/2021.bsnlp-1.5",
|
56 |
+
pages = "37--42",
|
57 |
+
}
|
58 |
+
```
|
59 |
+
|
config.json
CHANGED
@@ -10,16 +10,16 @@
|
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
"hidden_size": 768,
|
12 |
"id2label": {
|
13 |
-
"0": "
|
14 |
-
"1": "
|
15 |
-
"2": "
|
16 |
},
|
17 |
"initializer_range": 0.02,
|
18 |
"intermediate_size": 3072,
|
19 |
"label2id": {
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
},
|
24 |
"layer_norm_eps": 1e-12,
|
25 |
"max_position_embeddings": 512,
|
|
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
"hidden_size": 768,
|
12 |
"id2label": {
|
13 |
+
"0": "Negative",
|
14 |
+
"1": "Neutral",
|
15 |
+
"2": "Positive"
|
16 |
},
|
17 |
"initializer_range": 0.02,
|
18 |
"intermediate_size": 3072,
|
19 |
"label2id": {
|
20 |
+
"Negative": 0,
|
21 |
+
"Neutral": 1,
|
22 |
+
"Positive": 2
|
23 |
},
|
24 |
"layer_norm_eps": 1e-12,
|
25 |
"max_position_embeddings": 512,
|