File size: 1,803 Bytes
1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 b0cd4db 1d35bd5 12e7e2e 1d35bd5 bb0f430 1d35bd5 bb0f430 1d35bd5 bb0f430 1d35bd5 bb0f430 1d35bd5 bb0f430 1d35bd5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | ---
language: ms
license: apache-2.0
tags:
- sentiment-analysis
- malay
- bert
- text-classification
datasets:
- custom
metrics:
- accuracy
- f1
model-index:
- name: ft-Malay-bert
results:
- task:
type: text-classification
name: Sentiment Analysis
dataset:
type: custom
name: Malay Sentiment Dataset
metrics:
- type: accuracy
value: 0.85
name: Accuracy
---
# Malay BERT for Sentiment Analysis
Fine-tuned BERT model for Malay sentiment analysis with 3-class classification.
## Label Mapping
**Important**: This model uses the following label mapping:
```python
id2label = {
0: "negative",
1: "neutral",
2: "positive"
}
label2id = {
"negative": 0,
"neutral": 1,
"positive": 2
}
```
## Quick Usage
```python
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="rmtariq/ft-Malay-bert")
result = classifier("Saya sangat gembira!")
print(result)
# [{'label': 'LABEL_2', 'score': 0.995}]
# LABEL_2 = positive
```
## Label Interpretation
- `LABEL_0` or `0` → **negative** sentiment
- `LABEL_1` or `1` → **neutral** sentiment
- `LABEL_2` or `2` → **positive** sentiment
## Model Details
- **Language**: Malay (Bahasa Malaysia)
- **Task**: Sentiment Analysis
- **Classes**: 3 (negative, neutral, positive)
- **Base Model**: BERT
## Training
This model was fine-tuned on Malay sentiment analysis data.
## Limitations
- Optimized for Malaysian Malay text
- May have reduced performance on other Malay dialects
- Mixed language performance may vary
## Citation
```bibtex
@misc{ft-malay-bert,
author = {rmtariq},
title = {Fine-tuned Malay BERT for Sentiment Analysis},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/rmtariq/ft-Malay-bert}
}
```
|