Skip to main content

Jokingbird: Funny Headline Generation for News

  • Conference paper
  • First Online:
Analysis of Images, Social Networks and Texts (AIST 2021)

Abstract

In this study, we address the problem of generating funny headlines for news articles. Funny headlines are beneficial even for serious news stories – they attract and entertain the reader. Automatically generated funny headlines can serve as prompts for news editors. More generally, humor generation can be applied to other domains, e.g. conversational systems. Like previous approaches, our methods are based on lexical substitutions. We consider two techniques for generating substitute words: one based on BERT and another based on collocation strength and semantic distance. At the final stage, a humor classifier chooses the funniest variant from the generated pool. An in-house evaluation of 200 generated headlines showed that the BERT-based model produces the funniest and in most cases grammatically correct output.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.theonion.com/.

  2. 2.

    https://components.one/datasets/above-the-fold/.

  3. 3.

    https://www.kaggle.com/snapcrack/all-the-news.

  4. 4.

    https://doi.org/10.7910/DVN/GMFCTR.

  5. 5.

    https://www.reddit.com/.

  6. 6.

    https://www.kaggle.com/abhinavmoudgil95/short-jokes.

  7. 7.

    http://www.statmt.org/wmt16/translation-task.html.

  8. 8.

    Both datasets are available from https://cs.rochester.edu/u/nhossain/funlines.html.

  9. 9.

    https://pypi.org/project/truecase/, based on [15].

  10. 10.

    https://spacy.io/.

  11. 11.

    PART, CCONJ, SCONJ, ADP, AUX, DET, PRON, PUNCT, or NUM.

  12. 12.

    https://github.com/bjascob/LemmInflect.

  13. 13.

    ‘Successful’ sentences are those, where at least one candidate word for replacement was found and at least one generated replacement passed the model’s restrictions on the predicted word.

  14. 14.

    When sampling the sentences, we discarded headlines containing words indicating sensitive topics like violence, death, and religion.

  15. 15.

    We used Cohen’s Kappa with linearly decreasing weights as implemented in Scikit-Learn [21] package.

  16. 16.

    https://toloka.ai/.

