Research Article
BibTex RIS Cite

Performance of Transformer-Based Methods on Restaurant Reviews Analysis

Year 2025, Volume: 4 Issue: 2, 351 - 362, 26.06.2025
https://doi.org/10.62520/fujece.1632266

Abstract

Sentiment analysis provides important data in various areas, from customer feedback to social media posts, by determining the text's emotional tones. In this study, sentiment analysis was performed using restaurant reviews with a transformer-based model. The attention mechanism underlying these models dynamically learns the contextual relationships of words in the text and better captures the meaning of the language. The model was trained and tested using a dataset from a vast information source. First, tokenization and padding operations of the dataset were performed; then, the model was trained, and test results were obtained. The training accuracy of the model was calculated as 90.81% and the test accuracy as 85.79%. When other performance metrics were also considered, the model, which achieved high success for negative and positive classes, showed lower success for the neutral class. In terms of general evaluation, it is seen that the model exhibited good performance when the accuracy rate was taken into account. This shows that transformer-based approaches are suitable for natural language processing and usability in this area.

Ethical Statement

There is no need for an ethics committee approval in the prepared article. There is no conflict of interest with any person/institution in the prepared article.

References

  • S. K. Mohapatra, P. K. Sarangi, P. K. Sarangi, P. Sahu, and B. K. Sahoo, "Text classification using NLP based machine learning approach," in AIP Conf. Proc., 2022.
  • H. Liu, Q. Yin, and W. Y. Wang, "Towards explainable NLP: A generative explanation framework for text classification," ArXiv Prepr. arXiv:1811.00196, 2018.
  • V. Dogra et al., "A Complete Process of Text Classification System Using State-of-the-Art NLP Models," Comput. Intell. Neurosci., Art. no. 1883698, 2022.
  • Q. Zhao et al., "Leveraging sensory knowledge into Text-to-Text Transfer Transformer for enhanced emotion analysis," Inf. Process. Manag., vol. 62, Art. no. 103876, 2025.
  • M. Razno, "Machine learning text classification model with NLP approach," Comput. Linguist. Intell. Syst., vol. 2, pp. 71–73, 2019.
  • Z. Li et al., "A unified understanding of deep NLP models for text classification," IEEE Trans. Vis. Comput. Graph., vol. 28, pp. 4980–4994, 2022.
  • J. Barbosa et al., "Evaluating the noise tolerance of Cloud NLP services across Amazon, Microsoft, and Google," Comput. Ind., vol. 164, Art. no. 104211, 2025.
  • S. Feuerriegel et al., "Using natural language processing to analyse text data in behavioural science," Nat. Rev. Psychol., pp. 1–16, 2025.
  • M. Arzu and M. Aydogan, "Türkçe Duygu Sınıflandırma İçin Transformers Tabanlı Mimarilerin Karşılaştırılmalı Analizi," Comput. Sci., pp. 1–6, 2023.
  • P. Guleria, "NLP-based clinical text classification and sentiment analyses of complex medical transcripts using transformer model and machine learning classifiers," Neural Comput. Appl., pp. 1–26, 2024.
  • S. H. Ahammad et al., "Improved neural machine translation using Natural Language Processing (NLP)," Multimed. Tools Appl., vol. 83, pp. 39335–39348, 2024.
  • D. Van Veen et al., "Adapted large language models can outperform medical experts in clinical text summarization," Nat. Med., vol. 30, pp. 1134–1142, 2024.
  • A. Selvi et al., "COLLEGEBOT: Virtual Assistant System for Enquiry Using Natural Language Processing," in 2nd Int. Conf. Intell. Data Commun. Technol. Internet Things, pp. 1407–1414, 2024.
  • Z. Wang, "Information Extraction and Knowledge Map Construction based on Natural Language Processing," Front. Comput. Intell. Syst., vol. 7, pp. 47–49, 2024.
  • M. Abdalla et al., "An NLP-based system for modulating virtual experiences using speech instructions," Expert Syst. Appl., vol. 249, Art. no. 123484, 2024.
  • D. Chen et al., "Complex visual question answering based on uniform form and content," Appl. Intell., vol. 54, pp. 4602–4620, 2024.
  • R. Patil et al., "Next Word Prediction System Using NLP," in IEEE Int. Conf. Smart Power Control Renew. Energy, pp. 1–6, 2024.
  • M. Yildirim, "Using and Comparing Machine Learning Techniques for Automatic Detection of Spam Website URLs," NATURENGS, vol. 3, pp. 33–41, 2022.
  • M. Asmitha and C. R. Kavitha, "Exploration of Automatic Spam/Ham Message Classifier Using NLP," in IEEE 9th Int. Conf. Converg. Technol., pp. 1–7, 2024.
  • A. Mishra, S. K. Bisoy, and B. Naik, "Medication Recommendation System for Skin Diseases using NLP," in Int. Conf. Adv. Smart, Secur. Intell. Comput., pp. 1–7, 2024.
  • M. Arzu and M. Aydogan, "Comparison of Transformer-Based Turkish Models for Question-Answering Task," Balk. J. Electr. Comput. Eng., vol. 12, pp. 387–393, 2025.
  • Y. Luo and X. Xu, "Comparative study of deep learning models for analyzing online restaurant reviews in the era of the COVID-19 pandemic," Int. J. Hosp. Manag., vol. 94, Art. no. 102849, 2021.
  • E. Asani, H. Vahdat-Nejad, and J. Sadri, "Restaurant recommender system based on sentiment analysis," Mach. Learn. Appl., vol. 6, Art. no. 100114, 2021.
  • N. Punetha and G. Jain, "Game theory and MCDM-based unsupervised sentiment analysis of restaurant reviews," Appl. Intell., vol. 53, pp. 20152–20173, 2023.
  • R. N. Patil et al., "Improving Sentiment Classification on Restaurant Reviews Using Deep Learning Models," Procedia Comput. Sci., vol. 235, pp. 3246–3256, 2024.
  • M. U. Khan et al., "A novel category detection of social media reviews in the restaurant industry," Multimed. Syst., vol. 29, pp. 1825–1838, 2023.
  • M. Mamatha et al., "Visual sentiment classification of restaurant review images using deep convolutional neural networks," in IEEE Int. Conf. Electron. Comput. Commun. Technol., pp. 1–6, 2022.
  • K. Zahoor, N. Z. Bawany, and S. Hamid, "Sentiment analysis and classification of restaurant reviews using machine learning," in 21st Int. Arab Conf. Inf. Technol., pp. 1–6, 2020.
  • A. Branco et al., "Sentiment analysis in portuguese restaurant reviews: Application of transformer models in edge computing," Electronics, vol. 13, Art. no. 589, 2024.
  • A. Nasef, "Restaurant Reviews," [Online]. Available: https://www.kaggle.com/datasets/ahmedwaelnasef/restaurant-reviews. [Accessed: Jan. 10, 2025].
  • A. Nandan, "Text classification with Transformer," [Online]. Available: https://keras.io/examples/nlp/text_classification_with_transformer. [Accessed: Jan. 23, 2025].
  • M. Yildirim and A. Cinar, "Classification with respect to colon adenocarcinoma and colon benign tissue of colon histopathological images with a new CNN model: MA_ColonNET," Int. J. Imaging Syst. Technol., vol. 32, pp. 155–162, 2022.

