scieee AI-readable full text Open interactive document viewer

Sentiment Analysis of Gastronomic Posts from Colour Palettes and Narrative Content

Casales-Garcia, Vicente; Sanz, Ismael; Museros, Lledó; Falomir, Zoe; González Abril, L.

Abstract

This paper presents an approach for analysing gastronomic images and also their related comments published by the Getcookingcanada Instagram ac count, which belongs to a cooking school. Our approach processes the published images to calculate the moods that the image can generate depending on its colour palette, and also analyses the comments related to each publication for determining the positive or negative sentiment associated to them. A dataset containing all these data has been built, and then the correlations among the data has been developed in order to explain the relation between the mood adjectives and the result of the senti ment analysis of the comments of the food images. 673 food images were analysed; the data analysis was carried out using the Kruskal-Wallis one-way ANOVA test on ranks and Jonckheere-Terpstra’s test. Our results show that there is a significant difference between the different adjectives in terms of sentiment analysis.

Full text

Sentiment Analysis of Gastronomic Posts from Colour Palettes and Narrative V.CASALES-GARCIA a,1, I.SANZ bL.MUSEROS bZ.FALOMIR band L.GONZALEZ-ABRIL a aUniversidad de Sevilla, Dpto. de Economía Aplicada I, Avda. Ramón y Cajal, 1, Sevilla, E-41018, Spain bUniversity Jaume I, Engineering and Computer Science Dept., Av. Vicent Sos Baynat s/n, Castelló, E-12071, Spain Abstract. This paper presents an approach for analysing gastronomic images and also their related comments published by the Getcookingcanada Instagram account, which belongs to a cooking school. Our approach processes the published images to calculate the moods that the image can generate depending on its colour palette, and also analyses the comments related to each publication for determining the positive or negative sentiment associated to them. A dataset containing all these data has been built, and then the correlations among the data has been developed in order to explain the relation between the mood adjectives and the result of the sentiment analysis of the comments of the food images. 673 food images were analysed; the data analysis was carried out using the Kruskal-Wallis one-way ANOVA test on ranks and Jonckheere-Terpstra’s test. Our results show that there is a significant difference between the different adjectives in terms of sentiment analysis. Keywords. Sentiment analysis, Gastronomy, Instagram, Social media, image processing, colour palette, natural language processing, tourism, regression, ANOVA, deep learning 1. Introduction Gastronomy is a key component in the promotion of tourist destinations. Gastronomic experiences influence human behaviour because they stimulate pleasure [1], and they can be used to understand local culture, its traditions, and its history [2,3,4]. These can also provoke feelings of involvement and attachment to a place [5]. Local food could influence destination choice and perception of experience both before and after a trip [6, 7,8]. According to [9], the internet provides positive destination image for pre-travelling as a marketing strategic to provide a holistic travel experience. The most common channel for the gastronomic promotion of destinations is through official tourism websites and social media that display the most typical local dishes [10,11,12,9]. On these websites and social media, information, photos, and graphics are 1All authors contributed equally to this paper. Content Artificial Intelligence Research and Development I. Sanz et al. (Eds.) © 2023 The Authors. This article is published online with Open Access by IOS Press and distributed under the terms of the Creative Commons Attribution Non-Commercial License 4.0 (CC BY-NC 4.0). doi:10.3233/FAIA230700 311 provided that create a gastronomic image [10]. According to [13] one of the ways to better attract tourists is by using the visual media-oriented Instagram social network, where posting gastronomy-related content is termed foodstagramming. Food images posted on social media help tourists meet their needs for entertainment, personal identification, and social interactions [14], resulting in better dining and travel experiences [15]. According to [13], in order to attract potential tourists, tourism authorities and marketers are leveraging touristic photos to pave the road for destination promotion and image development [16,17]. In other words, tourists simultaneously become producers and consumers of locations and the visual culture connected with them [18]. When a tourist travels away from home, taking and sharing travel images allows her to act as both a consumer of destination experiences and a narrator of these experiences to friends and family back home [18]. This combined role of actor and narrator has many advantages for vacation selfies.Furthermore, according to [19] the sentiment analysis can be used for the purpose of consolidating the pictorial and textual information and better understanding what foodstagrammers share about their culinary experiences. Therefore, being able to understand the impact of food images published in social media is important. And this is the aim of this research paper, specifically the paper analyses the food images published by the Getcookingcanada Instagram account in order to get knowledge about which sentiments produce, and the sentiment that their comments generates, and obtain relations among all of these. The rest of this paper is structured as follows. Section 2presents how to analyse each image, which means how we can assign an adjective to an image following the methods presented in [20]. Also, in this section how the sentiment analysis done with the comments associates to each image is presented following the trends presented in [21]. Section 2.1 shows the methods used for our analysis. Results obtained are described and discussed in Section 3. Finally, conclusions and ideas for future work are presented in Section 4. 2. Methodology 2.1. Kobayashi’s Model: Colour Image Scale One of the aims of this paper is to analyse food colour and the moods that it can produce. To this end, we use Kobayashi’s Colour Image Scale model, which was developed to define how a single colour and harmonic combinations of colours affect people’s moods [22]. After a series of studies, Kobayashi created a system that: (i) defined a twodimensional space based on the perceptual qualities of warmth/coldness and hardness/softness of colours, and defines coordinates for 130 colours on this space; (ii) assigns labels related to mood to particular areas in this space (for example, happy and vigorous); (iii) groups labels (i.e., areas in the perceptual space) that are related to different lifestyles (causal, modern, romantic, natural, classic, and elegant); and (iv) enables a predominant adjective to be assigned to a colour scheme. To verify the adjectives in the dish’s images, an automatic method was applied to associate a Kobayashi’s adjective to the colour palette of the appearance of a dish. In order to automatically assign an adjective/keyword based on Kobayashi’s model to the colour palette corresponding to the image of a dish next process has been carried out: V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts312 Table 1. Examples of adjectives and corresponding Kobayashi’s colour palettes Adjective Kobayashi’s Colour palettes Aromatic Citric Fresh Healthy-light Romantic Wholesome •Every picture is segmented, so that only the parts of the image showing food are kept. The segmentation was done automatically by applying the method described in [23]. •For each image of a dish the most representative Kobayashi’s colours of the image are calculated. Then, for each combination of three of these colours, a Kobayashi’s colour palette is searched. Not all the combinations result in a Kobayashi’s colour palette. •For each Kobayashi’s colour palette obtained before, a keyword/adjective in the Kobayashi’s model is assigned. To calculating Kobayashi’s colours, the Euclidean distance between the RGB colours in the images and the RGB colour representations of Kobayashi’s model is used. Some examples of adjectives and Kobayashi’s palettes are shown in Table 1. This table also shows up to six Kobayashi’s colour palettes associated to each adjective (note that some adjectives have less than six colour palettes defined in the model). 2.2. Sentiment Analysis of the comments associated to each image In our study, the polarity of the comments associated to an image was obtained using a model based on DistilBERT [24], a deep learning model based on transformers. The score of this was discretised converting it into the qualitative labels Positive,Neutral and Negative. The experience by the Influencers or Instagrammers is measured as years pass by, since they are gaining experience progressively and their uploaded photos are increasingly more attractive to their followers. 3. Experimentation and results This study is based on a dataset culinary images published in the Instagram account @getcookingcanada2by the Get Cooking online cooking school. These images and their associated comments were retrieved using the Instagram API. To this end, the following steps have been carried out: Data collection and preprocessing We downloaded images and kept only food images; other images containing people, such as a chef or a student, were discarded. We applied the methods described in the previous section to assign a sentiment analy- 2Getcookingcanada Instagram account: https://www.instagram.com/getcookingcanada/.We were granted permission to process their images. V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts 313 sis score each image based on to the associated comments, and to assign up to five Kobayashi’s adjectives to each image. Data treatment: Processing and analysing the information obtained: Tabulation, comparative graphics, and analysis thereof, through research instruments. The data analysis to test the proposed research has been done using a Kruskal-Wallis oneway ANOVA by ranks test and Jonckheere-Terpstra test by using the version 26 SPSS program. Hypothesis: There are differences between the adjectives in terms of sentimental analysis. The initial dataset has 1523 culinary images, of which 958 had comments, with an average of 3.05 comments per image. Only the images with comments are used. The first part of the experimentation is the application of the automatic label process of the Kobayashi’s model to the images of the dataset, which involves extracting the colour palettes from the culinary images published in the Instagram account @getcookingcanadain order to associate a feeling or mood with them. Specifically, these images refer to dishes. The main aim is to propose possible feelings that a user can have when seeing those images. Note that Kobayashi’s model defines cognitive labels based on colour palettes only, and no extra information about the image is used. To be able to apply the proposed method to images, the following steps are necessary: first, colours in each image are discretised and the corresponding colour names (QCLAB) are obtained. Then, all palettes based on the 5 most frequent chromatic colours in the image are considered, but only if the combined frequency of all colours is at least 30% of the total of colours (including also grey scale colours). This prevents assigning mood keywords to palettes that are not representative enough. It also prevents assigning no relevant adjectives to images where grey scale colours predominate. Table 2shows the results of the experiment for some of the food images of the dataset (columns one, two and four). Next, a study between the main adjective with the rate of sentiment analysis is carried out. In addition to removing images without comments the dataset was pre-processed to remove the adjectives that are not present in the dataset at least four times, because it is a condition to apply the Kruskal-Wallis test and the Jonckheere-Terpstra test. The 673 culinary image that fulfilled these requirements were used in the experimentation. Table 2shows (i) an example of the digital images used for extracting the colour palettes, (ii) the name of the dish, (iii) the sentiment analysis score obtained for the comments of the post, (iv) the semantic adjectives (representing a mood following Kobayashi’ model) assigned, and (v) some of the comments analysed. The five most relevant semantic adjectives for each image are shown, in order of relevance (not all are equally relevant). After applying the tests, the most important results are summarised in the following list (Result 1–6): Result 1: The main adjectives that appear in food images are shown in Figure 1and Table 3. It is worth noting that Romantic is the most repeated adjective (see Figure 1) with a percentage of 25.3%. Result 2: A Kruskal-Wallis and one-way ANOVA by ranks test (see Table 4and Figure 2) showed that there was a statistically significant difference between the score of the sentiment analysis and the Kobayashi’s adjectives (p=0.00049). V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts314 Table 2. Results: Sentiment analysis score (SA), five main adjectives given by Kobayashi’s model, and comments (C# is a commentary and A# is the answer). Images Digital Name SA Adjectives and score Comments Tempering Coconut Chutney .999 Refreshing (2.22), Fresh (1.49), Amiable (0.90), Healthy (0.78), Masculine (0.78) C1) I understood very little from all the words but looks delicious Dal Tadka, Indian cuisine .996 Romantic (1.16), Amiable (0.76), Bright (0.67), Wholesome (0.62), Bold (0.61) C1) Aloo Gobi had been one of the dishes I learned that I make the most since class. Love this dish! Salmon .995 Romantic (1.34), Amiable (0.75), Supple (0.69), Soft (0.68), Masculine (0.67) C1) looks fantastic C2) Looks amazing. I thing like a perfectly cooked salmon Risotto and Arancini .964 Romantic (2.16), Light (1.43), Crystalline (1.43), Amiable (1.00), Charming (0.77) C1) let’s go!! A1) ummmmmmmmm YES PLEASE Soft Venison with Parsnip Pure .741 Amiable (0.87), Bold (0.86), Innocent (0.86), Light (0.86), Bright (0.86), Festive (0.86) C1) Omg this is incredible A1) thank you, We were pretty happy with this dish C2) This was sooooo yummy C3) Wow!!!!! Looks so amazing Beef Wellington Mushroom Sauce .461 Romantic (1.16), Masculine (0.59), Supple (0.58), Intellectual (0.58), Charming (0.58) C1) I would so happily do that!!, unfortunately we cannot take it this C2) It was an awesome class. Crostini with Roasted −.761 Light (1.60), Romantic (1.59), Amiable (0.83), Wholesome (0.82), Healthy (0.81) #Vegetarian #Cooking- Classes Result 3: The Box-plot (see Figure 2) shows that the Wholesome adjective (15) has a minor score mean (0.256) in the sentiment analysis process from other adjectives. On the opposite side it is the Charming adjective (3) with the mayor score (0.443) although this one is not very representative as there are only four images. Result 4: Since significant differences have been found, then multiple pairwise comparisons have been done. Table 5shows the pairs where significant differences have V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts 315 Figure 1. Frequency of adjectives appearance Table 3. Frequency & Percentage of adjectives: Amiable (1), Bright (2), Charming (3), Crystalline (4), Festive (5), Fresh (6), Healthy (7), Light (8), Masculine (9), Modern (10), Neat (11), Romantic (12), Supple (13), Untamed (14), and Wholesome (15) Adjectives 12 3 4 5 6 7 8 9 10 11 12 13 14 15 Total Frequency130 36 4 31 34 25 30 70 44 15 40 170 15 11 18 673 Percentage (%) 19.3 5.3 0.6 4.6 5.1 3.7 4.5 10.4 6.5 2.2 5.9 25.3 2.2 1.6 2.7 100 Mean Score .402 .368 .443 .293 .394 .348 .350 .316 .359 423 .351 .271 .317 377 256 – Table 4. Kruskal-Wallis Test and Jonckheere-Terpstra Test Kruskal-Wallis Test Jonckheere-Terpstra Test N 673 N 673 Value of Statistic 49.61 Value of Statistic 82723.50 Grade of Freedom 14 Standard Error 2874.48 Asymptotic Sig. (2-sided test) 0.000 Standard Test Statistic -5.388 Asymptotic Sig. (2-sided test) 0.000 been found with a level of significance α=0.05 (21 of 105= 15 2pairwise). Result 5: In order to confirm the results obtained with the Kruskal-Wallis test, the Jonckheere-Terpstra test for ordered alternatives is carried out. In Table 4can be seen from the Jonckheere-Terpstra test that there was a statistically significant trend of sentiment scores with adjectives. That is, there is a difference between the adjectives in terms of sentiment analysis. 4. Discussion & Conclusion Our main aim was to rate the users’ preferences according to the colours displayed in the images and also to propose possible feelings that a user can have when seeing those V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts316 Figure 2. Box-plot of the score for each adjective gastronomic images. With this information, restaurants would be able to design dishes using colours that may satisfy their future clients. Our results show that there are statistically significant differences between the sentiment analysis scores assigned to images whose colours can be described using different adjectives using Kobayashi’s model. This implies that it is possible to use a palette of colours to evoke a mood, and that this has detectable effects using sentiment analysis. Therefore, the evoked positive emotion may produce a good response for consumers. Moreover, this paper confirms the result by [20] that shows empirical evidence of the value of mood descriptors derived through colour. We conclude that Kobayashi’s model could be a good tool that can be used for marketing issues, considering restaurants and promoters of gastronomic tourism that advertise on social networks (e.g., Instagram, Facebook, TikTok). It is important to continue our studies into how colours influence people’s behaviour when choosing a dish, and which sort of food is more attractive from the point of view of food colours in their gastronomy. In addition, this could give the chefs the possibility to categorise the adjectives into positive and negative moods. Furthermore, the moods that the chef wants to evoke in the dish are related to positive or negative Sentiment analysis. Businesses can display pictures of their food that have specific colour palettes to make it more appealing to potential customers or tourists. Therefore, if chefs or marketers want to evoke a sustainable or healthy mood through food images, they can use a recommendation system to help them. Acknowledgments This work has been partially funded by the Spanish Ministry of Science, Innovation and Universities through the project Prueba de Concepto para la Plataforma de Análisis Social Dinámico en el Contexto del Turismo Sostenible (PDC2021-121097-I00), by the Ministry of Economy and Commerce through the project TIN2016-88835-RET, the EDITH Research Project (PGC2018-102145-B-C21), and the project UJI-B2020-15 funded by Universitat Jaume I. Z. Falomir acknowledges the Ramon y Cajal fellowship V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts 317 Table 5. Multiple pairwise comparisons. The columns shows Kobayashi’s adjectives, the test statistic, the standard error, the test standard error and the p-value Multiple comparisons of pairwise Pairwise Test Stat Std. Error Std. Test Stat p-value Wholesome ←→ Neat 109.875 55.835 1.968 .049 Wholesome ←→ Fresh 134.440 59.495 2.260 .024 Wholesome ←→ Healthy 136.217 57.528 2.368 .018 Wholesome ←→ Masculine 140.488 54.419 2.582 .010 Wholesome ←→ Bright 154.222 55.835 2.762 .006 Wholesome ←→ Amiable 162.737 49.611 3.280 .001 Wholesome ←→ Untamed 162.955 72.785 2.239 .025 Wholesome ←→ Festive 179.485 56.338 3.186 .001 Wholesome ←→ Modern 193.964 68.007 2.852 .004 Wholesome ←→ Charming 229.625 103.883 2.210 .027 Romantic ←→ Healthy 74.593 36.800 2.027 .043 Romantic ←→ Masculine 78.865 31.721 2.486 .013 Romantic ←→ Bright 92.599 34.094 2.716 .007 Romantic ←→ Amiable 101.113 22.496 4.495 .000 Romantic ←→ Festive 117.862 34.912 3.376 .001 Romantic ←→ Modern 132.341 51.670 2.561 .010 Crystalline ←→ Amiable 82.463 37.642 2.191 .028 Crystalline ←→ Festive -99.211 46.148 -2.150 .032 Light ←→ Amiable 77.934 28.743 2.711 .007 Light ←→ Festive 94.682 39.229 2.414 .016 Light ←→ Modern -109.161 54.680 -1.996 .046 (RYC2019-027177-I / AEI / 10.13039/501100011033) awarded by the Spanish Ministry of Science, Innovation and Universities. All the authors acknowledge Getcookingcanada, and thank Chef Kathryn Joel in particular. References [1] Rozin P, Kurzer N, Cohen A. Free associations to food: effects of gender, generation, and culture. Journal of Research in Personality. 2002;36:419-41. [2] Fields K. Demand for the gastronomy tourism product: motivational factors. Tourism and gastronomy. 2002;4(2):36-50. [3] Henderson JC. Food tourism reviewed. British Food Journal. 2009;111(4):317-26. [4] López-Guzmán T, Sánchez-Cañizares S. Culinary tourism in Córdoba (Spain). British Food Journal. 2012;114(2):168-79. [5] Gross MJ, Brown G. An empirical structural model of tourists and places: Progressing involvement and place attachment into tourism. Tourism Management. 2008;29(6):1141-51. [6] Duarte Alonso A. Olives, hospitality and tourism: a Western Australian perspective. British Food Journal. 2010;112(1):55-68. [7] Quan S, Wang N. Towards a structural model of the tourist experience: An illustration from food experiences in tourism. Tourism Management. 2004;25(3):297-305. [8] Smith S, Costello C. Segmenting Visitors to a Culinary Event: Motivations, Travel Behavior, and Expenditures. Journal of Hospitality Marketing & Management. 2009 jan;18(1):44-67. [9] Björk P, Kauppinen-Räisänen H. Culinary-gastronomic tourism–a search for local food experiences. Nutrition & Food Science. 2014;44(4):294-309. V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts318 [10] Horng JS, Tsai CT. Government websites for promoting East Asian culinary tourism: A cross-national analysis. Tourism Management. 2010;31(1):74 85. [11] Okumus B, Okumus F, McKercher B. Incorporating local and international cuisines in the marketing of tourism destinations: the cases of Hong Kong and Turkey. Tourism Management. 2007;28(1):253-61. [12] Lepp A, Gibson H, Lane C. Image and perceived risk: A study of Uganda and its official tourism website. Tourism Management. 2011;32(3):675-84. [13] Wong IA, Liu D, Li N, Wu S, Lu L, Law R. Foodstagramming in the travel encounter. Tourism Management. 2019;71:99-115. [14] Liu B, Norman WC, Backman SJ, Cuneo K, Condrasky M. Shoot, taste and post: An exploratory study of food and tourism experiences in an online image-share community. e-Review of Tourism Research. 2012;10(3). [15] Spence C, Okajima K, Cheok AD, Petit O, Michel C. Eating with our eyes: From visual hunger to digital satiation. Brain and Cognition. 2016;110:53-63. Food for thought: The functional and neural mechanisms of food perception and choice. [16] Kim H, Stepchenkova S. Effect of tourist photographs on attitudes towards destination: Manifest and latent content. Tourism Management. 2015;49:29-41. [17] Pan S, Lee J, Tsai H. Travel photos: Motivations, image dimensions, and affective qualities of places. Tourism Management. 2014;40:59-69. [18] Dinhopl A, Gretzel U. Selfie-taking as touristic looking. Annals of Tourism Research. 2016;57:126-39. [19] Chen Z, Chan ICC, Egger R. Gastronomic image in the foodstagrammer’s eyes – A machine learning approach. Tourism Management. 2023;99:104784. Available from: https://www.sciencedirect. com/science/article/pii/S0261517723000663. [20] Casales-Garcia V, Falomir Z, Museros L, Sanz I, Gonzalez-Abril L. A Study on How Food Colour May Determine the Categorization of a Dish: Predicting Meal Appeal from Colour Combinations. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems. 2022;30(Supp02):293-308. Available from: https://doi.org/10.1142/S0218488522400232. [21] Casales-Garcia V, Falomir Z, Museros L, Sanz I, Llido DM, Gonzalez-Abril L. Analysing Food-Porn Images for Users’ Engagement in the Food Business. Frontiers in Artificial Intelligence and Applications. 2022 10:67-70. Available from: https://ebooks.iospress.nl/doi/10.3233/FAIA220316. [22] Kobayashi S. Color image scale. Kosdansha International; 1991. [23] Park D, Lee J, Lee J, Lee K. Deep Learning based Food Instance Segmentation using Synthetic Data. In: 2021 18th International Conference on Ubiquitous Robots (UR); 2021. p. 499-505. [24] Sanh V, Debut L, Chaumond J, Wolf T. DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:191001108. 2019. V. Casales-Garcia et al. / Sentiment Analysis of Gastronomic Posts 319