Downloads · 30 days
11
8% of all-time downloads
unduood/phayathaibert-absa-sports-facility-v2
phayathaibert-absa-sports-facility-v2 is a machine learning model from unduood. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Aspect-Based Sentiment Analysis for Thai sports facility reviews using BERT Sentence Pair Classification.
Downloads · 30 days
11
8% of all-time downloads
All-time downloads
144
Public
Parameters
277M
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
Aspect-Based Sentiment Analysis for Thai sports facility reviews using BERT Sentence Pair Classification.
This model uses the proven BERT-SPC (Sentence Pair Classification) approach:
Input: [CLS] review_text [SEP] aspect_name [SEP]
Output: sentiment (none/positive/negative/neutral)
For each review, we run 8 predictions (one per aspect).
| Metric | Score |
|---|---|
| F1 (macro) | 0.9264 |
| F1 (weighted) | 0.9823 |
| Accuracy | 0.9822 |
| Aspect | Thai | F1 |
|---|---|---|
| Equipment | อุปกรณ์ | 0.9598 |
| Staff | พนักงาน | 0.9810 |
| Cleanliness | ความสะอาด | 0.9664 |
| Atmosphere | บรรยากาศ | 0.9442 |
| Price | ราคา | 0.9609 |
| Location | ทำเล | 0.9592 |
| Program | คลาส | 0.9645 |
| Amenities | สิ่งอำนวยความสะดวก | 0.9238 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load
tokenizer = AutoTokenizer.from_pretrained("YOUR_REPO")
model = AutoModelForSequenceClassification.from_pretrained("YOUR_REPO")
# Predict
text = "เครื่องดีมาก"
aspect = "อุปกรณ์" # Thai aspect name
inputs = tokenizer(text, aspect, return_tensors="pt")
outputs = model(**inputs)
pred = torch.argmax(outputs.logits, dim=-1).item()
# 0: none, 1: positive, 2: negative, 3: neutral
| English | Thai |
|---|---|
| Equipment | อุปกรณ์ |
| Staff | พนักงาน |
| Cleanliness | ความสะอาด |
| Atmosphere | บรรยากาศ |
| Price | ราคา |
| Location | ทำเล |
| Program | คลาส |
| Amenities | สิ่งอำนวยความสะดวก |