Skip to main content
Log in

An attention network via pronunciation, lexicon and syntax for humor recognition

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

Humor is one of the most common and attractive expressions in our daily life. It is usually witty and funny. Humor recognition is an interesting but difficult task in natural language processing. Some recent works have used deep neural networks to recognize humorous text. In a different approach, we start from a new perspective based on humor linguistics, including pronunciation, lexicon, and syntax, for recognizing humor based on neural networks, in order to capture humorous incongruity and ambiguity. Specifically, we propose an attention network via pronunciation, lexicon, and syntax (ANPLS) for humor recognition. The ANPLS model contains four units, namely, the pronunciation understanding unit, the lexicon understanding unit, the syntax analysis unit, and the context understanding unit. The pronunciation understanding unit is used to extract the pronunciation-based humor features. The lexicon understanding unit is used to solve the polysemy in humor. The syntax analysis unit aims to capture the syntax information of humor. The context understanding unit is used to obtain the contextual humor features. These four units may have different levels of importance for humor recognition so that we further apply an attention mechanism to assign different weights to these four units. We conduct experiments on three popular datasets, namely, the SemEval2017 Task7 dataset, the 16000 One-Liners dataset, and the Pun of the Day dataset. The experimental results demonstrate that our model can achieve comparable or state-of-the-art performance compared with the existing models.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

Notes

  1. https://www.fing.edu.uy/inco/grupos/pln/haha/

  2. http://www.nltk.org/

  3. SemEval2017 Task7:http://alt.qcri.org/semeval2017/Task7/

  4. Pun of the Day: http://www.punoftheday.com/

  5. http://answers.yahoo.com/

  6. http://hosted.ap.org/dynamic/fronts/HOME?SITE=AP

References

  1. Anderson CA, Arnoult LH (1989) An examination of perceived control, humor, irrational beliefs, and positive stress as moderators of the relation between negative stress and health. Basic Appl Soc Psychol 10 (2):101–117

    Article  Google Scholar 

  2. Attardo S (2010) Linguistic theories of humor, vol 1. Walter de Gruyter, Berlin

    Google Scholar 

  3. Bertero D, Fung P (2016a) Deep learning of audio and language features for humor prediction. In: Proceedings of the tenth international conference on language resources and evaluation (LREC), vol 2016, pp 496–501

  4. Bertero D, Fung P (2016b) A long short-term memory framework for predicting humor in dialogues. In: Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics: Human language technologies, pp 130–135

  5. Bertero D, Fung P (2016c) Predicting humor response in dialogues from tv sitcoms. In: 2016 IEEE international conference on acoustics, speech and signal processing (ICASSP). IEEE, pp 5780–5784

  6. Blinov V, Bolotova-Baranova V, Braslavski P (2019) Large dataset and language model fun-tuning for humor recognition. In: Proceedings of the 57th annual meeting of the association for computational linguistics, association for computational linguistics, Florence, Italy, pp 4027–4032

  7. Bueno RO, Muñiz-Cuze CE, Medina-pagola JE, Rosso P (2018) Uo_upv: Deep linguistic humor detection in spanish social media. In: Proceedings of the third workshop on evaluation of human language technologies for iberian languages (IberEval 2018) co-located with 34th conference of the spanish society for natural language processing (SEPLN 2018), Sevilla, Spain, September 18th, 2018, CEUR-WS.org, CEUR Workshop Proceedings, vol 2150, pp 203–213

  8. Buscaldi D, Rosso P (2007) Some experiments in humour recognition using the italian wikiquote collection. In: International workshop on fuzzy logic and applications. Springer, pp 464–468

  9. Chen L, Lee CM (2017) Predicting audience’s laughter using convolutional neural network. arXiv:170202584

  10. Chen PY, Soo VW (2018) Humor recognition using deep learning. In: Proceedings of the 2018 conference of the north american chapter of the association for computational Linguistics: Human language technologies vol. 2 (Short Papers), pp 113– 117

  11. Devlin J, Chang MW, Lee K, Toutanova K (2019) Bert: Pre-training of deep bidirectional transformers for language understanding. In: NAACL-HLT

  12. Diao Y, Yang L, Zhang D, Xu L, Fan X, Wu D, Lin H (2017) Homographic puns recognition based on latent semantic structures. In: National CCF conference on natural language processing and chinese computing. Springer, pp 565–576

  13. Diao Y, Lin H, Wu D, Yang L, Xu K, Yang Z, Wang J, Zhang S, Xu B, Zhang D (2018) Weca: A wordnet-encoded collocation-attention network for homographic pun recognition. In: Proceedings of the 2018 conference on empirical methods in natural language processing, pp 2507–2516

  14. Diao Y, Lin H, Yang L, Fan X, Wu D, Zhang D, Xu K (2019) Heterographic pun recognition via pronunciation and spelling understanding gated attention network. In: The world wide web conference. ACM, pp 363–371

  15. Doogan S, Ghosh A, Chen H, Veale T (2017) Idiom savant at semeval-2017 task 7: Detection and interpretation of english puns. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 103–108

  16. Fan X, Lin H, Yang L, Diao Y, Shen C, Chu Y, Zhang T (2020a) Phonetics and ambiguity comprehension gated attention network for humor recognition. Complexity 2020:2509018:1–2509018:9

    Google Scholar 

  17. Fan X, Lin H, Yang L, Diao Y, Shen C, Chu y, Zou Y (2020b) Humor detection via an internal and external neural network. Neurocomputing

  18. Graves A, Jaitly N, Mohamed A (2013) Hybrid speech recognition with deep bidirectional lstm. In: 2013 IEEE workshop on automatic speech recognition and understanding. IEEE, pp 273–278

  19. Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Computation 9 (8):1735–1780

    Article  Google Scholar 

  20. Huang YH, Huang HH, Chen HH (2017) Identification of homographic pun location for pun understanding. In: Proceedings of the 26th International Conference on World Wide Web Companion, International World Wide Web Conferences Steering Committee, pp 797–798

  21. Indurthi V, Oota SR (2017) Fermi at semeval-2017 task 7: Detection and interpretation of homographic puns in english language. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 457–460

  22. Jaech A, Koncel-Kedziorski R, Ostendorf M (2016) Phonological pun-derstanding. In: Proceedings of the 2016 conference of the north american chapter of the association for computational linguistics, human language technologies, pp 654–663

  23. Kao JT, Levy R, Goodman ND (2016) A computational model of linguistic humor in puns. Cognitive Sci 40(5):1270–1285

    Article  Google Scholar 

  24. Liu F, Lu H, Lo C, Neubig G (2017) Learning character-level compositionality with visual features. In: Proceedings of the 55th annual meeting of the association for computational linguistics, vol 1, pp 2059–2068

  25. Liu L, Zhang D, Song W (2018a) Exploiting syntactic structures for humor recognition. In: Proceedings of the 27th international conference on computational linguistics, pp 1875–1883

  26. Liu L, Zhang D, Song W (2018b) Modeling sentiment association in discourse for humor recognition. In: Proceedings of the 56th annual meeting of the association for computational linguistics (Volume 2: Short Papers), pp 586–591

  27. Martineau WH (1972) A model of the social functions of humor. The psychology of humor: Theoretical perspectives and empirical issues, 101–125

  28. Mihalcea R, Strapparava C (2005) Making computers laugh: Investigations in automatic humor recognition. In: Proceedings of the conference on human language technology and empirical methods in natural language processing, association for computational linguistics, pp 531–538

  29. Miller T, Gurevych I (2015) Automatic disambiguation of english puns. In: Proceedings of the 53rd annual meeting of the association for computational linguistics and the 7th international joint conference on natural language processing (Volume 1: Long Papers), pp 719–729

  30. Miller T, Hempelmann C, Gurevych I (2017) Semeval-2017 task 7: Detection and interpretation of english puns. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 58–68

  31. de Oliveira L, Rodrigo AL (2017) Humor detection in yelp reviews. In: Proceedings of the 56th annual meeting of the association for computational linguistics (Volume 2: Short Papers)

  32. Pennington J, Socher R, Manning C (2014) Glove: Global vectors for word representation. In: Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp 1532–1543

  33. Pramanick A, Das D (2017) Ju cse nlp@ semeval 2017 task 7: Employing rules to detect and interpret english puns. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 432–435

  34. Purandare A, Litman D (2006) Humor: Prosody analysis and automatic recognition for f* r* i* e* n* d* s. In: Proceedings of the 2006 conference on empirical methods in natural language processing, Association for Computational Linguistics, pp 208–215

  35. Raz Y (2012) Automatic humor classification on twitter. In: Proceedings of the 2012 conference of the north american chapter of the association for computational linguistics: human language technologies, student research workshop, association for computational linguistics, pp 66–70

  36. Redfern W (1987) Puns. Scriblerian and the Kit-Cats 19(2):204

    Google Scholar 

  37. Reyes A, Buscaldi D, Rosso P (2009) An analysis of the impact of ambiguity on automatic humour recognition. In: International conference on text, speech and dialogue. Springer, pp 162–169

  38. Salvatore A (1994) Linguistic theories of humor. Berlin

  39. Sevgili Ö, Ghotbi N, Tekir S (2017) N-hance at semeval-2017 task 7: A computational approach using word association for puns. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 436–439

  40. Weller O, Seppi K (2019) Humor detection: A transformer gets the last laugh. In: Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP), Association for Computational Linguistics, Hong Kong, China, pp 3621–3625

  41. Weller O, Seppi K (2020) The rjokes dataset: a large scale humor collection. In: Proceedings of The 12th language resources and evaluation conference, pp 6136–6141

  42. Xiu Y, Lan M, Wu Y (2017) Ecnu at semeval-2017 task 7: Using supervised and unsupervised methods to detect and locate english puns. In: Proceedings of the 11th international workshop on semantic evaluation (SemEval-2017), pp 453–456

  43. Yang D, Lavie A, Dyer C, Hovy E (2015) Humor recognition and humor anchor extraction. In: Proceedings of the 2015 conference on empirical methods in natural language processing, pp 2367–2376

  44. Zhang X, Zhao J, LeCun Y (2015) Character-level convolutional networks for text classification. In: Advances in neural information processing systems, pp 649–657

  45. Zou Y, Lu W (2019) Joint detection and location of english puns. arXiv:190900175

Download references

Acknowledgements

This work is partially supported by grant from the Natural Science Foundation of China (No. 62076046, 61632011, 61772103, 62006034, 61876031), the Ministry of Education Humanities and Social Science Project (No.19YJCZH199), the Foundation of State Key Laboratory of Cognitive Intelligence, iFLYTEK, P.R. China (COGOS-20190001, Intelligent Medical Question Answering based on User Profiling and Knowledge Graph), and the Fundamental Research Funds for the Central Universities (No.DUT21RC(3)015).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hongfei Lin.

Ethics declarations

Conflict of Interests

The authors declare that they have no conflict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ren, L., Xu, B., Lin, H. et al. An attention network via pronunciation, lexicon and syntax for humor recognition. Appl Intell 52, 2690–2702 (2022). https://doi.org/10.1007/s10489-021-02580-3

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-021-02580-3

Keywords

Navigation