Yunus Widjaya
Universitas Pembangunan Jaya

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Sentiment Analysis of Google Gemini Reviews Using K-Nearest Neighbor and Particle Swarm Optimization Siraj Fatwa Sidqy; Yunus Widjaya
IJCONSIST JOURNALS Vol 8 No 1 (2026): September
Publisher : International Journal of Computer, Network Security and Information System

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.33005/ijconsist.v8i1.221

Abstract

Google Gemini, Google's generative AI assistant, receives a large volume of user reviews on the Google Play Store daily, making manual reading of user opinions impractical. This study analyzes the sentiment of Indonesian-language Google Gemini reviews using K-Nearest Neighbor (KNN) as the baseline classifier, then optimizes the k parameter through Particle Swarm Optimization (PSO) to examine its effect on classification performance. A total of 5,000 reviews were collected via web scraping using the Google Play Scraper library between 1 June and 1 September 2026, followed by preprocessing (duplicate removal, cleaning, case folding, normalization, tokenization, and stopword removal), leaving 2,858 labeled reviews, of which 2,000 were used for modeling. Negative, Neutral, and Positive labels were assigned automatically from each reviewer's star rating. Text was represented using CountVectorizer, producing 2,282 features, split into 1,600 training and 400 testing samples via stratified sampling. The baseline KNN model with k=5 achieved 79.50% accuracy, while PSO selected k=4 with a best cost of 0.188125, yielding a KNN-PSO accuracy of 80.75%, a 1.25 percentage-point increase. This improvement was accompanied by a rise in macro F1-score from 0.441 to 0.458 and weighted F1-score from 0.765 to 0.780, mainly driven by the Negative and Positive classes, while the Neutral class remained undetected by both models (F1=0). These findings indicate that PSO optimization yields a consistent but limited improvement, and does not resolve the underlying difficulty of identifying