Downloads · 30 days
49
49% of all-time downloads
thutasann/mm_sentiment_model_v1
mm_sentiment_model_v1 is a text classification model from thutasann. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This is a fine-tuned XLM-RoBERTa model for Myanmar sentiment analysis. It classifies text into 5 intensity levels, ranging from Very Negative to Very Positive.
Downloads · 30 days
49
49% of all-time downloads
All-time downloads
100
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This is a fine-tuned XLM-RoBERTa model for Myanmar sentiment analysis. It classifies text into 5 intensity levels, ranging from Very Negative to Very Positive.
The model was trained on a custom Myanmar dataset specifically curated for sentiment detection. It utilizes a custom syllable breaking preprocessing step to handle Myanmar Unicode text effectively.
facebookai/xlm-roberta-base| Label | Sentiment | Emoji |
|---|---|---|
| LABEL_0 | Very Negative | 🔴 |
| LABEL_1 | Negative | 🟠 |
| LABEL_2 | Neutral | 🟡 |
| LABEL_3 | Positive | 🟢 |
| LABEL_4 | Very Positive | 🔵 |
To use this model, you must apply the Syllable Breaking logic before passing text to the model.
import re
from transformers import pipeline
def myanmar_sylbreak(line):
pat = re.compile(r"((?<!္)[က-အ](?![်္])|[a-zA-Z0-9ဣဤဥဦဧဩဪဿ၌၍၏၀-၉၊။!-/:-@[-`{-~\s])")
return pat.sub(r" \1", line).strip()
classifier = pipeline("text-classification", model="thutasann/mm_sentiment_model_v1")
raw_text = "ဒီနေ့ ရာသီဥတု အရမ်းသာယာတယ်"
segmented_text = myanmar_sylbreak(raw_text)
result = classifier(segmented_text)
print(result)
This model was trained on the Myanmar Sentiment Intensity Dataset v1, which is based on research from the Myanmar NLP community.