The Morality Machine: Tracking Moral Values in Tweets

  • Livia TeernstraEmail author
  • Peter van der Putten
  • Liesbeth Noordegraaf-Eelens
  • Fons Verbeek
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9897)


This paper introduces The Morality Machine, a system that tracks ethical sentiment in Twitter discussions. Empirical approaches to ethics are rare, and to our knowledge this system is the first to take a machine learning approach. It is based on Moral Foundations Theory, a framework of moral values that are assumed to be universal. Carefully handcrafted keyword dictionaries for Moral Foundations Theory exist, but experiments demonstrate that models that do not leverage these have similar or superior performance, thus proving the value of a more pure machine learning approach.


Text classification Moral values Social technologies 


  1. 1.
    Adamic, L.A., Glance, N.: The political blogosphere and the 2004 US election: divided they blog. In: Proceedings of the 3rd International Workshop on Link Discovery, pp. 36–43. ACM (2005)Google Scholar
  2. 2.
    Agarwal, A., Xie, B., Vovsha, I., Rambow, O., Passonneau, R.: Sentiment analysis of Twitter data. In: Proceedings of the Workshop on Languages in Social Media, pp. 30–38. Association for Computational Linguistics (2011)Google Scholar
  3. 3.
    Bird, S., Klein, E., Loper, E.: Natural Language Processing with Python. O’Reilly Media, Sebastopol (2009)zbMATHGoogle Scholar
  4. 4.
    Bond, J.: It aint over till the fat lady sings. Sens-Public (2012).
  5. 5.
    Clifford, S., Jerit, J.: How words do the work of politics: moral foundations theory and the debate over stem cell research. J. Politics 75(03), 659–671 (2013)CrossRefGoogle Scholar
  6. 6.
    Dehghani, M., Sagae, K., Sachdeva, S., Gratch, J.: Linguistic analysis of the debate over the construction of the Ground Zero Mosque. J. Inform. Technol. Politics 11, 1–14 (2014)CrossRefGoogle Scholar
  7. 7.
    Freelon, D.: On the interpretation of digital trace data in communication and social computing research. J. Broadcast. Electron. Media 58(1), 59–75 (2014)CrossRefGoogle Scholar
  8. 8.
    Graham, J., Haidt, J., Koleva, S., Motyl, M., Iyer, R., Wojcik, S.P., Ditto, P.H.: Moral foundations theory: the pragmatic validity of moral pluralism. Adv. Exp. Soc. Psychol. 47, 55–130 (2013)CrossRefGoogle Scholar
  9. 9.
    Graham, J., Haidt, J., Nosek, B.A.: Liberals and conservatives rely on different sets of moral foundations. J. Pers. Soc. Psychol. 96(5), 1029 (2009)CrossRefGoogle Scholar
  10. 10.
    Grauwe, P.: The eurozone as a morality play. Intereconomics Rev. Eur. Econ. Policy 46(5), 230–231 (2011)CrossRefGoogle Scholar
  11. 11.
    Haidt, J.: The righteous mind: why good people are divided by politics and religion. Vintage, New York (2012)Google Scholar
  12. 12.
    Haidt, J., Joseph, C.: Intuitive ethics: how innately prepared intuitions generate culturally variable virtues. Daedalus 133(4), 55–66 (2004)CrossRefGoogle Scholar
  13. 13.
    Lazarou, A.: Greece: The many faces of Yanis Varoufakis. Green Left Weekly (104) (2015)Google Scholar
  14. 14.
    Lazer, D., Pentland, A.S., Adamic, L., Aral, S., Barabasi, A.L., Brewer, D., Christakis, N., Contractor, N., Fowler, J., Gutmann, M., et al.: Life in the network: the coming age of computational social science. Science 323(5915), 721 (2009). (New York, NY)CrossRefGoogle Scholar
  15. 15.
    Manning, C.D., Schütze, H.: Foundations of Statistical Natural Language Processing. MIT Press, Cambridge (1999)zbMATHGoogle Scholar
  16. 16.
    van der Putten, P., van Someren, M.: A bias-variance analysis of a real world learning problem: the CoIL Challenge 2000. Mach. Learn. 57(1), 177–195 (2004)CrossRefzbMATHGoogle Scholar
  17. 17.
    Ratkiewicz, J., Conover, M., Meiss, M., Gonçalves, B., Patil, S., Flammini, A., Menczer, F.: Truthy: mapping the spread of astroturf in microblog streams. In: Proceedings of the 20th International Conference Companion on World Wide Web, pp. 249–252. ACM (2011)Google Scholar
  18. 18.
    Sagi, E., Dehghani, M.: Measuring moral rhetoric in text. Soc. Sci. Comput. Rev. 32(2), 132–144 (2014)CrossRefGoogle Scholar
  19. 19.
    Saif, H., Fernández, M., Alani, H.: Automatic stopword generation using contextual semantics for sentiment analysis of Twitter. In: CEUR Workshop Proceedings, vol. 1272 (2014)Google Scholar
  20. 20.
    Suhler, C.L., Churchland, P.: Can innate, modular foundations explain morality? Challenges for Haidt’s moral foundations theory. J. Cogn. Neurosci. 9, 2103–2116 (2011)CrossRefGoogle Scholar
  21. 21.
    Taboada, M., Brooke, J., Tofiloski, M., Voll, K., Stede, M.: Lexicon-based methods for sentiment analysis. Comput. Linguist. 37(2), 267–307 (2011)CrossRefGoogle Scholar
  22. 22.
    Tumasjan, A., Sprenger, T.O., Sandner, P.G., Welpe, I.M.: Predicting elections with Twitter: what 140 characters reveal about political sentiment. ICWSM 10, 178–185 (2010)Google Scholar

Copyright information

© Springer International Publishing AG 2016

Authors and Affiliations

  • Livia Teernstra
    • 1
    • 2
    Email author
  • Peter van der Putten
    • 1
  • Liesbeth Noordegraaf-Eelens
    • 2
  • Fons Verbeek
    • 1
  1. 1.Media TechnologyLeiden UniversityLeidenThe Netherlands
  2. 2.Faculty of Social ScienceErasmus University RotterdamRotterdamThe Netherlands

Personalised recommendations