Transformer Tabanlı Yöntemlerin Restoran Yorumlarının Analizi Üzerindeki Başarımı

Year 2025, Volume: 4 Issue: 2, 351 - 362, 26.06.2025
https://doi.org/10.62520/fujece.1632266

Abstract

Duygu analizi, metinlerdeki duygusal tonları belirleyerek, müşteri geri bildirimlerinden sosyal medya paylaşımlarına kadar geniş bir alanda önemli veriler sağlar. Bu çalışmada, restoran yorumları kullanılarak duygu analizi gerçekleştirilmiştir. Çalışmada, duygu analizi için transformatör tabanlı bir model kullanılmıştır. Bu modellerin temelinde yer alan dikkat mekanizması, metin içindeki kelimelerin bağlamsal ilişkilerini dinamik olarak öğrenerek dilin anlamını daha iyi yakalar. Model, geniş bir bilgi kaynağına sahip bir veri seti ile eğitilmiş ve test edilmiştir. Öncelikle veri setinin tokenleştirme ve dolgu işlemleri gerçekleştirilmiş; daha sonra model eğitilmiş ve test sonuçları elde edilmiştir. Modelin eğitim doğruluğu %90,81, test doğruluğu ise %85,79 olarak hesaplanmıştır. Diğer performans metrikleri de göz önünde bulundurulduğunda, negatif ve pozitif sınıflar için yüksek başarı elde eden model, nötr sınıf için daha düşük bir başarı göstermiştir. Genel değerlendirme açısından modelin doğruluk oranı göz önüne alındığında, iyi bir performans sergilediği görülmektedir. Bu durum, transformatör tabanlı yaklaşımların doğal dil işleme için uygun olduğunu ve bu alandaki kullanılabilirliğini göstermektedir.

