Towards Generation and Recognition of Humorous Texts in P ortuguese (2023)

Abstract: Dealing with humor is an important step to develop Natural Language Processing tools capable of handling sophisticated semantic and pragmatic knowledge. In this context, this PhD thesis focuses on the automatic generation and recognition of verbal punning humor in Portuguese, which is still an underdeveloped language when compared to English. One of the main goals of this research is to conciliate Natural Language Generation computational models with existing theories of humor from the Humanities while avoiding mere generation by including contextual information into the generation process. Another point that is of utmost importance is the inclusion of the listener as an active part in the process of understanding and creating humor; we hope to achieve this by using concepts from Recommender Systems in our methods. Ultimately, we want to not only advance the current state-of-the-art in humor generation and recognition, but also to help the general Portuguese-speaking research community with methods, tools and resources that may aid in the development of further techniques for this language. We also expect our systems to provide insightful ideas about how humor is created and perceived by both humans and machines.

## introduction natural language processing (nlp) research tends toward even more complex types of linguistic phenomena, requiring systems that are capable to deal with sophisticated semantic and pragmatic information @xcite . to achieve such goals, it is essential to handle figurative and creative language @xcite , which humor is a part of. additionally, introducing the ability to recognize and create humor benefits general natural language-based systems, e.g. virtual agents, which can exploit such knowledge to make interaction with the user more pleasant and human-like, or news aggregators capable of dealing with satirical and comical articles. this phd thesis is also related to computational creativity (cc), a multidisciplinary field of research that is concerned with replicating, understanding and enhancing human creativity through computational tools @xcite ). 1 in language, this has to deal with artifacts such as poetry, literature, and, especially for us, verbal humor. we refer to this intersection between nlp and cc with a focus on humor as computational humor processing. although research on computational humor processing dates back to the 1990s @xcite , there is still much to advance on this area due to the complexity of the tasks involved. as mentioned by @xcite , the most successful systems for humor generation are based on predefined templates and rules, which is limiting in terms of linguistic realization. furthermore, @xcite mention that humor recognition can be improved by exploiting new features and models, as well as through the creation of larger corpora with humorous texts, especially for the portuguese language, the main focus of this proposal. within this context, this thesis proposes to tackle two main tasks related to computational humor processing: automatic recognition and generation of verbal humor, with a special focus on portuguese, which still receives less attention than other more researched languages, such as english or mandarin chinese @xcite . as verbal humor is a largely diverse phenomenon conveyed through many different ways, we decided to concentrate this research on a specific kind of humorous format: puns. this individ-ual type of wordplay has had a special attention of the community as it is considered to be a simpler instance of linguistic artifact capable of expressing funniness exploiting word ambiguity @xcite . nonetheless, this joke format still requires dealing with complex language information (e.g. common knowledge, semantic relations, linguistic realization, and surprise) which could be useful not only in humor processing, for instance systems that handle sarcasm, but also in other areas of nlp, such as natural language understanding or sentiment analysis. to this extent, our main research objectives are (i) to conciliate explicit theories from the humanities with sophisticated computational models to exploit their different advantages to the tasks in matter, (ii) to avoid mere generation by incorporating contextual information to the creation of humorous puns, and (iii) to include the role of the user into the generation and understanding of humor by modelling their sense of humor and creating a personalized experience. as expected, the developed methods will be evaluated in comparison to existing techniques from the literature, which will be adapted to the portuguese language if needed. after this introduction, the remainder of the paper is organized as follows: in section 2 we present in more detail the concepts, motivations, and general background for this project, followed by a discussion about punning humor in section 3. the research proposal alongside the intended methodologies are mentioned in section 4. finally, we include considerations about the limitations of the project and some ethical concerns that may rise from this research. ## background this project has two main fronts, humor recognition and humor generation, which are discussed in more detail below. ## punning humor as mentioned by @xcite , puns are a simpler instance of verbal humor based on phrase and word ambiguity, which makes them an ideal starting point for research on the area. this thought is shared by @xcite , who also mentions that puns are relevant due to their frequency in everyday live. even though they may be simpler and shorter, @xcite argues that punning jokes still require sophisticated models for doing meaningful research, as they contain all necessary elements to create a humorous effect, a sufficiently complex phenomenon by itself. therefore, research on this kind of humor can produce knowledge that might be generalizable to other types of humor or serve as a basis for investigating other humor-related phenomena. for those reasons, this project focuses exclusively on puns and punning jokes. our working definition for this kind of verbal humor is as follows: a pun is a form of wordplay in which one sign (e.g., a word or phrase) suggests two or more meanings by exploiting polysemy, homonymy, or phonological similarity to another sign, for an intended humorous or rhetorical effect. miller et al. (2017) from the definition, punning humor is created through a relation between form (spoken or written) and meaning, requiring that a sign must evoke multiple meanings in the given context. some examples of puns from @xcite with different characteristics are presented below; the punning word is highlighted in bold and the specific relation is between parentheses. it is important to stress that the pun relates to not only words but linguistic signs in general: word segments, phrases, acronyms, graphemes, onomatopoeias, and others, as illustrated by some of the examples provided by aleksandrova (2022). for the reasons mentioned, in this thesis, we will focus on puns and punning humor. with this, we hope to advance the current research on the computational processing of verbal humor in portuguese, as we will elaborate further in the next sections. ## research proposal the main objective of this thesis is to develop methods and resources for the computational recognition, analysis, and generation of verbal punning humor in portuguese. to this extent, we defined some specific goals to be reached throughout the development of the research work. to come to each objective, we defined some methodologies to be followed during the research, which will be discussed as follows.