Sentiment Analysis of Delivery Service Opinions on Twitter Documents using K-Nearest Neighbor

  • Arsya Monica Pravina Universitas Indonesia
Keywords: Delivery Service, Sentiment Analysis, Twitter, K-Nearest Neighbor


The global pandemic of Covid-19 in 2020 encourage a significant increase of online trading such as selling and buying around the world, especially in Indonesia. The dependency on goods delivery services to fulfill transaction process among sellers and buyers are essential as the government policy enforce a limitation of errands outside home. Since 2000, top brand awards have often conducted official surveys in terms of awarding and displaying comparisons of goods or services based on public opinion from several regions. One of the services that became the top brand survey is delivery service. However, it was found that the survey rankings were not quite accurate because the public and companies were still unable to find out in detail the success factors and drawbacks of their brands based on the ratings submitted. This research was conducted to analyze opinion sentiment of delivery service (JNE, J&T, TIKI, Pos Indonesia, and DHL Indonesia) and determine the aspect of timeliness and quality. The data is retrieved from Twitter “tweets” of delivery service official account of @JNE_ID, @shippexpressid, @PosIndonesia, and @IdTiki, and search keyword of “DHL Indonesia”. K-Nearest Neighbor with parameter K=3 is adopted as the main algorithm following some text processing method, feature extraction and feature selection. The result shows DHL Indonesia is in the first position at 55.6% of Twitter users who gave positive feedback for service aspect by timeliness and at 15% for service aspect by quality. This research system has accuracy at 94.56%, precision at 62.31%, recall at 45.26%, and F-measure at 62.32%. It can be concluded that the parameters used are quite optimal.


[1] a Adiwijaya, I. (2006). Text Mining dan Knowledge Discovery. Kolokium bersama komunitas datamining Indonesia & soft-computing Indonesia, 1-9.

[2] Afuan, L. (2013). Stemming Dokumen Teks Bahasa Indonesia. Telematika, 6(2), 34-40.

[3] Ahmad, S. R., Rodzi, M. M., Shapiei, N. S., Yusup, N. M., & Ismail, S. (2019). A Review of Feature Selection and Sentiment Analysis Technique in Issues of Propaganda. International Journal of Advanced Computer Science and Applications (IJACSA), 10(11), 240-245.

[4] Ahuja, R., Chug, A., Kohli, S., Kohli, S., & Ahuja, P. (2019). The Impact of Features Extraction on the Sentiment Analysis. Procedia Computer Science, 152, 341-348.

[5] Aribowo, A. S. (2015). Arsitektur Aplikasi Twitter Opinion Mining Untuk Mengetahui Sentimen Publik Terhadap Merek Produk. Seminar Nasional Informatika 2015 (semnasIF 2015), ISSN: 1979-2328, 14-19.
[6] Balahur, A., & Turchi, M. (2013). Improving Sentiment Analysis in Twitter using Multilingual Machine Translated Data. International Conference Recent Advances in Natural Language Processing, RANLP, 49-55.

[7] Barro, R. A., Sulvianti, I. D., & Afendi, F. M. (2013). Penerapan Synthetic Minority Oversampling Technique (SMOTE) terhadap Data Tidak Seimbang pada Pembuatan Model Komposisi Jamu. Xplore (Departemen Statistika FMIPA IPB), 1(1):e9, 1-6.

[8] Bhadane, C., Dalal, H., & Doshi, H. (2015). Sentiment Analysis: Measuring Opinions. Procedia Computer Science, 45, 808-814.

[9] Canrakerta, Putro, P. L., Irfandi, Z., Budi, N. F., & Hidayanto, A. N. (2018). Sentiment Analysis Based on Appraisal Theory for Assessing Incumbent Electability. Proceeding of EECSI 2018, 101-106.

[10] Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic Minority Over-sampling Technique. Artificial Intelligence Research, 16, 321–357.

[11] Hamdan, H., Bellot, P., & Bechet, F. (2015). Lsislif: Feature Extraction and Label Weighting for Sentiment Analysis in Twitter. International Workshop on Semantic Evaluation (SemEval 2015), 9, 568–573.

[12] Han, Q., Guo, J., & Schutze, H. (2013). CodeX: Combining an SVM Classifier and Character N-gram Language Models for Sentiment Analysis on Twitter Text. Association for Computational Linguistics, Second Joint Conference on Lexical and Computational Semantics (*SEM), Volume 2: Proceedings of the Seventh International Workshop on Semantic Evaluation (SemEval 2013), 520–524.

[13] Indraloka, D. S., & Santosa, B. (2017). Penerapan Text Mining untuk Melakukan Clustering Data Tweet Shopee Indonesia. SAINS DAN SENI ITS, 6(2), A51-A56.

[14] Irfan, M., Fauzi, M., Tibyani, & Mentari, N. (2018). Twitter Sentiment Analysis on 2013 Curriculum Using Ensemble Features and K-Nearest Neighbor. International Journal of Electrical and Computer Engineering (IJECE), 8, 5409.

[15] Jeremy Ellman, T. C. (2013). Sentiment Analysis: State of the Art. International Conference on Advances In Computer and Electronics Technology - ACET, 978-981-07-7227-7, 21 - 25.

[16] Jianqiang, Z. (2015). Pre-processing Boosting Twitter Sentiment Analysis? IEEE International Conference on Smart City/SocialCom/SustainCom (SmartCity), 748-753.

[17] Kaur, H., Mangat, V., & Nidhi. (2017). A Survey of Sentiment Analysis Techniques. 2017 International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), 921-925.
[18] Muktafin, E. H., Kusrini, & Luthfi, E. T. (2020). Analisis Sentimen pada Ulasan Pembelian Produk di Marketplace Shopee Menggunakan Pendekatan Natural Language Processing. Eksplora Informatika, 10(1.390), 32-42.

[19] Pravina, A. M. (2018). Analisis Sentimen tentang Opini Maskapai Penerbangan pada Dokumen Twitter menggunakan Algoritme Support Vector Machine (SVM). Malang: Fakultas Ilmu Komputer Universitas Brawijaya.

[20] Ramadhani, A. M., & Goo, H. S. (2017). Twitter Sentiment Analysis using Deep Learning Methods. International Annual Engineering Seminar (InAES), 7.

[21] Riany, J., Fajar, M., & Lukman, M. P. (2016). Penerapan Deep Sentiment Analysis pada Angket Penilaian Terbuka Menggunakan K-Nearest Neighbor. Open Access Journal of Information Systems (OAJIS), 06(01), 147-156.

[22] Saif, H., & Fernandez, M. (2014). On stopwords, filtering and data sparsity for sentiment analysis of twitter. 9th International Language Resources and Evaluation Conference (LREC'14), 810-817.

[23] Satapathy, R., Guerreiro, C., Chaturvedi, I., & Cambria, E. (2017). Phonetic-Based Microtext Normalization for Twitter Sentiment Analysis. IEEE International Conference on Data Mining Workshops, 407-413.

[24] Sentiment Analysis of Online Auction Service Quality on Twitter Data: A case of E-Bay. (2018). International Conference on Cyber and IT Service Management (CITSM 2018) , 6.

[25] Setiyaningrum, Y., Herdajanti, A., Supriyanto, C., & Muljono. (2019). Classification of Twitter Contents using Chi-Square and K-Nearest Neighbour Algorithm. International Seminar on Application for Technology of Information and Communication (iSemantic), 1-4.

[26] Siddiqi, N. (2006). Credit Risk Scorecards: Developing and Implementing Intelligent Credit Scoring. Hoboken, New Jersey: John Wiley & Sons, Inc.

[27] Sumarna, D. L., & Faisal, M. (2020). Pengukuran dan Perbaikan Kualitas Pelayanan PT Pos Indonesia menggunakan Metode Importance Performance Analysis (IPA). Jurnal Logistik Bisnis, 10, 52-55.

[28] Suri, D. J. (2017). Perbandingan Seleksi Fitur Untuk Klasifikasi Sentimen SVM Pada Twitter. Bandung: Perpustakaan UNIKOM.

[29] Susanti, N. D., Sediyono, E., & Sembiring, I. (2018). Uji Perbandingan Akurasi Analisis Sentimen Pariwisata Menggunakan Algoritma Support Vector Machine dan Naive Bayes. Nusantara of Engineering, 3(2), 26-33.

[30] Tiara, M. K., & Effendy, V. (2015). Sentiment analysis on Twitter using the Ccombination of Lexicon-Based and Ssupport Vector Machine for assessing the Performance of a Television Program. International Conference on Information and Communication Technology (ICoICT), 3, 386-390.
[31] Windasari, I. P., Satoto, K. I., & Uzzi, F. N. (2017). Sentiment Analysis on Twitter Posts: An analysis of Positive or Negative Opinion on GoJek. International Conference on Information Technology, Computer, and Electrical Engineering (ICITACEE), ISSN 978-1-5386-3947-4, 266–269.

[32] Wisnu, H., Afif, M., & Afif, R. Y. (2020). Sentiment analysis on customer satisfaction of digital payment in Indonesia: A comparative study using KNN and Naïve Bayes. Journal of Physics: Conference Series, 1444, 1-10.