Exploring Visitor Sentiments: A Study of Nusantara Temple Reviews on TripAdvisor Using Machine Learning

This study examines the mood of tourist evaluations for the Nusantara Temples, such as Borobudur, Prambanan, Ijo, Plaosan, and Mendut Temples, on TripAdvisor using stochastic gradient descent (SGD), logistic regression (LR), and support vector machine (SVM) classification techniques. The study examines the viewpoints and encounters of tourists from different nations on Indonesia's cultural legacy through English-language evaluations. The evaluation findings show that LR achieves the highest performance in sentiment classification, with an accuracy rate of 91.66%. The research offers valuable insights but has limits in portraying local visitors and relies heavily on the English language. Future studies might focus on doing sentiment analysis on more historical tourism sites in Indonesia, integrating multilingual data, and experimenting with novel categorization methods. This study significantly enhances our understanding of how technology and social media impact tourists' impressions of cultural heritage in the digital age via strengthening analytical methodologies and investigating alternative destinations.

Research on travelers' feelings towards Indonesian tourist locations is sparse, particularly in the field of sentiment analysis in English, despite the growing global interest in Indonesia's cultural assets.The varied perspectives and backgrounds of international visitors visiting the Nusantara Temples highlight the necessity for a more profound comprehension.This research intends to address the lack of information by making a unique contribution to the literature on sentiment analysis of tourism sites.
This study is noteworthy due to its extensive scope, which encompasses not just one but five well-known temples in Indonesia.The Borobudur Temple, Prambanan Temple, Ijo Temple, Plaosan Temple, and Mendhut Temple provide a diverse and intricate cultural heritage environment together.This research conducts sentiment analysis on five temples to showcase Indonesia's cultural variety and enhance worldwide knowledge of the country's history and heritage.This research aims to analyze English reviews on the TripAdvisor website to comprehend worldwide opinions of the Nusantara Temples.This research intends to analyze international tourists' sentiments on the diversity of Indonesian temples using Stochastic Gradient Descent (SGD) [10], Logistic Regression (LR) [11], and Support Vector Machine (SVM) [12] methods to get precise and insightful results.
This research seeks to contribute to the advancement of sentiment analysis in the context of tourism locations by addressing the existing literature gap and utilizing modern sentiment analysis methodologies.The study results will offer direction to stakeholders, including governments, tourist operators, and local people, on how to improve the experience and sustainability of the Nusantara Temples.

Figure 1. Sentiment Analysis Stages
This study included visitor reviews from five well-known temples in Indonesia: Borobudur Temple [4], Prambanan Temple [5], Ijo Temple [6], Plaosan Temple [7], and Mendut Temple [8].Visitor ratings were collected from the TripAdvisor website between February 2015 and February 2020.The information was acquired by manual scraping procedures, which involved copying and pasting data from a website into a spreadsheet [13].Table 1 provides comprehensive statistics about the gathered reviews.Preprocessing is an essential first stage in text analysis to prepare the material for further categorization or additional analysis [14].Five preprocessing phases are performed: punctuation removal [15], tokenization [16], stopword removal [17], and bag of words (BoW) [18].Table 1 shows considerable disparities in the quantity of excellent and negative data for each temple.This disparity might impact the model's performance or the upcoming analysis.The preprocessing stage involves a resampling method utilizing the synthetic minority oversampling technique (SMOTE) [19] to rectify the data quantity imbalance.
Eliminating punctuation includes removing any non-alphabetic characters from the text, including punctuation marks, numerals, and symbols [20].This phase is performed to remove irrelevant components from the text for sentiment analysis.Tokenization is the act of dividing the text into separate words wrapped in single quotation marks ('), making it more straightforward to analyze the content by breaking it down into smaller components [21].Stopword elimination is removing words that do not add to the significance of the text [22].BoW is a method that quantifies the frequency of word appearances in a text and converts them into input vectors for analysis or categorization [23].Every word in the text is tallied based on how often it appears in the document.SMOTE resampling tries to balance data by providing synthetic data points for the minority class.
SMOTE resampling equalizes the quantity of negative data points with positive data points [24].It is in line with the goal of SMOTE resampling, which aims to equalize the amount of data in each class by generating artificial data for the minority class.SMOTE works by creating synthetic instances of the minority class to balance the class distribution.It does so by generating new minority class samples based on the existing minority class instances.By selecting a minority class sample and its nearest neighbors, SMOTE ensures that the generated samples are plausible instances that fall within the data space of the minority class.This process effectively addresses the imbalance issue by increasing the representation of the minority class in the dataset, thus preventing the classifier from being biased towards the majority class.As a result, classifiers trained on SMOTE-enhanced data are better equipped to learn the underlying patterns of both classes, leading to improved model performance, especially in terms of sensitivity and specificity.Careful tuning of SMOTE parameters and validation of the model performance are essential to mitigate these risks and ensure the robustness and reliability of the analysis results.A classification model will be more effective in identifying and categorizing data from both classes equally and adequately when the data is balanced.
Classification is an essential step in text analysis that occurs after preprocessing the sample.The preprocessing stage is focused on purifying and refining the text data to prepare it for categorization [25].The classification step is used to evaluate the model's performance and calculate accuracy rates [26].Three classification methods used in this work are SGD, LR, and SVM.
During each iteration of the SGD approach, instances are randomly selected for classification decisions.The (;(i);(i)) function is used to reduce risk by adjusting the parameter  in a descending direction with a learning rate () as the step size.The equation for SGD is shown in (1).
The coefficients of the logit function in LR are derived by the calculation of maximum likelihood and R-Square (R2).This model is used to forecast the likelihood of the target class using input data.The formula used in LR is as follows SVM aims to find hyperplane parameters (w) that can effectively distinguish data points belonging to two different classes.Support vectors (x) influence the hyperplane's position, while the bias value (b) is used to fine-tune the hyperplane's location in the feature space.SVM computation involves equation (3).
The study involves classifying data using 20 different scenarios for comparing training and testing data, as shown in Table 2.These scenarios utilize data from several temples for training and testing.This technique helps assess the model's ability to categorize new, unseen data.The purpose of classification in this research is to have a better understanding of the model's performance and ability to categorize data from various classes and temples.The outcomes of this categorization study may be used as a foundation for making well-informed decisions about the management and enhancement of tourism attractions in Indonesia.
Performance assessment using Accuracy, Precision, Recall, and F1-score.Accuracy is used to quantify the proportion of correct predictions made by the model out of all predictions generated (4).Precision measures the accuracy of positive predictions, while recall measures the completeness of positive predictions (5).Recall is calculated as the ratio of true positive predictions to the sum of true positive and false negative predictions (6).F1 Score combines precision and recall into a single metric, representing the harmonic mean of the two (7).It provides a balanced assessment of a classifier's performance, especially in situations where there is an imbalance between positive and negative instances.Higher F1 Scores indicate better overall performance in terms of both precision and recall.

Accuracy =
TP + TN TP + TN + FP + FN (4) 1 −  = 2 .P . P +  (7) The assessment metric assesses the classification model's ability to anticipate and detect potential mistakes.It is essential for comprehending the model's effectiveness and boosting its performance if needed.

Results and Discussion
This study analyzed visitor reviews of the Nusantara Temples using three classification methods: SGD, LR, and SVM for sentiment analysis.The data has been preprocessed by resampling using the SMOTE to equalize the data distribution between majority and minority classes.The evaluation result of sentiment presents in table 3 to table 6.From Table 4, the method that has the best results in terms of precision is LR.This can be observed from the higher precision values for LR compared to SGD and SVM methods in most of the tested scenarios.Therefore, in accurately predicting the number of positive instances among all instances predicted as positive, LR demonstrates better performance than the other methods in this study.In table 5, LR stands out as the method with the most favorable outcomes in terms of recall.LR consistently exhibits higher recall values compared to SGD and SVM methods across various scenarios.Thus, LR proves to be more adept at identifying a larger proportion of actual positive instances within the dataset.Form Table 6, LR showcases superior performance in terms of F1-score.LR consistently demonstrates higher F1scores compared to SGD and SVM methods across a range of scenarios.This suggests that LR achieves a more optimal balance between precision and recall, resulting in a more robust and comprehensive evaluation of sentiment analysis effectiveness for the Nusantara Temples dataset.
Overall, the results of the sentiment analysis demonstrate the effectiveness and variability of the classification models (SGD, LR, and SVM) in categorizing visitor sentiments towards the Nusantara Temples.The model's performance differs under different training and testing data circumstances for each categorization technique.This suggests that the data's content significantly impacts the classification outcomes during both the training and testing phases.Variations in data quantity and attributes from each temple impact the categorization results in each scenario.
This study enhances the application of sentiment analysis in Indonesian tourism by offering significant insights into tourists' views on the Nusantara Temples.This study's conclusions can be used as a guide for decision-making in tourist management and promotion.

The Positive Views of Foreign Tourists Toward Temples
Temples serve as enduring symbols of the intricate history, representing the magnificence of past Hindu and Buddhist societies.The Ijo Temple is an architectural wonder that reflects the grandeur of the ancient Mataram Kingdom.Foreign tourists exploring the ancient sites might immerse themselves in the fascinating stories of former civilizations.
The Mendut Temple is a vast complex of Buddhist sanctuaries that impresses with its detailed construction and reliefs and reveals Buddhist doctrines and social devotion.
Plaosan Temple is a striking example of the blending of Hindu and Buddhist philosophies, showcasing creative representations from both faiths.The intricate architectural designs and majestic sculptures showcase the exceptional skill of artisans from the past.
The Hindu temple complex at Prambanan offers a unique and unmatched sensory experience.Tourists seek comfort among the tall buildings, reflecting on the ancient stories shown in the detailed carvings or admiring the grandeur of its towers.Borobudur, a magnificent example of Buddhist architecture, captivates with its tall levels and detailed basreliefs, encouraging reflection and spiritual contemplation.Temples are considered sacred by certain tourists, acting as sanctuaries for both Hindu and Buddhist worshippers.Borobudur is considered a spiritual location where devotees regularly sing during Vesak festivals.Here, those seeking comfort find shelter, meditating among the echoes of the past.
Temples provide a distinctive sensory experience, each with its charm.The Ijo Temple, situated on a lush hill, provides a breathtaking view of the sunset behind its old exterior, a mystical experience valued by sophisticated tourists.
Indonesia's diverse culture is beautifully showcased in its temples, attracting international travelers to explore the complex layers of history and legacy.Plaosan showcases a fusion of Hindu and Buddhist art, symbolizing the country's commitment to tolerance and harmony in the face of diversity.
Foreign tourists explore Indonesian history and culture while journeying through these hallowed areas.Their trip results in acquiring not only information but also a more profound comprehension of the human experience.Vol.Temple visits provide a break from the ordinary, allowing individuals to enter worlds of peace and amazement [27].Borobudur and Prambanan, located in peaceful surroundings, attract those seeking tranquillity, providing a break from city noise amid ancient whispers.
Many international fans highly respect these temples and serve as cultural representatives, inviting tourists to begin a path of enlightenment.Indonesia must protect and promote these sanctuaries to ensure their appeal remains for future generations by focusing on preservation, upgrading amenities, and increasing accessibility.

Negative Sentiments of Foreign Tourists Towards Temples
The aesthetic appeal of temples like Mendut, Ijo, Plaosan, Borobudur, and Prambanan captivates many tourists, particularly international visitors.However, several concerns must be resolved to guarantee a favorable tourism experience.One negative emotion that might occur is harm and devastation, which may result from either natural phenomena or human behavior.Volcanic eruptions and floods in the 19th century damaged Borobudur Temple in Indonesia [28].Some relief parts of Prambanan Temple were vandalized.Foreign tourists feel regret and anxiety when they see such occurrences since they recognize the historical and cultural significance of each religious edifice.
Moreover, the increased visitor population poses issues, particularly at temples like Borobudur and Prambanan.This density can detract from tourists' experiences, robbing them of the tranquil moments that are meant to be savored during historical trips.Borobudur Temple frequently attracts a large number of people, particularly during holidays or high tourism periods.
Excessive commercialization is a notable concern evident in the vicinity of Prambanan Temple.The souvenir stores, cafés, and amusement rides near the temple may interrupt the authenticity and quiet of the ancient place.
The significance of instruction and elucidation on the temples is crucial.Temples like Mendut Temple and Plaosan Temple may have insufficient information amenities.Insufficient information on the history, culture, and architecture of the temples might lead to foreign tourists feeling dissatisfied with their trips.
Tourists have challenges due to the restricted accessibility and infrastructure, particularly when visiting temples in distant locations like Ijo Temple.These temples may be inaccessible and have insufficient public amenities.For travelers with physical restrictions, this might be a significant restriction.
However, several international tourists continue to recognize the historical and cultural significance of temple monuments, including Mendut Temple, Ijo Temple, Plaosan Temple, Borobudur Temple, and Prambanan Temple.Preservation works, like the restoration of Prambanan Temple, are crucial for conserving cultural heritage.Enhancements in amenities, like the information centers at Borobudur Temple, together with tourist education, can assist in tackling these difficulties.Enhancing these elements will guarantee a more profound and valuable tourism experience at temple locations in the future.

Factors Influencing the Emergence of Sentiments
Various variables might impact individuals' thoughts towards temples, shaping their ideas and feelings about this cultural legacy.Education and expertise are crucial variables.People who possess a profound comprehension of the historical background and cultural significance of temples, like Borobudur Temple, frequently cultivate favorable feelings.They can admire the beauty of reliefs and spiritual symbolism, establishing a deep emotional bond with the location.
Personal experiences are also vital.Visiting temples like Prambanan Temple may influence emotions via direct experiences.For instance, an individual experiencing tranquillity within the temple complex may bring back enduring favorable emotions.
The temples' physical state and authenticity can also influence emotions.Temples like Mendut Temple, which are wellmaintained via regular repair and upkeep, typically garner favorable feedback [29].If a temple experiences substantial damage, it might lead to worries and pessimism about its future stability.Vol. 5, No. 2, May 2024, pp.600-612 ISSN 2723-6471 607 Media coverage has a substantial impact on public opinion.Positive media coverage of successful preservation programs or archaeological finds near temples might increase widespread appreciation.On the other hand, unfavorable reports about vandalism or destruction might trigger worries and emotions of deprivation.
Additionally, one's spiritual and cultural interests are also influential.Visiting temples like Plaosan Temple may be significant for those with a great interest in spiritual values, evoking good feelings associated with tranquillity and the continuity of religious customs.
Tourism in temple locations can significantly influence emotions.Factors such as tourist density, facility comfort, and commercialization around temples might impact visitors' sense of connection or disruption at the site.
Social and cultural variables are also significant.Societal perspectives on cultural legacy, national identity, and interfaith tolerance might influence their attitudes toward temples.Ijo Temple, showcasing the Hindu-Buddhist variety, may be seen as a representation of concord by societies that appreciate plurality.
Technological progress and social media also impact feelings.Reviews, images, and tales shared by tourists on internet platforms can influence how people see and feel about temples.Favorable evaluations can motivate people to attend, but unfavorable reviews might raise apprehensions.
Conservation and maintenance of temples can influence emotions.Genuine responsibility in protecting the originality and sustainability of temples may foster great respect and support from the community.
Understanding the intricacy of these aspects allows for the creation of more efficient preservation and promotion methods to maintain good public feelings and save this cultural treasure for future generations.

Building Positive Sentiments and Reducing Negative Sentiments
It is necessary to take steps to promote good feelings and diminish negative feelings in society to preserve temples as crucial cultural assets.Initially, a community empowerment strategy can be put into action.Engaging local inhabitants in conservation efforts, such as volunteer programs or instruction on temple history, may foster significant involvement and a feeling of ownership of this cultural property.
Education is of utmost significance.By conducting awareness campaigns, training tourist guides, and implementing educational programs in schools, we can improve public understanding of the historical and cultural significance of temples.Increased comprehension is expected to foster tremendous respect and favorable attitudes regarding the significance of temples in national identity.
Effective tourism management can mitigate adverse feelings associated with overcrowding and commercialization near the temples [30].Controlling visitor numbers, establishing environmentally friendly infrastructure, and using sustainable management practices can enhance the tourism experience.
Utilizing social media and technology may effectively help cultivate pleasant feelings.Digital advertising showcasing the aesthetic and cultural significance of temples, together with positive tourist testimonials, may positively influence and mold favorable attitudes among local and worldwide populations.
Conservation and restoration initiatives are also vital.These projects prioritize the physical sustainability of temples and emphasize the importance of preserving cultural heritage.This can enhance public confidence in conservation initiatives and reduce pessimistic feelings about the temples' uncertain future.
Moreover, implementing openness in the administration and governance of temples might mitigate adverse feelings.
Transparently sharing details about projects, conservation strategies, and financial allocation helps build trust within the community about the responsible management of temples.
These actions should be incorporated into a comprehensive strategy that involves cooperation among the government, the community, and other stakeholders.We can establish an atmosphere that fosters preservation and promotes good attitudes towards temples while reducing negative perceptions to ensure the long-term maintenance of this cultural legacy for future generations.

Temples as Bridges Between the Past, Present, and Future
Temples, with their elegant historic architecture, represent more than simply tangible buildings.They serve as vital links between the past and present, showcasing historical legacy, cultural identity, education, and sustainability.Temples in Indonesia serve as a testament to the grandeur of Hindu and Buddhist civilizations, providing insight into our historical origins.
The temple's significance as a connector is well supported by its historical legacy.The historic architectural monuments contain narratives of former civilization's grandeur, providing opportunities for us to see and comprehend the evolution of human civilization.Studying temples connects us to the historical events that have influenced our contemporary society, establishing a solid connection between different generations.
Temples symbolize Indonesian cultural identity.They are not only tangible edifices; they represent a fundamental component of our country's identity.Temples are a reflection of the historical, cultural, religious, and creative variety.
Studying the significance of temples in history helps maintain and enhance Indonesia's cultural identity, passing on this cultural wealth to future generations.
Temples also function as bridges for education and learning.Temples serve as educational resources for history, technology, architectural art, and ancient belief systems, in addition to being tourist attractions.Visiting temples offers significant education, expanding the present generation's knowledge about ancient civilizations.
Historical tourism showcases temples across the world.Both local and foreign visitors visit Indonesia to experience its history and culture directly.These visits enhance cultural and historical values, establishing a robust link between the present and the past.
Maintenance and preservation guarantee the continuity of the bridge between the present and the future.Focusing on temples as cultural assets encourages the preservation and protection of these sites.These endeavors aid in preserving a link to the past and guaranteeing that the variety of historical events continues to be valued by subsequent generations.
Temples act as a bridge between the present and the future by preserving and transmitting cultural legacy to upcoming generations.Studying temples aids in conveying significant historical principles and offers an understanding of the progression of human society.Temples, as architectural masterpieces, can inspire future artists and architects, leaving a lasting impact.
Temples play a crucial role in environmental conservation to maintain the long-term viability of nature [31].Intact temples play a crucial role in sustaining the local ecology and are important symbols in environmental conservation initiatives.Temple preservation via responsible and sustainable tourist management guarantees their enjoyment by future generations.
It is crucial to strategize methods for safeguarding temples in Indonesia due to the country's susceptibility to a range of natural calamities.Various calamities, including as earthquakes and volcanic eruptions, pose a threat to the conservation of these precious monuments [32].A comprehensive approach is required to tackle this situation.An significant method is utilizing the ecosystem services methodology [33].We can enhance protection techniques by comprehending and employing the ecosystems surrounding the temples.Moreover, disaster education is essential [34].
Enhancing public awareness of catastrophe risks and response strategies can improve our preparedness.Environmental conservation should be prioritized [35].Preserving the ecosystems around the temples safeguards both our cultural history and the long-term preservation of the natural environment for future generations.By integrating these methods, we can guarantee the preservation of these significant temples, establishing crucial connections between Indonesia's history, current state, and future.
Concrete examples and case studies provide compelling evidence of the tangible impacts of temple preservation and promotion on cultural heritage conservation.For instance, the restoration efforts at Borobudur Temple in Indonesia, undertaken through collaborative initiatives involving the government, international organizations, and local communities, have successfully addressed structural issues and mitigated the effects of environmental degradation and vandalism [36], [37].Through meticulous restoration work and educational programs, Borobudur Temple has not only been safeguarded for future generations but has also become a symbol of national pride and a significant tourist

Table 1 .
Detail Number of Review Data

Table 2 .
Data Comparison Scenario

Table 3 .
Temple Sentiment Accuracy Result In Table3, LR demonstrates superior Accuracy compared to SGD and SVM in several training and testing scenarios.LR shows superior Accuracy in several contexts, highlighting its excellent capacity to categorize data accurately.Higher accuracy scores indicate better overall performance of the classification models in correctly predicting sentiment labels.Vol. 5, No. 2, May 2024, pp.

Table 4 .
Temple Sentiment Precision Result

Table 5 .
Temple Sentiment Recall Result