Ethical Statement

Hazırlanan makalede etik kurul onayına gerek yoktur. Hazırlanan makalede herhangi bir kişi/kurumla çıkar çatışması yoktur.

References

  • S. K. Mohapatra, P. K. Sarangi, P. K. Sarangi, P. Sahu, and B. K. Sahoo, "Text classification using NLP based machine learning approach," in AIP Conf. Proc., 2022.
  • H. Liu, Q. Yin, and W. Y. Wang, "Towards explainable NLP: A generative explanation framework for text classification," ArXiv Prepr. arXiv:1811.00196, 2018.
  • V. Dogra et al., "A Complete Process of Text Classification System Using State-of-the-Art NLP Models," Comput. Intell. Neurosci., Art. no. 1883698, 2022.
  • Q. Zhao et al., "Leveraging sensory knowledge into Text-to-Text Transfer Transformer for enhanced emotion analysis," Inf. Process. Manag., vol. 62, Art. no. 103876, 2025.
  • M. Razno, "Machine learning text classification model with NLP approach," Comput. Linguist. Intell. Syst., vol. 2, pp. 71–73, 2019.
  • Z. Li et al., "A unified understanding of deep NLP models for text classification," IEEE Trans. Vis. Comput. Graph., vol. 28, pp. 4980–4994, 2022.
  • J. Barbosa et al., "Evaluating the noise tolerance of Cloud NLP services across Amazon, Microsoft, and Google," Comput. Ind., vol. 164, Art. no. 104211, 2025.
  • S. Feuerriegel et al., "Using natural language processing to analyse text data in behavioural science," Nat. Rev. Psychol., pp. 1–16, 2025.
  • M. Arzu and M. Aydogan, "Türkçe Duygu Sınıflandırma İçin Transformers Tabanlı Mimarilerin Karşılaştırılmalı Analizi," Comput. Sci., pp. 1–6, 2023.
  • P. Guleria, "NLP-based clinical text classification and sentiment analyses of complex medical transcripts using transformer model and machine learning classifiers," Neural Comput. Appl., pp. 1–26, 2024.
  • S. H. Ahammad et al., "Improved neural machine translation using Natural Language Processing (NLP)," Multimed. Tools Appl., vol. 83, pp. 39335–39348, 2024.
  • D. Van Veen et al., "Adapted large language models can outperform medical experts in clinical text summarization," Nat. Med., vol. 30, pp. 1134–1142, 2024.
  • A. Selvi et al., "COLLEGEBOT: Virtual Assistant System for Enquiry Using Natural Language Processing," in 2nd Int. Conf. Intell. Data Commun. Technol. Internet Things, pp. 1407–1414, 2024.
  • Z. Wang, "Information Extraction and Knowledge Map Construction based on Natural Language Processing," Front. Comput. Intell. Syst., vol. 7, pp. 47–49, 2024.
  • M. Abdalla et al., "An NLP-based system for modulating virtual experiences using speech instructions," Expert Syst. Appl., vol. 249, Art. no. 123484, 2024.
  • D. Chen et al., "Complex visual question answering based on uniform form and content," Appl. Intell., vol. 54, pp. 4602–4620, 2024.
  • R. Patil et al., "Next Word Prediction System Using NLP," in IEEE Int. Conf. Smart Power Control Renew. Energy, pp. 1–6, 2024.
  • M. Yildirim, "Using and Comparing Machine Learning Techniques for Automatic Detection of Spam Website URLs," NATURENGS, vol. 3, pp. 33–41, 2022.
  • M. Asmitha and C. R. Kavitha, "Exploration of Automatic Spam/Ham Message Classifier Using NLP," in IEEE 9th Int. Conf. Converg. Technol., pp. 1–7, 2024.
  • A. Mishra, S. K. Bisoy, and B. Naik, "Medication Recommendation System for Skin Diseases using NLP," in Int. Conf. Adv. Smart, Secur. Intell. Comput., pp. 1–7, 2024.
  • M. Arzu and M. Aydogan, "Comparison of Transformer-Based Turkish Models for Question-Answering Task," Balk. J. Electr. Comput. Eng., vol. 12, pp. 387–393, 2025.
  • Y. Luo and X. Xu, "Comparative study of deep learning models for analyzing online restaurant reviews in the era of the COVID-19 pandemic," Int. J. Hosp. Manag., vol. 94, Art. no. 102849, 2021.
  • E. Asani, H. Vahdat-Nejad, and J. Sadri, "Restaurant recommender system based on sentiment analysis," Mach. Learn. Appl., vol. 6, Art. no. 100114, 2021.
  • N. Punetha and G. Jain, "Game theory and MCDM-based unsupervised sentiment analysis of restaurant reviews," Appl. Intell., vol. 53, pp. 20152–20173, 2023.
  • R. N. Patil et al., "Improving Sentiment Classification on Restaurant Reviews Using Deep Learning Models," Procedia Comput. Sci., vol. 235, pp. 3246–3256, 2024.
  • M. U. Khan et al., "A novel category detection of social media reviews in the restaurant industry," Multimed. Syst., vol. 29, pp. 1825–1838, 2023.
  • M. Mamatha et al., "Visual sentiment classification of restaurant review images using deep convolutional neural networks," in IEEE Int. Conf. Electron. Comput. Commun. Technol., pp. 1–6, 2022.
  • K. Zahoor, N. Z. Bawany, and S. Hamid, "Sentiment analysis and classification of restaurant reviews using machine learning," in 21st Int. Arab Conf. Inf. Technol., pp. 1–6, 2020.
  • A. Branco et al., "Sentiment analysis in portuguese restaurant reviews: Application of transformer models in edge computing," Electronics, vol. 13, Art. no. 589, 2024.
  • A. Nasef, "Restaurant Reviews," [Online]. Available: https://www.kaggle.com/datasets/ahmedwaelnasef/restaurant-reviews. [Accessed: Jan. 10, 2025].
  • A. Nandan, "Text classification with Transformer," [Online]. Available: https://keras.io/examples/nlp/text_classification_with_transformer. [Accessed: Jan. 23, 2025].
  • M. Yildirim and A. Cinar, "Classification with respect to colon adenocarcinoma and colon benign tissue of colon histopathological images with a new CNN model: MA_ColonNET," Int. J. Imaging Syst. Technol., vol. 32, pp. 155–162, 2022.
