TeoMatosevic commited on
Commit
a2cc81b
·
verified ·
1 Parent(s): 0676918

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - hr
4
+ license: mit
5
+ tags:
6
+ - text-classification
7
+ - hate-speech-detection
8
+ - croatian
9
+ - bertic
10
+ datasets:
11
+ - classla/FRENK-hate-hr
12
+ metrics:
13
+ - f1
14
+ - accuracy
15
+ base_model: classla/bcms-bertic
16
+ pipeline_tag: text-classification
17
+ ---
18
+
19
+ # Croatian Hate Speech Detection Model (BERTić Fine-tuned)
20
+
21
+ This model is a fine-tuned version of [classla/bcms-bertic](https://huggingface.co/classla/bcms-bertic) for binary hate speech classification in Croatian.
22
+
23
+ ## Model Description
24
+
25
+ - **Base Model:** classla/bcms-bertic (BERT pre-trained on 8B tokens of South Slavic text)
26
+ - **Task:** Binary classification (Acceptable vs Offensive)
27
+ - **Language:** Croatian
28
+ - **Dataset:** FRENK Croatian hate speech dataset (10,971 comments)
29
+
30
+ ## Performance
31
+
32
+ | Metric | Score |
33
+ |--------|-------|
34
+ | Accuracy | 81.3% |
35
+ | F1-Macro | 0.810 |
36
+ | F1-Weighted | 0.813 |
37
+ | MCC | 0.621 |
38
+
39
+ ### Per-Class Performance
40
+
41
+ | Class | Precision | Recall | F1-Score |
42
+ |-------|-----------|--------|----------|
43
+ | ACC (Acceptable) | 0.777 | 0.803 | 0.790 |
44
+ | OFF (Offensive) | 0.842 | 0.820 | 0.831 |
45
+
46
+ ## Training Configuration
47
+
48
+ - Learning rate: 2e-5
49
+ - Batch size: 16
50
+ - Epochs: 5
51
+ - Max sequence length: 256 tokens
52
+ - Optimizer: AdamW
53
+ - Warmup ratio: 0.1
54
+
55
+ ## Usage
56
+
57
+ ```python
58
+ from src.models.bertic import BERTicTrainer
59
+
60
+ # Load model
61
+ trainer = BERTicTrainer()
62
+ trainer.load("path/to/model")
63
+
64
+ # Predict
65
+ texts = ["Ovo je normalan komentar.", "Svi su oni lopovi!"]
66
+ predictions = trainer.predict(texts)
67
+ print(predictions) # ['ACC', 'OFF']
68
+ ```
69
+
70
+ ## Labels
71
+
72
+ - `ACC` - Acceptable: No offensive content
73
+ - `OFF` - Offensive: Contains hate speech, insults, or inappropriate content
74
+
75
+ ## Citation
76
+
77
+ ```bibtex
78
+ @misc{croatian-hate-speech-2026,
79
+ author = {Jurić, Duje and Matošević, Teo and Radolović, Teo},
80
+ title = {Detection of Hate Speech on Croatian Online Portals Using NLP Methods},
81
+ year = {2026},
82
+ publisher = {University of Zagreb, FER},
83
+ url = {https://github.com/TeoMatosevic/slur-analysis-model}
84
+ }
85
+ ```
86
+
87
+ ## Authors
88
+
89
+ - Duje Jurić
90
+ - Teo Matošević
91
+ - Teo Radolović
92
+
93
+ University of Zagreb, Faculty of Electrical Engineering and Computing
94
+
95
+ ## License
96
+
97
+ MIT License
config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "classla/bcms-bertic",
3
+ "num_labels": 2,
4
+ "max_length": 256,
5
+ "label_names": [
6
+ "ACC",
7
+ "OFF"
8
+ ]
9
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38b5cb34fb80c8d06fcde325a154cdf0896b396f35e8295eb1cfe21b70d80bb6
3
+ size 663589656
tokenizer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "is_local": false,
6
+ "mask_token": "[MASK]",
7
+ "max_len": 512,
8
+ "model_max_length": 512,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "strip_accents": false,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }