Sentiment Analysis of Restaurant Customer
Sentiment Analysis of Restaurant Customer
Abstract- Sentiment analysis is one method for classifying done with the help of Python, while for classifying data using
documents to identify positive or negative opinions. Customer Waikato Environment for Knowledge Analysis (WEKA)
satisfaction has an essential point for customer service. software with the Naive Bayes method and also using
Customer behaviour is currently doing a lot of reviews in online TextBlob which is a python-based sentiment analyzer to
media such as on trip advisor. A restaurant is a business that compare. Naive Bayes is chosen because this method has been
requires more attention in the service to consumers by widely implemented in sentiment analysis [9]-[11] .
improving service to customers continuously. This study tries to
classify Surabaya restaurant customer satisfaction using Naive This aim of this study is to analyze restaurant customer
Bayes. Data sampling is crawling by using WebHarvy Tools. reviews from online TripAdvisor in the best ten Surabaya
The result from this research shows that these two methods get restaurants. Another aim is to find the best method for
the customer response accurately and Naive Bayes method is analyzing restaurant customer review data by comparing
more accurate than TextBlob sentiment analysis with a different Naive Bayes method and TextBlob [12], [13] sentiment
accuracy of 2.9%. analysis since the two methods have fundamental differences
in terms of calculations.
Keywords- customer satisfaction, Naive Bayes,
sentiment analysis, textBlob II . LITERATURE REVIEW
Customer satisfaction is an essential concern in the field
I. INTRODUCTION
of marketing and research in terms of consumer behaviour.
Customer satisfaction is an opinion or feeling between As in the habits of hotel consumers when they get excellent
expectation and reality obtained by consumers [1]. Today, service, they will transmit to others mouth to mouth [14] .
many customers write opinions in the form of reviews about
their obtained satisfaction on online media, such as Text mining or retrieval of data from a collection of
TripAdvisor. Customer reviews on the online media become documents stores frequently with the help of analysis tools or
important as it might increase the popularity of the product or manuals [13] . Through the analysis process of several text
service sold by the seller. mining perspectives, information can be produced that can be
used to increase profits and services.
A restaurant is a business [2], [3] that prepares and serves
food for customers and exchanges for a certain amount of Sentiment analysis is used to find opinions from the
money. Although improving quality through this method is author about a specified entity [15]. Sentiment analysis of a
considered useful, only some restaurants use customer review is an opinion inve stigation ofa product [16]. The basis
satisfaction analysis to improve their services. Also, many of sentiment analysis is using Natural Language Processing
algorithms might be used for doing the study [4], [5]. (NLP), text analysis and some computational portions to
extract or omit unnecessary parts to see the pattern of the
Restaurant customer satisfaction research through reviews sentence negative or positive [17].
on online media such as TripAdvisor is still rare. Generally,
restaurant customer satisfaction analyses through product In the l Sth century, Reverend Thomas Bayes developed
data, nutrition data and food preparation [6]. One of the a method known as Naive Bayes that used probability and
previous studies is an analysis of hotel customer satisfaction opportunity approaches. The workings of the Naive Bayes
in Ponorogo district. The study used hotel customer review algorithm can be seen in Equation (1). Naive Bayes calculates
data on TripAdvisor [7]. future probability predictions from data or experiences that
have been given, based on the opportunity point of view [18].
Restaurant reviews on TripAdvisor are still in the form of One characteristic of the Naive Bayes Classification is the
text, customer reviews are included in the text mining existence of independent input variables which assume the
category, the results of these data will be classified into two presence of an articular feature from a class that is mutually
values, positive or negative [8]. Retrieving data on independent of other features [19] .
TripAdvisor using WebHarvy software, for preprocessing
review data such as remove stopword, remove punctuation is
50
Overview Rev ieVJs Location O& A Details
r----------
~ R e vi e w e d 1 we ek ago
Ni ce
F o o d was delicious . Service was good. Not so expe nsive . You must t ry
th ..ir "Aya m Bakar" Servi ng t im.. quite fast. Overa ll ok >
Yulic HV'1
S urabaya,
Indon esi a Date o f v isit: November 20 18
[3 3
.~ T h 'lnk YulleH'N
51
TABLE!. PART OF TH E RESULT OF D ATA COLLECTION
Time taken to Build mod el: 0.27 seconds
Correctly Clas sified 237 88.1041 %
No. Restaurant Name Reviews
Incorectly Classified 32 11.8959 %
About the steak, well, the taste
I Steak Hut Manyar Kertoarjo === Confusion Matrix ===
was nice
a b <-- class ified as
2 Steak Hut Manyar Kertoarjo The price is standard
63 141 a=-1
I think, they need more
3 Steak Hut Manyar Kertoarjo
innovation for their menu
181741 b = 1
4 Steak Hut Manyar Kertoarjo Abo ut the place, felt comfortable
Fig. 6. Training data and resu lt
overall, worth to try this
5 Steak Hut Manyar Kertoarjo
restaurant
TABLE III. TH E CLASSIFICATION OF TESTING DATA BY USING NAIvE
6 Steak Hut Manyar Kertoarjo best luck BAYES AND TEXT BLOB
4. best luck -I * I I
52
thanks good service delicious beef 56. you starving dont go there -1 1* -1
27 . -1* 1 1
steak i will back here
quite take time especially restaurant
57. -1 1* -1
28 . thanks lot -I * 1 I crowded
food price expensive quality average TABL E IV. C ONFUSION M ATRIX OF N AiVE B AYES AND T EXTBLOB
40 . -1 -1 -1
portion small Naive Bayes TextBlob
53
Conversely, Naive Bayes has a lower FP number than Comment Titles in Booking. corn Using Probabilistic Latent
TextBlob. The accuracy of the confusion matrix listed in Semantic Analys is," in 2018 6th International Conference on
Information and Communication Technology (lCoICT), 2018, pp.
TABLE IV is processed by using Equation (5). The accuracy 514-519.
of Naive Bayes is shown in Equation (6), and the accuracy of
TextBlob is shown in Equation (7) . The results of the [8] D. Grabner, M. Zanker, G. Fliedl, M. Fuchs, and others,
calculation of the above formula for the Naive Bayes method Classification of customer reviews based on sentiment analysis.
Citcsccr, 2012 .
have data accuracy of 72.06%, whereas by using the
TextBlob analyzer obtained an accuracy of 69.12%. From [9] B. Y. Pratama and R. Sarno, "Personality classification based on
these results, the Naive Bayes method using WEKA tools has Twitter text using Na ive Bayes, KNN and SYM ," in Data and
Software Engineering (ICoDSE), 2015 International Conference
a higher percentage of accuracy than the TextBlob sentiment on,2015,pp.170-174.
analysis.
[10) F. S. Fitri, M . N. S. Si, and C. Setianingsih, "Sentiment Analysis
Accuracy Naive Bayes = 72.06% (6) on the Level of Customer Satisfaction to Data Cellular Services
[2] Y. Caesarita and K R. Sungkono, "Identifying Bottlenecks and [19) T. Pranckevicius and V. Marcinkevicius, "Comparison of naive
Fraud of Business Process using Alpha ++ and Heuristic Miner bayes, random forest, decision tree, support vector machines, and
Algorithms (Case study : CV . Wicaksana Artha )," pp . 143-148, logistic regre ssion classifiers for text reviews classification,"
2017 . Baltic Journal ofModern Computing, vol. 5, no . 2, pp. 221-232,
2017 .
[3) R. Sarno and K R. Sungkono, "Coupled Hidden Markov Model
for Process Disco very of Non-Free Choice and Invisible Prime [20] D. L. Gupta , A. K Malv iya, and S. Singh , "Performance analys is
Tasks," Procedia Computer Science, vol. 124, pp. 134-141,2018. of classification tree learning algorithms," International Journal of
http ://doi.org/IO.lOI6/j.procs.2017.12.139. Computer Applications, vol. 55, no. 6,2012.
[4] M . Fikri and R. Sarno, "A Comparative Study of Sentiment [21] B. Agarwal, N . Mittal , P. Bansal, and S. Garg, "Sentiment analysis
Analysis using SVM and SentiWordNet," Indonesian Journal of using common-sense and context information," Computational
Electrical Engineering and Computer Science (lJEECS), vol. 13, intelligence and neuroscience, vol. 2015 , p. 30, 2015 .
no. 3,2019.
[22] S. Vijayarani, R. Janani , and others, "Text mining: open source
[5] B. Rintyarna, R. Sarno, and C. Fatichah, "Enhancing the tokenization tools-an analysis, " Advanc ed Computational
performance of sentiment analysis task on product reviews by Intelligence : An International Journal (ACI/) , vol. 3, no. I, pp . 37-
handling both local and global context," International Journal of 47,2016.
Information and Decision Sciences, vol. 11,2018.
[23] M. Hall, E. Frank, G. Holmes, B . Pfahringer, P. Reutemann, and 1.
[6] J. E. Mills and L. Thomas, "Assessing customer expectations of H. Witten, "The WEKA data mining software : an update," ACM
information provided on restaurant menus: A confirmatory factor SIGKDD explorations newsletter, vol. II , no. I, pp. 10-18,2009.
analysis approach," Journal of Hospitality & Tourism Research ,
vol. 32, no . I, pp . 62-88,2008.
[7] D. A. K Khotimah and R . Sarno, "Sentiment Detection of
54