There are 32 citations in total.

Details

Primary Language English
Subjects Reinforcement Learning
Journal Section Research Articles
Authors

Mücahit Karaduman 0000-0002-8087-4044

Muhammed Bedir Baydemir 0000-0002-4253-6140

Muhammed Yıldırım 0000-0003-1866-4721

Publication Date June 26, 2025
Submission Date February 3, 2025
Acceptance Date March 24, 2025
Published in Issue Year 2025 Volume: 4 Issue: 2

Cite

APA Karaduman, M., Baydemir, M. B., & Yıldırım, M. (2025). Performance of Transformer-Based Methods on Restaurant Reviews Analysis. Firat University Journal of Experimental and Computational Engineering, 4(2), 351-362. https://doi.org/10.62520/fujece.1632266
AMA Karaduman M, Baydemir MB, Yıldırım M. Performance of Transformer-Based Methods on Restaurant Reviews Analysis. FUJECE. June 2025;4(2):351-362. doi:10.62520/fujece.1632266
Chicago Karaduman, Mücahit, Muhammed Bedir Baydemir, and Muhammed Yıldırım. “Performance of Transformer-Based Methods on Restaurant Reviews Analysis”. Firat University Journal of Experimental and Computational Engineering 4, no. 2 (June 2025): 351-62. https://doi.org/10.62520/fujece.1632266.
EndNote Karaduman M, Baydemir MB, Yıldırım M (June 1, 2025) Performance of Transformer-Based Methods on Restaurant Reviews Analysis. Firat University Journal of Experimental and Computational Engineering 4 2 351–362.
IEEE M. Karaduman, M. B. Baydemir, and M. Yıldırım, “Performance of Transformer-Based Methods on Restaurant Reviews Analysis”, FUJECE, vol. 4, no. 2, pp. 351–362, 2025, doi: 10.62520/fujece.1632266.
ISNAD Karaduman, Mücahit et al. “Performance of Transformer-Based Methods on Restaurant Reviews Analysis”. Firat University Journal of Experimental and Computational Engineering 4/2 (June 2025), 351-362. https://doi.org/10.62520/fujece.1632266.
JAMA Karaduman M, Baydemir MB, Yıldırım M. Performance of Transformer-Based Methods on Restaurant Reviews Analysis. FUJECE. 2025;4:351–362.
MLA Karaduman, Mücahit et al. “Performance of Transformer-Based Methods on Restaurant Reviews Analysis”. Firat University Journal of Experimental and Computational Engineering, vol. 4, no. 2, 2025, pp. 351-62, doi:10.62520/fujece.1632266.
Vancouver Karaduman M, Baydemir MB, Yıldırım M. Performance of Transformer-Based Methods on Restaurant Reviews Analysis. FUJECE. 2025;4(2):351-62.