Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,17 +1,11 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- hu
|
| 4 |
-
- en
|
| 5 |
-
- de
|
| 6 |
-
- cs
|
| 7 |
-
- fr
|
| 8 |
-
- pl
|
| 9 |
-
- sk
|
| 10 |
license: mit
|
| 11 |
tags:
|
| 12 |
- sentiment-analysis
|
| 13 |
- xlm-roberta
|
| 14 |
-
-
|
| 15 |
- text-classification
|
| 16 |
datasets:
|
| 17 |
- custom
|
|
@@ -19,31 +13,18 @@ metrics:
|
|
| 19 |
- accuracy
|
| 20 |
- f1
|
| 21 |
pipeline_tag: text-classification
|
| 22 |
-
model-index:
|
| 23 |
-
- name: Sentiment
|
| 24 |
-
results:
|
| 25 |
-
- task:
|
| 26 |
-
type: text-classification
|
| 27 |
-
name: Sentiment Analysis
|
| 28 |
-
metrics:
|
| 29 |
-
- name: Accuracy
|
| 30 |
-
type: accuracy
|
| 31 |
-
value: 0.4108175318619832
|
| 32 |
-
- name: F1 (macro)
|
| 33 |
-
type: f1
|
| 34 |
-
value: 0.1941274108021563
|
| 35 |
---
|
| 36 |
|
| 37 |
# Sentiment
|
| 38 |
|
| 39 |
-
Fine-tuned [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) for **
|
| 40 |
|
| 41 |
## Model Details
|
| 42 |
|
| 43 |
- **Base model**: `xlm-roberta-base`
|
| 44 |
- **Task**: 3-class sentiment classification (negative / neutral / positive)
|
| 45 |
-
- **
|
| 46 |
-
- **Training data**: ~
|
| 47 |
- **Class weighting**: Balanced weights applied during training to handle class imbalance
|
| 48 |
|
| 49 |
## Labels
|
|
@@ -58,21 +39,15 @@ Fine-tuned [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) for **mul
|
|
| 58 |
|
| 59 |
| Metric | Value |
|
| 60 |
|--------|-------|
|
| 61 |
-
| Accuracy | 0.
|
| 62 |
-
| F1 (macro) | 0.
|
| 63 |
-
| F1 (weighted) | 0.
|
| 64 |
|
| 65 |
## Per-Language Results
|
| 66 |
|
| 67 |
| Language | Samples | Accuracy | F1 (macro) | F1 (weighted) |
|
| 68 |
|----------|---------|----------|------------|---------------|
|
| 69 |
-
|
|
| 70 |
-
| en | 4596 | 0.4108 | 0.1941 | 0.2392 |
|
| 71 |
-
| fr | 4569 | 0.4108 | 0.1941 | 0.2392 |
|
| 72 |
-
| ger | 4599 | 0.4107 | 0.1941 | 0.2392 |
|
| 73 |
-
| hun | 4603 | 0.4108 | 0.1941 | 0.2393 |
|
| 74 |
-
| pl | 4603 | 0.4108 | 0.1941 | 0.2393 |
|
| 75 |
-
| sk | 4598 | 0.4108 | 0.1941 | 0.2393 |
|
| 76 |
|
| 77 |
|
| 78 |
## Usage
|
|
@@ -82,18 +57,17 @@ from transformers import pipeline
|
|
| 82 |
|
| 83 |
classifier = pipeline("text-classification", model="ringorsolya/Sentiment")
|
| 84 |
|
| 85 |
-
# Hungarian
|
| 86 |
classifier("Ez egy fantasztikus nap!")
|
| 87 |
-
#
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
```
|
| 92 |
|
| 93 |
## Training Details
|
| 94 |
|
| 95 |
-
- **Epochs**:
|
| 96 |
-
- **Batch size**:
|
| 97 |
- **Learning rate**: 2e-05
|
| 98 |
- **Weight decay**: 0.01
|
| 99 |
- **Warmup ratio**: 0.1
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- hu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
license: mit
|
| 5 |
tags:
|
| 6 |
- sentiment-analysis
|
| 7 |
- xlm-roberta
|
| 8 |
+
- hungarian
|
| 9 |
- text-classification
|
| 10 |
datasets:
|
| 11 |
- custom
|
|
|
|
| 13 |
- accuracy
|
| 14 |
- f1
|
| 15 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# Sentiment
|
| 19 |
|
| 20 |
+
Fine-tuned [xlm-roberta-base](https://huggingface.co/xlm-roberta-base) for **Hungarian sentiment classification**.
|
| 21 |
|
| 22 |
## Model Details
|
| 23 |
|
| 24 |
- **Base model**: `xlm-roberta-base`
|
| 25 |
- **Task**: 3-class sentiment classification (negative / neutral / positive)
|
| 26 |
+
- **Language**: Hungarian
|
| 27 |
+
- **Training data**: ~37K sentences (stratified split from ~46K total)
|
| 28 |
- **Class weighting**: Balanced weights applied during training to handle class imbalance
|
| 29 |
|
| 30 |
## Labels
|
|
|
|
| 39 |
|
| 40 |
| Metric | Value |
|
| 41 |
|--------|-------|
|
| 42 |
+
| Accuracy | 0.8442320225939605 |
|
| 43 |
+
| F1 (macro) | 0.8387464047460437 |
|
| 44 |
+
| F1 (weighted) | 0.8435908941071462 |
|
| 45 |
|
| 46 |
## Per-Language Results
|
| 47 |
|
| 48 |
| Language | Samples | Accuracy | F1 (macro) | F1 (weighted) |
|
| 49 |
|----------|---------|----------|------------|---------------|
|
| 50 |
+
| hun | 4603 | 0.8442 | 0.8387 | 0.8436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
|
| 53 |
## Usage
|
|
|
|
| 57 |
|
| 58 |
classifier = pipeline("text-classification", model="ringorsolya/Sentiment")
|
| 59 |
|
|
|
|
| 60 |
classifier("Ez egy fantasztikus nap!")
|
| 61 |
+
# [{'label': 'positive', 'score': 0.95}]
|
| 62 |
+
|
| 63 |
+
classifier("Szörnyű volt a kiszolgálás.")
|
| 64 |
+
# [{'label': 'negative', 'score': 0.92}]
|
| 65 |
```
|
| 66 |
|
| 67 |
## Training Details
|
| 68 |
|
| 69 |
+
- **Epochs**: 5
|
| 70 |
+
- **Batch size**: 32
|
| 71 |
- **Learning rate**: 2e-05
|
| 72 |
- **Weight decay**: 0.01
|
| 73 |
- **Warmup ratio**: 0.1
|