Text Classification
Transformers
Safetensors
Burmese
xlm-roberta
aspect-based-sentiment-analysis
absa
sentiment-analysis
burmese
myanmar
text-embeddings-inference
Instructions to use Fixaro/myanmar-absa-sentiment-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Fixaro/myanmar-absa-sentiment-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Fixaro/myanmar-absa-sentiment-classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Fixaro/myanmar-absa-sentiment-classification") model = AutoModelForSequenceClassification.from_pretrained("Fixaro/myanmar-absa-sentiment-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Myanmar ABSA - Stage 2 (Aspect-Level Sentiment Classification)
This model is a fine-tuned version of xlm-roberta-base trained on Burmese customer reviews formatted as sentence pairs (review_text, target_aspect). It predicts the sentiment polarity for a given target aspect.
Sentiment Classes:
0:Negative1:Neutral2:Positive
Supported Aspect Names:
product_or_service_qualityfulfillment_and_speedprice_and_valuedigital_experiencecustomer_supportvariety_and_availability
Usage Example (Sentence-Pair Classification)
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
MODEL_NAME = "Fixaro/myanmar-absa-sentiment-classification"
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME)
# Input text and the specific aspect to evaluate
review_text = "ဒီဆိုင်က ဝန်ဆောင်မှု အရမ်းကောင်းတယ်၊ ဒါပေမဲ့ ပို့ဆောင်ခ အရမ်းကြီးတယ်။"
target_aspect = "customer_support"
# 1. Tokenize as a Sentence Pair (Review Text + Target Aspect)
inputs = tokenizer(review_text, target_aspect, return_tensors="pt", truncation=True, max_length=128)
# 2. Predict Sentiment
with torch.no_grad():
logits = model(**inputs).logits
# Apply Softmax for 3-class probability distribution
probs = torch.softmax(logits, dim=-1).squeeze().tolist()
predicted_class_id = torch.argmax(logits, dim=-1).item()
SENTIMENTS = ["Negative", "Neutral", "Positive"]
print(f"Target Aspect : {target_aspect}")
print(f"Predicted Sentiment : {SENTIMENTS[predicted_class_id]}")
print(f"Confidence Scores : Negative={probs[0]*100:.1f}%, Neutral={probs[1]*100:.1f}%, Positive={probs[2]*100:.1f}%")
- Downloads last month
- -
Model tree for Fixaro/myanmar-absa-sentiment-classification
Base model
FacebookAI/xlm-roberta-base