Meowsenti is a simple application designed to analyze sentiment in Indonesian mobile banking applications.
This system is built using two popular Natural Language Processing algorithms: Multinomial Naïve Bayes and Support Vector Machine (SVM). The model has been trained on a dataset of 13,527 reviews from the BRImo mobile banking application.
The dataset is split into 60% for training and 40% for testing.
The MFSvc model is optimized using GridSearchCV. Below is the parameter grid used:
Parameter | Values |
---|---|
C | 0.1, 1, 10 |
kernel | linear, rbf |
gamma | scale, auto |
class_weight | balanced, None |
After hyperparameter tuning, the best configuration is:
Best parameters found: {'C': 10, 'class_weight': 'balanced', 'gamma': 'scale', 'kernel': 'rbf'}
Best cross-validation accuracy: 95.67%
Class | Precision | Recall | F1-score |
---|---|---|---|
Positive (1) | 0.9226 | 0.9179 | 0.9202 |
Negative (0) | 0.6281 | 0.6281 | 0.6281 |
Neutral (2) | 0.7348 | 0.7436 | 0.7392 |
- Train Accuracy: 95.67%
- Test Accuracy: 83.11%
The MFNb model is also optimized using GridSearchCV. Below is the parameter grid used:
Parameter | Values |
---|---|
alpha | 0.01, 0.1, 1, 10 |
fit_prior | True, False |
After hyperparameter tuning, the best configuration is:
Best parameters found: {'alpha': 0.01, 'fit_prior': True}
Best cross-validation accuracy: 95.23%
Class | Precision | Recall | F1-score |
---|---|---|---|
Positive (1) | 0.9012 | 0.9338 | 0.9172 |
Negative (0) | 0.6507 | 0.6006 | 0.6246 |
Neutral (2) | 0.7386 | 0.7085 | 0.7232 |
- Train Accuracy: 95.23%
- Test Accuracy: 82.77%
First, pull the image and run:
# Pull the Docker image
docker pull mframadann/meowsenti
# Run the container
docker run -d --name sentiment-app -p 5001:7860 mframadann/meowsenti
Use tools like Postman or Insomnia, or send a request via cURL:
curl -X POST \
http://localhost:5001/api/v1/analyze-sentiment \
-H "Content-Type: application/json" \
-d '{
"reviews": [
{"review": "Bagus banget aplikasinya"},
{"review": "Aplikasi apa ini, jelek banget idih"},
{"review": "Cukup membantu saya bertransaksi"},
{"review": "Mantap banget euy aplikasinya"}
],
"model": "MFNb"
}'
{
"data": {
"sentiment": [
{
"alg_type": "Naïve Bayes",
"kind_of_sentiment": "Positive",
"review": "Bagus banget aplikasinya"
},
{
"alg_type": "Naïve Bayes",
"kind_of_sentiment": "Negative",
"review": "Aplikasi apa ini, jelek banget idih"
},
{
"alg_type": "Naïve Bayes",
"kind_of_sentiment": "Neutral",
"review": "Cukup membantu saya bertransaksi"
},
{
"alg_type": "Naïve Bayes",
"kind_of_sentiment": "Positive",
"review": "Mantap banget euy aplikasinya"
}
]
},
"status": "success"
}
git clone https://github.com/mframadann/meowsenti.git && cd meowsenti
python3 -m venv .venv
source .venv/bin/activate
pip install --no-cache-dir -r requirements.txt
python app.py ## run on http://localhost:7860
For detailed API documentation, visit: Mframadan Labs. You can also try Meowsenti directly on Hugging Face Spaces:
This model works only for Indonesian text and last updated of analytics report is based on model observation in oct 2024. Thanks for visiting! Feel free to connect with me: