Sentiment analysis using a lexicon-based approach in Lisbon, Portugal
Abstract
Advances in digital sensors and Information flow have created an abundance of data generated by users under various emotional states in different situations. Although this opens up a new facet in spatial research, the large amount of data makes it difficult to analyze and obtain complete and comprehensive information leading to an increase in the demand for sentiment analysis. In this study, the Canadian National Research Council (NRC) of Sentiment and Emotion Lexicon (EmoLex) was used, based on data from the social network Twitter (now X), thus enabling the identification of the places in Lisbon where both positive and negative sentiment prevails. From the results obtained, the Portuguese are happy in spaces associated with leisure and consumption, such as museums, event venues, gardens, shopping centres, stores, and restaurants. The high score of words associated with negative sentiment have more bias, since the lexicon sometimes has difficulties to identify the context in which the word appears, ending up giving it a negative score (e.g., war, terminal).
References
- Addo-Tenkorang R, Helo PT. 2016. Big Data Applications in Operations/Supply-Chain Management. Comput Ind Eng. 101:528–43. DOI: https://doi.org/10.1016/j.cie.2016.09.023
- Aloufi S, Zhu S, El Saddik A. 2017. On the prediction of flickr image popularity by analyzing heterogeneous social sensory data. Sensors 17:631. DOI: https://doi.org/10.3390/s17030631
- Andrienko G, Andrienko N, Bak P, Kisilevich S, Keim D. 2009. Analysis of community-contributed space- and time-referenced data (example of flickr and panoramio photos). In: 2009 IEEE Symposium on Visual Analytics Science and Technology; p. 213–214. DOI: https://doi.org/10.1109/VAST.2009.5333472
- Balahur A, Mihalcea R, Montoyo A. 2014. Preface: Computational Approaches to Subjectivity and Sentiment Analysis: Present and Envisaged Methods and Applications. Comput Speech Lang 28:1–6. DOI: https://doi.org/10.1016/j.csl.2013.09.003
- Bollen J, Mao H, Zeng X. 2011. Twitter mood predicts the stock market . J Comput Sci 2:1–8. DOI: https://doi.org/10.1016/j.jocs.2010.12.007
- Cao X, Macnaughton P, Deng Z, Yin J, Zhang X, Allen JG. 2018. Using twitter to better understand the spatiotemporal patterns of public sentiment: A case study in Massachusetts, USA. Int J Environ Res Public Health 15:250. DOI: https://doi.org/10.3390/ijerph15020250
- Chani T, Olugbara O, Mutanga B. 2023. The Problem of Data Extraction in Social Media: A Theoretical Framework. J Inf Syst Informatics. 5:1363-84. DOI: https://doi.org/10.51519/journalisi.v5i4.585
- Díaz L, Granell C, Huerta J, Gould M. 2012. Web 2.0 Broker: A standards-based service for spatio-temporal search of crowd-sourced information. Appl Geogr 35:448–459. DOI: https://doi.org/10.1016/j.apgeog.2012.09.008
- Duwairi RM, Ahmed NA, Al-Rifai SY. 2015. Detecting Sentiment Embedded in Arabic Social Media – A Lexicon- based Approach. J Intell Fuzzy Syst 29:107–17. DOI: https://doi.org/10.3233/IFS-151574
- Ekman P. 1992. An argument for basic emotions. Cogn Emot 6:169–200. DOI: https://doi.org/10.1080/02699939208411068
- Encalada L, Ferreira CC, Boavida-Portugal I, Rocha J. 2019. Mining Big Data for Tourist Hot Spots: Geographical Patterns of Online Footprints. In: Koutsopoulos K, de Miguel González R, Donert K, editors. Geospatial Challenges in the 21st Century. Cham: Springer International Publishing. p. 99–123. DOI: https://doi.org/10.1007/978-3-030-04750-4_6
- Evans M, Mcintosh W, Cates CL, Lin J. 2005. Recounting the courts ? Toward A text-centered computational approach to understanding the dynamics of the judicial system Understanding the Dynamics of the Judicial System. In: 1st Annual Conference on Empirical Legal Studies Paper. p. 1–24. https://ssrn.com/abstract=914126.
- Giachanou A, Crestani F. 2016. Like It or Not: A Survey of Twitter Sentiment Analysis Methods. ACM Comput Surv 49:28. DOI: https://doi.org/10.1145/2938640
- Goodchild MF. 2007. Citizens as sensors: the world of volunteered geography. GeoJournal 69:211–21. DOI: https://doi.org/10.1007/s10708-007-9111-y
- Goodchild MF. 2013. The quality of big (geo)data. Dialogues Hum Geogr 3:280–4. DOI: https://doi.org/10.1177/2043820613513392
- Goodchild MF, Li L. 2012. Assuring the quality of volunteered geographic information. Spat Stat 1:110–20. DOI: https://doi.org/10.1016/j.spasta.2012.03.002
- Gordon SL. 1990. The sociology of sentiments and emotion. In: Turner R, editor. Social Psychology. Sociological Perspectives. 1st ed. New York: Routledge. p. 31.
- Instituto Nacional de Estatística (INE). 2019. Dormidas (N.o) nos estabelecimentos hoteleiros por Localização geográfica (NUTS - 2013) e Tipo (estabelecimento hoteleiro); Anual. Accessed 2024 Nov 8. Available from: https://www.ine.pt/xportal/xmain?xpid=INE&xpgid=ine_indicadores&indOcorrCod=0001542&contexto=bd&selTab=tab2&xlang=PT.
- Instituto Nacional de Estatística (INE). 2021. População residente (N.o) por Local de residência à data dos Censos [2021] (NUTS - 2024), Sexo, Grupo etário e Grupo socioeconómico; Decenal. Censos 2021. Accessed 2024 Nov 8. Available from: https://www.ine.pt/xportal/xmain?xpid=INE&xpgid=ine_indicadores&indOcorrCod=0012338&contexto=bd&selTab=tab2.
- Jockers M. 2023. Introduction to the Syuzhet Package. Accessed 2024 Nov 4. Available from: https://cran.r-project.org/web/packages/syuzhet/vignettes/syuzhet-vignette.html.
- Kaplan AM, Haenlein M. 2010. Users of the world, unite! The challenges and opportunities of Social Media. Bus Horiz 53:59–68. DOI: https://doi.org/10.1016/j.bushor.2009.09.003
- Kim S-M, Hovy E. 2004. Determining the Sentiment of Opinions. In: Proceedings of the 20th International Conference on Computational Linguistics. USA: Association for Computational Linguistics. (COLING ’04). p. 1367–es. DOI: https://doi.org/10.3115/1220355.1220555
- Lehrer A. 1974. Semantic fields and lexical structure. Amsterdam; New York: American Elsevier.
- Li S, Dragicevic S, Castro FA, Sester M, Winter S, Coltekin A, Pettit C, Jiang B, Haworth J, Stein A, et al. 2016. Geospatial big data handling theory and methods: A review and research challenges. ISPRS J Photogramm Remote Sens 115:119–133. DOI: https://doi.org/10.1016/j.isprsjprs.2015.10.012
- Lucini FR, Fogliatto FS, da Silveira GJC, Neyeloff JL, Anzanello MJ, Kuchenbecker RS, Schaan BD. 2017. Text mining approach to predict hospital admissions using early medical records from the emergency department. Int J Med Inform. 100:1–8. DOI: https://doi.org/10.1016/j.ijmedinf.2017.01.001
- Manyika J, Chui M, Brown B, Bughin J, Dobbs R, Roxburgh C, Byers AH. 2011. Big data: The next frontier for innovation, competition, and productivity. McKinsey Global Institute. Available from: https://www.mckinsey.com/~/media/mckinsey/business functions/mckinsey digital/our insights/big data the next frontier for innovation/mgi_big_data_full_report.pdf.
- Maynard D, Funk A. 2012. Automatic Detection of Political Opinions in Tweets. In: García-Castro R, Fensel D, Antoniou G, editors. The Semantic Web: ESWC 2011 Workshops. ESWC 2011. Lecture Notes in Computer Science. 7117th ed. Berlin, Heidelberg: Springer Berlin Heidelberg. p. 88–99. DOI: https://doi.org/10.1007/978-3-642-25953-1_8
- Medhat W, Hassan A, Korashy H. 2014. Sentiment analysis algorithms and applications: A survey. Ain Shams Eng J 5:1093–13. DOI: https://doi.org/10.1016/j.asej.2014.04.011
- Melville P, Gryc W, Lawrence RD. 2009. Sentiment Analysis of Blogs by Combining Lexical Knowledge with Text Classification. In: Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. New York, NY, USA: Association for Computing Machinery. (KDD ’09). p. 1275–1284. DOI: https://doi.org/10.1145/1557019.1557156
- Miller GA, Beckwith R, Fellbaum C, Gross D, Miller KJ. 1990. Introduction to WordNet: an on-line lexical database. Int J Lexicogr 3:235–44. DOI: https://doi.org/10.1093/ijl/3.4.235
- Mohammad SM, Dunne C, Dorr B. 2009. Generating high-coverage semantic orientation lexicons from overtly marked words and a thesaurus. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, pages 599–608, Singapore. Association for Computational Linguistics. Available from: https://aclanthology.org/D09-1063/ DOI: https://doi.org/10.3115/1699571.1699591
- Mohammad SM, Turney P. 2015. NRC Word-Emotion Association Lexicon (aka EmoLex). [accessed 2024 Nov 10]. Available from: https://saifmohammad.com/WebPages/NRC-Emotion-Lexicon.htm
- Mohammad SM, Turney PD. 2013a. NRC emotion lexicon. National Research Council of Canada.
- Mohammad SM, Turney PD. 2013b. Crowdsourcing a Word–Emotion Association Lexicon. Comput Intell 29:436–65. DOI: https://doi.org/10.1111/j.1467-8640.2012.00460.x
- Observatório Turismo de Lisboa. 2023. Inquérito às Atividades dos Turistas e Informação: Região de Lisboa. Lisboa, Portugal. Available from: https://www.visitlisboa.com/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBczlGIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--d574e17b78be04e610e08e8d23b1d65fe6d1f0fd/Inquérito às Atividades dos Turistas e Informação 2023.pdf?disposition=attach
- Palomino M, Taylor T, Göker A, Isaacs J, Warber S. 2016. The Online Dissemination of Nature–Health Concepts: Lessons from Sentiment Analysis of Social Media Relating to “Nature-Deficit Disorder.” Int J Environ Res Public Heal 13:142. DOI: https://doi.org/10.3390/ijerph13010142
- Pang B, Lee L. 2008. Opinion mining and sentiment analysis. Found Trends Inf Retr 2:1–135. DOI: https://doi.org/10.1561/1500000011
- Ramagopalan S, Wasiak R, Cox AP. 2014. Using Twitter to investigate opinions about multiple sclerosis treatments: a descriptive, exploratory study. F1000Research 3:216. DOI: https://doi.org/10.12688/f1000research.5263.1
- Read J, Carroll J. 2009. Weakly Supervised Techniques for Domain-Independent Sentiment Classification. In: Proceedings of the 1st International CIKM Workshop on Topic-Sentiment Analysis for Mass Opinion. New York, NY, USA: Association for Computing Machinery. (TSA ’09); p. 45–52. DOI: https://doi.org/10.1145/1651461.1651470
- Rodrigues N. 2023. Ruas e avenidas de Lisboa: a maior, a mais movimentada e a mais cara. Lisboa Secreta. Accessed 2024 Nov 10. Available from: https://lisboasecreta.co/ruas-de-lisboa/
- Salas-Zárate M del P, Medina-Moreira J, Lagos-Ortiz K, Luna-Aveiga H, Rodríguez-García MÁ, Valencia-García R. 2017. Sentiment analysis on tweets about diabetes: an aspect-level approach. Menasalvas E, editor. Comput Math Methods Med 2017:5140631. DOI: https://doi.org/10.1155/2017/5140631
- Shayaa S, Jaafar NI, Bahri S, Sulaiman A, Wai PS, Chung YW, Piprani AZ, Al-garadi MA. 2018. Sentiment Analysis of Big Data : Methods, Applications, and Open Challenges. IEEE Access 6:37807–27. DOI: https://doi.org/10.1109/ACCESS.2018.2851311
- Stets JE. 2003. Emotions and Sentiments. In: Delamater J, editor. Handbook of Social Psychology. In T. D. K. New York: Plenum Publishers. p. 309–335. DOI: https://doi.org/10.1007/0-387-36921-X_13
- Sui D, Goodchild M. 2011. The convergence of GIS and social media: challenges for GIScience. Int J Geogr Inf Sci 25:1737–48. DOI: https://doi.org/10.1080/13658816.2011.604636
- Sui D, Goodchild M, Elwood S. 2013. Volunteered Geographic Information, the Exaflood, and the Growing Digital Divide. In: Sui D, Elwood S, Goodchild M, editors. Crowdsourcing Geographic Knowledge: Volunteered Geographic Information (VGI) in Theory and Practice. Dordrecht: Springer Netherlands. p. 1–12. DOI: https://doi.org/10.1007/978-94-007-4587-2_1
- Sundmaeker H, Guillemin P, Friess P, Woelfflé S. 2010. Vision and Challenges for Realising the Internet of Things. Sundmaeker H, Guillemin P, Friess P, Woelfflé S, editors. Luxembourg: European Union.
- Taboada M, Brooke J, Tofiloski M, Voll K, Stede M. 2011. Lexicon-based methods for sentiment analysis. Comput Linguist 37:267–307. DOI: https://doi.org/10.1162/COLI_a_00049
- Thoits PA. 1990. Emotional deviance: Research agendas. In: Kemper TD, editor. Research agendas in the sociology of emotions. Albany, NY: State University of New York Press. p. 180–203.
- Turismo de Lisboa. 2019. Plano Estratégico de Turismo para a Região de Lisboa 2020-2024. Lisboa. Available from: https://www.ertlisboa.pt/fotos/editor2/planoestrategico20202024.pdf
- Turney PD. 2002. Thumbs Up or Thumbs Down? Semantic Orientation Applied to Unsupervised Classification of Reviews. In: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (ACL). Philadelphia. p. 417–424. DOI: https://doi.org/10.3115/1073083.1073153
- Turney PD, Littman ML. 2003. Measuring Praise and Criticism: Inference of Semantic Orientation from Association. ACM Trans Inf Syst 21:315–46. DOI: https://doi.org/10.1145/944012.944013
- Wang X, Jia J, Cai L, Tang J. 2014. Modeling Emotion Influence from Images in Social Networks. IEEE Trans Affect Comput 6:13. DOI: https://doi.org/10.1109/TAFFC.2015.2400917
- Zhang D, Si L, Rego VJ. 2012. Sentiment detection with auxiliary data. Inf Retr 15:373–90. DOI: https://doi.org/10.1007/s10791-012-9196-x
- Zhang L, Hall M, Bastola D. 2018. Utilizing Twitter data for analysis of chemotherapy. Int J Med Inform 120:92–100 DOI: https://doi.org/10.1016/j.ijmedinf.2018.10.002
- Zunic A, Corcoran P, Spasic I. 2020. Sentiment Analysis in Health and Well-Being: Systematic Review. JMIR Med Informatics 8:22. DOI: https://doi.org/10.2196/16023
Metrics
Citations and online attention from Dimensions, Altmetric and PlumX.
License
Copyright (c) 2025 the Author(s)

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
PAGEPress has chosen to apply the Creative Commons Attribution NonCommercial 4.0 International License (CC BY-NC 4.0) to all manuscripts to be published.