References

  1. Amin, M., Burghardt, M.: A survey on approaches to computational humor generation. In: Proceedings of the The 4th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature, pp. 29–41 (2020)

    Google Scholar 

  2. Annamoradnejad, I., Zoghi, G.: ColBERT: using BERT sentence embedding for humor detection. arXiv preprint arXiv:2004.12765 (2020)

  3. Attardo, S.: Linguistic Theories of Humor. Walter de Gruyter (1994)

    Google Scholar 

  4. Bird, S., Klein, E., Loper, E.: Natural Language Processing with Python: Analyzing Text with the Natural Language Toolkit. O’Reilly Media, Inc. (2009)

    Google Scholar 

  5. Blinov, V., Mishchenko, K., Bolotova, V., Braslavski, P.: A pinch of humor for short-text conversation: an information retrieval approach. In: International Conference of the Cross-Language Evaluation Forum for European Languages, pp. 3–15 (2017). https://doi.org/10.1007/978-3-319-65813-1_1

  6. Braslavski, P., Blinov, V., Bolotova, V., Pertsova, K.: How to evaluate humorous response generation, seriously? In: Proceedings of the 2018 Conference on Human Information Interaction & Retrieval, pp. 225–228 (2018)

    Google Scholar 

  7. Chen, P.Y., Soo, V.W.: 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, Volume 2 (Short Papers), pp. 113–117 (2018)

    Google Scholar 

  8. Church, K.W., Hanks, P.: Word association norms, mutual information, and lexicography. Comput. Linguist. 16(1), 22–29 (1990)

    Google Scholar 

  9. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186 (2019)

    Google Scholar 

  10. Fares, M., Kutuzov, A., Oepen, S., Velldal, E.: Word vectors, reuse, and replicability: Towards a community repository of large-text resources. In: Proceedings of the 21st Nordic Conference on Computational Linguistics, pp. 271–276 (2017)

    Google Scholar 

  11. He, H., Peng, N., Liang, P.: Pun generation with surprise. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 1734–1744 (2019)

    Google Scholar 

  12. Horvitz, Z., Do, N., Littman, M.L.: Context-driven satirical news generation. In: Proceedings of the Second Workshop on Figurative Language Processing, pp. 40–50 (2020)

    Google Scholar 

  13. Hossain, N., Krumm, J., Gamon, M.: President vows to cut \(<\)Taxes\(>\) hair: dataset and analysis of creative text editing for humorous headlines. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 133–142 (2019)

    Google Scholar 

  14. Hossain, N., Krumm, J., Sajed, T., Kautz, H.: Stimulating creativity with funlines: a case study of humor generation in headlines. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pp. 256–262 (2020)

    Google Scholar 

  15. Lita, L.V., Ittycheriah, A., Roukos, S., Kambhatla, N.: tRuEcasIng. In: Proceedings of the 41st Annual Meeting of the Association for Computational Linguistics, pp. 152–159 (2003)

    Google Scholar 

  16. Luo, F., Li, S., Yang, P., Chang, B., Sui, Z., Sun, X., et al.: Pun-GAN: generative adversarial network for pun generation. arXiv preprint arXiv:1910.10950 (2019)

  17. Mihalcea, R., Strapparava, C.: Making computers laugh: investigations in automatic humor recognition. In: Proceedings of the Conference on Human Language Technology and Empirical Methods in Natural Language Processing, pp. 531–538 (2005)

    Google Scholar 

  18. Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 (2013)

  19. Nagy, T.: Raising collocational awareness with humour. Acta Univ. Sapientiae Philologica 12(2), 99–113 (2020)

    Article  Google Scholar 

  20. Partington, A.: ‘Kicking the Habit’: the exploitation of collocation in literature and humour. Linguistic Approaches to Literature, English Language (1995)

    Google Scholar 

  21. Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011)

    MathSciNet  MATH  Google Scholar 

  22. Raskin, V.: Semantic Mechanisms of Humor (1985)

    Google Scholar 

  23. Sjöbergh, J., Araki, K.: A measure of funniness, applied to finding funny things in WordNet. In: Proceedings of the Conference of the Pacific Association for Computational Linguistics 2009, pp. 236–241 (2009)

    Google Scholar 

  24. Skalicky, S.: Lexical priming in humorous satirical newspaper headlines. Humor 31(4), 583–602 (2018)

    Article  Google Scholar 

  25. Stock, O., Strapparava, C.: HAHAcronym: a computational humor system. In: ACL (demo), pp. 113–116 (2005)

    Google Scholar 

  26. Valitutti, A., Toivonen, H., Doucet, A., Toivanen, J.M.: Let everything turn well in your wife: generation of adult humor using lexical constraints. In: Proceedings of the 51st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 243–248 (2013)

    Google Scholar 

  27. Weller, O., Fulda, N., Seppi, K.: Can humor prediction datasets be used for humor generation? humorous headline generation via style transfer. In: Proceedings of the Second Workshop on Figurative Language Processing, pp. 186–191 (2020)

    Google Scholar 

  28. Weller, O., Seppi, K.: Humor detection: a transformer gets the last laugh. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, pp. 3621–3625 (2019)

    Google Scholar 

  29. Winters, T., Nys, V., De Schreye, D.: Towards a general framework for humor generation from rated examples. In: Proceedings of the 10th International Conference on Computational Creativity, pp. 274–281 (2019)

    Google Scholar 

  30. Wolf, T., et al.: Transformers: state-of-the-art natural language processing. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pp. 38–45 (2020)

    Google Scholar 

  31. Yang, D., Lavie, A., Dyer, C., Hovy, E.: Humor recognition and humor anchor extraction. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 2367–2376 (2015)

    Google Scholar 

  32. Yu, Z., Tan, J., Wan, X.: A neural approach to pun generation. In: Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1650–1660 (2018)

    Google Scholar 

Download references

Acknowledgments

The described experiments were partly conducted using HPC facilities of the HSE University. We thank Daria Overnikova for useful comments and suggestions on a draft of this paper. Pavel Braslavski thanks Exactpro company (https://exactpro.com/) for supporting the project.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pavel Braslavski .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Login, N., Baranov, A., Braslavski, P. (2022). Jokingbird: Funny Headline Generation for News. In: Burnaev, E., et al. Analysis of Images, Social Networks and Texts. AIST 2021. Lecture Notes in Computer Science, vol 13217. Springer, Cham. https://doi.org/10.1007/978-3-031-16500-9_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-16500-9_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-16499-6

  • Online ISBN: 978-3-031-16500-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics