Pun Generation with Surprise

Size: px
Start display at page:

Download "Pun Generation with Surprise"

Transcription

1 Pun Generation with Surprise He He 1 and Nanyun Peng 2 and Percy Liang 1 1 Computer Science Department, Stanford University 2 Information Sciences Institute, University of Southern California {hehe,pliang}@cs.stanford.edu, npeng@isi.edu Abstract We tackle the problem of generating a pun sentence given a pair of homophones (e.g., died and dyed ). Supervised text generation is inappropriate due to the lack of a large corpus of puns, and even if such a corpus existed, mimicry is at odds with generating novel content. In this paper, we propose an unsupervised approach to pun generation using a corpus of unhumorous text and what we call the local-global surprisal principle: we posit that in a pun sentence, there is a strong association between the pun word (e.g., dyed ) and the distant context, as well as a strong association between the alternative word (e.g., died ) and the immediate context. This contrast creates surprise and thus humor. We instantiate this principle for pun generation in two ways: (i) as a measure based on the ratio of probabilities under a language model, and (ii) a retrieve-and-edit approach based on words suggested by a skip-gram model. Human evaluation shows that our retrieve-and-edit approach generates puns successfully 31% of the time, tripling the success rate of a neural generation baseline. 1 Introduction Generating creative content is a key requirement in many natural language generation tasks such as poetry generation (Manurung et al., 2000; Ghazvininejad et al., 2016), story generation (Meehan, 1977; Peng et al., 2018; Fan et al., 2018; Yao et al., 2019), and social chatbots (Weizenbaum, 1966; Hao et al., 2018). In this paper, we explore creative generation with a focus on puns. We follow the definition of puns in Aarons (2017); Miller et al. (2017): A pun is a form of wordplay in which one sign (e.g., a word or a phrase) suggests two or more meanings by exploiting polysemy, homonymy, or phonological Equal contribution. Yesterday I accidentally swallowed some food coloring. The doctor says I'm OK, but I feel like Local context I've dyed a little inside. Pun word: dyed. Global context Alternative word: died. Figure 1: An illustration of a homophonic pun. The pun word appears in the sentence, while the alternative word, which has the same pronunciation but different meaning, is implicated. The local context refers to the immediate words around the pun word, whereas the global context refers to the whole sentence. similarity to another sign, for an intended humorous or rhetorical effect. We focus on a typical class of puns where the ambiguity comes from two (near) homophones. Consider the example in Figure 1: Yesterday I accidentally swallowed some food coloring. The doctor says I m OK, but I feel like I ve dyed (died) a little inside.. The pun word shown in the sentence ( dyed ) indicates one interpretation: the person is colored inside by food coloring. On the other hand, an alternative word ( died ) is implied by the context for another interpretation: the person is sad due to the accident. Current approaches to text generation require lots of training data, but there is no large corpus of puns. Even such a corpus existed, learning the distribution of existing data and sampling from it is unlikely to lead to truly novel, creative sentences. Creative composition requires deviating from the norm, whereas standard generation approaches seek to mimic the norm. Recently, Yu et al. (2018) proposed an unsupervised approach that generates puns from a neural language model by jointly decoding conditioned on both the pun and the alternative words, thus injecting ambiguity to the output sentence. However, Kao et al. (2015) showed that ambiguity alone is insufficient to bring humor; the two mean-

2 ings must also be supported by distinct sets of words in the sentence. Inspired by Kao et al. (2015), we propose a general principle for puns which we call local-global surprisal principle. Our key observation is that the strength for the interpretation of the pun and the alternative words flips as one reads the sentence. For example, in Figure 1, died is favored by the immediate (local) context, whereas dyed is favored by the global context (i.e....food coloring... ). Our surprisal principle posits that the pun word is much more surprising in the local context than in the global context, while the opposite is true for the alternative word. We instantiate our local-global surprisal principle in two ways. First, we develop a quantitative metric for surprise based on the conditional probabilities of the pun word and the alternative word given local and global contexts under a neural language model. However, we find that this metric is not sufficient for generation. We then develop an unsupervised approach to generate puns based on a retrieve-and-edit framework (Guu et al., 2018; Hashimoto et al., 2018) given an unhumorous corpus (Figure 2). We call our system SURGEN (SURprisal-based pun GENeration). We test our approach on 150 pun-alternative word pairs. 1 First, we show a strong correlation between our surprisal metric and funniness ratings from crowdworkers. Second, human evaluation shows that our system generates puns successfully 31% of the time, compared to 9% of a neural generation baseline (Yu et al., 2018), and results in higher funniness scores. 2 Problem Statement We assume access to a large corpus of raw (unhumorous) text. Given a pun word w p (e.g., dyed ) and an alternative word w a (e.g., died ) which are (near) homophones, we aim to generate a list of pun sentences. A pun sentence contains only the pun word w p, but both w p and w a should be evoked by the sentence. 3 Approach 3.1 Surprise in Puns What makes a good pun sentence? Our key observation is that as a reader processes a sentence, he or she expects to see the alternative word at the 1 Our code and data are available at com/hhexiy/pungen. pun word position, and are tickled by the relation between the pun word and the rest of the sentence. Consider the following cloze test: Yesterday I accidentally swallowed some food coloring. The doctor says I m OK, but I feel like I ve a little inside.. Most people would expect the word in the blank to be died whereas the actual word is dyed. Locally, died a little inside is much more likely than dyed a little inside. However, globally when looking back at the whole sentence, dyed is evoked by food coloring. Formally, w p is more surprising relative to w a in the local context, but much less so in the global context. We hypothesize that this contrast between local and global surprisal creates humor. 3.2 A Local-Global Surprisal Measure Let us try to formalize the local-global surprisal principle quantitatively. To measure the amount of surprise due to seeing the pun word instead of the alternative word in a certain context c, we define surprisal S as the log-likelihood ratio of the two events: S(c) def = log p(wp c) p(w a c) = log p(wp, c) p(w a, c). (1) We define the local surprisal to only consider context of a span around the pun word, and the global surprisal to consider context of the whole sentence. Letting x 1,..., x n be a sequence of tokens, and x p be the pun word w p, we have S local def = S(x p d:p 1, x p+1:p+d ), (2) S global def = S(x 1:p 1, x p+1:n ), (3) where d is the local window size. For puns, both the local and global surprisal should be positive because they are unusual sentences by nature. However, the global surprisal should be lower than the local surprisal due to topic words hinting at the pun word. We use the following unified metric, local-global surprisal, to quantify whether a sentence is a pun: S ratio def = { 1 S local < 0 or S global < 0, S local /S global otherwise. (4) We hypothesize that larger S ratio is indicative of a good pun. Note that this hypothesis is invalid when either S local or S global is negative, in which case we consider the sentences equally unfunny by setting S ratio to 1.

3 w p = hare w a = hair Retrieve using hair the man stopped to get a hair cut. Swap hair hare the man stopped to get a hare cut. Insert topic man greyhound the greyhound stopped to get a hare cut. Figure 2: Overview of our pun generation approach. Given a pair of pun/alternative word, we first retrieve sentences containing w a from a generic corpus. Next, w a is replaced by w p to increase local surprisal. Lastly, we insert a topic word at the beginning of the sentence to create global associations supporting w p and decrease global surprisal. 3.3 Generating Puns The surprisal metric above can be used to assess whether a sentence is a pun, but to generate puns, we need a procedure that can ensure grammaticality. Recall that the surprisal principle requires (1) a strong association between the alternative word and the local context; (2) a strong association between the pun word and the distant context; and (3) both words should be interpretable given local and global context to maintain ambiguity. Our strategy is to model puns as deviations from normality. Specifically, we mine seed sentences (sentences with the potential to be transformed into puns) from a large, generic corpus, and edit them to satisfy the three requirements above. Figure 2 gives an overview of our approach. Suppose we are generating a pun given w p = hare and w a = hair. To reinforce w a = hair in the local context despite the appearance of hare, we retrieve sentences containing hair and replace occurrences of it with hare. Here, the local context strongly favors the alternative word ( hair cut ) relative to the pun word ( hare cut ). Next, to make the pun word hare more plausible, we insert a hare -related topic word ( greyhound ) near the beginning of the sentence. In summary, we create local surprisal by putting w p in common contexts for w a, and connect w p to a distant topic word by substitution. We describe each step in detail below. Local surprisal. The first step is to retrieve sentences containing w a. A typical pattern of pun sentences is that the pun word only occurs once towards the end of the sentence, which separates local context from pun-related topics at the beginning. Therefore, we retrieve sentences containing exactly one w a and rank them by the position of w a in the sentence (later is better). Next, we replace w a in the retrieved sentence with w p. The pun word usually fits in the context as it often has the same part-of-speech tag as the alternative word. Thus the swap creates local surprisal by putting the pun word in an unusual but acceptable context. We call this step RETRIEVE+SWAP, and use it as a baseline to generate puns. Global surprisal. While the pun word is locally unexpected, we need to foreshadow it. This global association must not be too strong that it eliminates the ambiguity. Therefore, we include a single topic word related to the pun word by replacing one word at the beginning of the seed sentence. We see this simple structure in many human-written puns as well. For example, Old butchers never die, they only meat their fate., where pun words and their corresponding topic words are underlined. We define relatedness between two words w i and w j based on a distant skip-gram model p θ (w j w i ), where we train p θ to maximize p θ (w j w i ) for all w i, w j in the same sentence between d 1 to d 2 words apart. Formally: i d 2 j=i d 1 log p θ (w j w i ) + i+d 2 j=i+d 1 log p θ (w j w i ). (5) We take the top-k predictions from p θ (w w p ), where w p is the pun word, as candidate topic words w to be further filtered next. Type consistent constraint. The replacement must maintain acceptability of the sentence. For example, changing person to ship in Each person must pay their fare share does not make sense even though ship and fare are related. Therefore, we restrict the deleted word in the seed sentence to nouns and pronouns, as verbs have more constraints on their arguments and replacing them is likely to result in unacceptable sentences. In addition, we select candidate topic words that are type-consistent with the deleted word, e.g., replacing person with passenger as opposed to

4 ship. We define type-consistency (for nouns) based on WordNet path similarity. 2 Given two words, we get their synsets from WordNet constrained by their POS tags. 3 If the path similarity between any pair of senses from the two respective synsets is larger than a threshold, we consider the two words type-consistent. In summary, the first noun or pronoun in the seed sentence is replaced by a type-consistent topic word. We call this baseline RETRIEVE+SWAP+TOPIC. Improve grammaticality. Directly replacing a word with the topic word may result in ungrammatical sentences, e.g., replacing i with negotiator and getting negotiator am just a woman trying to peace her life back together.. Therefore, we use a sequence-tosequence model to smooth the edited sentence (RETRIEVE+SWAP+TOPIC+SMOOTHER). We smooth the sentence by deleting words around the topic word and train a model to fill in the blank. The smoother is trained in a similar fashion to denoising autoencoders: we delete immediate neighbors of a word in a sentence, and ask the model to reconstruct the sentence by predicting missing neighbors. A training example is shown below: Original: Input: Output: the man slowly walked towards the woods. <i> man </i> walked towards the woods. the man slowly During training, the word to delete is selected in the same way as selecting the word to replace in a seed sentence, i.e. nouns or pronouns at the beginning of a sentence. At test time, the smoother is expected to fill in words to connect the topic word with the seed sentence in a grammatical way, e.g., the negotiator is just a woman trying to peace her life back together. (the part rewritten by the smoother is underlined). 4 Experiments We first evaluate how well our surprisal principle predicts the funniness of sentences perceived by humans (Section 4.2), and then compare our pun generation system and its varia- 2 Path similarity is a score between 0 and 1 that is inversely proportional to the shortest distance between two word senses in WordNet. 3 Pronouns are mapped to the synset person.n.01. tions with a simple retrieval baseline and a neural generation model (Yu et al., 2018) (Section 4.3). We show that the local-global surprisal scores strongly correlate with human ratings of funniness, and all of our systems outperform the baselines based on human evaluation. In particular, RETRIEVE+SWAP+TOPIC (henceforth SURGEN) achieves the highest success rate and average funniness score among all systems. 4.1 Datasets We use the pun dataset from 2017 SemEval task7 (Doogan et al., 2017). The dataset contains 1099 human-written puns annotated with pun words and alternative words, from which we take 219 for development. We use BookCorpus (Zhu et al., 2015) as the generic corpus for retrieval and training various components of our system. 4.2 Analysis of the Surprisal Principle We evaluate the surprisal principle by analyzing how well the local-global surprisal score (Equation (4)) predicts funniness rated by humans. We first give a brief overview of previous computational accounts of humor, and then analyze the correlation between each metric and human ratings. Prior funniness metrics. Kao et al. (2015) proposed two information-theoretic metrics: ambiguity of meanings and distinctiveness of supporting words. Ambiguity says that the sentence should support both the pun meaning and the alternative meaning. Distinctiveness further requires that the two meanings be supported by distinct sets of words. In contrast, our metric based on the surprisal principle imposes additional requirements. First, surprisal says that while both meanings are acceptable (indicating ambiguity), the pun meaning is unexpected based on the local context. Second, the local-global surprisal contrast requires the pun word to be well supported in the global context. Given the anomalous nature of puns, we also consider a metric for unusualness based on normalized log-probabilities under a language model (Pauls and Klein, 2012): ) Unusualness def = 1 n (p(x n log 1,..., x n )/ p(x i ). i=1 (6) Implementation details. Both ambiguity and distinctiveness are based on a generative model

5 Type Example SEMEVAL KAO Count Funniness Count Funniness Pun Yesterday a cow saved my life it was bovine intervention Swap-pun Yesterday a cow saved my life it was divine intervention Non-pun The workers are all involved in studying the spread of bovine TB Table 1: Dataset statistics and funniness ratings of SEMEVAL and KAO. Pun or alternative words are underlined in the example sentence. Each worker s ratings are standardized to z-scores. There is clear separation among the three types in terms of funniness, where pun > swap-pun > non-pun. Metric Pun and non-pun Pun and swap-pun Pun SEMEVAL KAO SEMEVAL SEMEVAL KAO Surprisal (S ratio) 0.46 p= p= p= p= p=0.37 Ambiguity 0.40 p= p= p= p= p=0.95 Distinctiveness p= p= p= p= p=0.00 Unusualness 0.37 p= p= p= p= p=0.18 Table 2: Spearman correlation between different metrics and human ratings of funniness. Statistically significant correlations with p-value < 0.05 are bolded. Our surprisal principle successfully differentiates puns from nonpuns and swap-puns. Distinctiveness is the only metric that correlates strongly with human ratings within puns. However, no single metric works well across different types of sentences. of puns. Each sentence has a latent variable z {w p, w a } corresponding to the pun meaning and the alternative meaning. Each word also has a latent meaning assignment variable f controlling whether it is generated from an unconditional unigram language model or a unigram model conditioned on z. Ambiguity is defined as the entropy of the posterior distribution over z given all the words, and distinctiveness is defined as the symmetrized KL-divergence between distributions of the assignment variables given the pun meaning and the alternative meaning respectively. The generative model relies on p(x i z), which Kao et al. (2015) estimates using human ratings of word relatedness. We instead use the skip-gram model described in Section 3.3 as we are interested in a fully-automated system. For local-global surprisal and unusualness, we estimate probabilities of text spans using a neural language model trained on WikiText-103 (Merity et al., 2016). 4 The local context window size (d in Equation (2)) is set to 2. Human ratings of funniness. Similar to Kao et al. (2015), to test whether a metric can differentiate puns from normal sentences, we collected ratings for both puns from the SemEval dataset and non-puns retrieved from the generic corpus containing either w p or w a. To test the importance of 4 fairseq/models/wiki103_fconv_lm.tar.bz2. surprisal, we also included swap-puns where w p is replaced by w a, which results in sentences that are ambiguous but not necessarily surprising. We collected all of our human ratings on Amazon Mechanical Turk (AMT). Workers are asked to answer the question How funny is this sentence? on a scale from 1 (not at all) to 7 (extremely). We obtained funniness ratings on 130 sentences from the development set with 33 puns, 33 swap-puns, and 64 non-puns. 48 workers each read roughly sentences in random order, counterbalanced for sentence types of non-puns, swap-puns, and puns. Each sentence is rated by 5 workers, and we removed 10 workers whose maximum Spearman correlation with other people rating the same sentence is lower than 0.2. The average Spearman correlation among all the remaining workers (which captures inter-annotator agreement) is 0.3. We z-scored the ratings of each worker for calibration and took the average z- scored ratings of a sentence as its funniness score. Table 1 shows the statistics of our annotated dataset (SEMEVAL) and Kao et al. (2015) s dataset (KAO). Note that the two datasets have different numbers and types of sentences, and the human ratings were collected separately. As expected, puns are funnier than both swap-puns and nonpuns. Swap-puns are funnier than non-puns, possibly because they have inherit ambiguity brought by the RETRIEVE+SWAP operation.

6 Automatic metrics of funniness. We analyze the following metrics: local-global surprisal (S ratio ), ambiguity, distinctiveness, and unusualness, with respect to their correlation with human ratings of funniness. For each metric, we standardized the scores and outliers beyond two standard deviations are set to +2 or 2 accordingly. 5 We then compute the metrics Spearman correlation with human ratings. On KAO, we directly took the ambiguity scores and distinctiveness scores from the original implementation which requires human-annotated word relatedness. 6 On SEMEVAL, we used our reimplemention of Kao et al. (2015) s algorithm but with the skip-gram model. The results are shown in Table 2. For puns and non-puns, all metrics correlate strongly with human scores, indicating all of them are useful for pun detection. For puns and swap-puns, only local-global surprisal (S ratio ) has strong correlation, which shows that surprisal is important for characterizing puns. Ambiguity and distinctiveness do not differentiate pun word from the alternative word, and unusualness only considers probability of the sentence with the pun word, thus they do not correlate as significantly as S ratio. Within puns, only distinctiveness has significant correlation, whereas the other metrics are not finegrained enough to differentiate good puns from mediocre ones. Overall, no single metric is robust enough to score funniness across all types of sentences, which makes it hard to generate puns by optimizing automatic metrics of funniness directly. There is slight inconsistency between results on SEMEVAL and KAO. Specifically, for puns and non-puns, the distinctiveness metric shows a significant correlation with human ratings on KAO but not on SEMEVAL. We hypothesize that it is mainly due to differences in the two corpora and noise from the skip-gram approximation. For example, our dataset contains longer sentences with an average length of 20 words versus 11 words for KAO. Further, Kao et al. (2015) used human annotation of word relatedness while we used the skipgram model to estimate p(x i z). 5 Since both S ratio and distinctiveness are unbounded, bounding the values gives more reliable correlation results. 6 Method Success Funniness Grammar NJD 9.2% R 4.6% R+S 27.0% R+S+T+M 28.8% SURGEN 31.4% Human 78.9% Table 3: Human evaluation results of all systems. We show average scores of funniness and grammaticality on a 1-5 scale and success rate computed from yes/no responses. We compare with two baselines: NEURALJOINTDECODER (NJD) and RETRIEVE (R). R+S, SURGEN, and R+S+T+M are three variations of our method: RETRIEVE+SWAP, RETRIEVE+SWAP+TOPIC, and RETRIEVE+SWAP+TOPIC+SMOOTHER, respectively. Overall, SURGEN performs the best across the board. 4.3 Pun Generation Results Systems. We compare with a recent neural pun generator (Yu et al., 2018). They proposed an unsupervised approach based on generic language models to generate homographic puns. 7 Their approach takes as input two senses of a target word (e.g., bat.n01, bat.n02 from WordNet synsets), and decodes from both senses jointly by taking a product of the probabilities conditioned on the two senses respectively (e.g., bat.n01 and bat.n02), so that both senses are reflected in the output. To ensure that the target word appears in the middle of a sentence, they decode backward from the target word towards the beginning and then decode forward to complete the sentence. We adapted their method to generate homophonic puns by considering w p and w a as two input senses and decoding from the pun word. We retrained their forward / backward language models on the same BookCorpus used for our system. For comparison, we chose their best model (NEURALJOINTDECODER), which mainly captures ambiguity in puns. In addition, we include a retrieval baseline (RETRIEVE) which simply retrieves sentences containing the pun word. For our systems, we include the entire progression of methods described in Section 3 (RETRIEVE+SWAP, RETRIEVE+SWAP+TOPIC, and RETRIEVE+SWAP+TOPIC+SMOOTHER). Implementation details. The key components of our systems include a retriever, a skip-gram 7 Sentences where the pun word and alternative word have the same written form (e.g., bat) but different senses.

7 Aspect SURGEN v.s. NJD SURGEN v.s. Human win % lose % win % lose % Success Funniness Grammar Table 4: Pairwise comparison between SURGEN and NEURALJOINTDECODER (NJD), and between SUR- GEN and human written puns. Win % (lose %) is the percentage among the human-rated 150 sentences where SURGEN achieves a higher (lower) average score compared to the other method. The rest are ties. model for topic word prediction, a type consistency checker, and a neural smoother. Given an alternative word, the retriever returned 500 candidates, among which we took the top 100 as seed sentences (Section 3.3 local surprisal). For topic words, we took the top 100 words predicted by the skip-gram model and filtered them to ensure type consistency with the deleted word (Section 3.3 global surprisal). The WordNet path similarity threshold for type consistency was set to 0.3. The skip-gram model was trained on BookCorpus with d 1 =5 and d 2 =10 in Equation (5). We set the word embedding size to 300 and trained for 15 epochs using Adam (Kingma and Ba, 2014) with a learning rate of For the neural smoother, we trained a single-layer LSTM (512 hidden units) sequence-to-sequence model with attention on BookCorpus. The model was trained for 50 epochs using AdaGrad (Duchi et al., 2010) with a learning rate of 0.01 and a dropout rate of 0.1. Human evaluation. We hired workers on AMT to rate outputs from all 5 systems together with expert-written puns from the SemEval pun dataset. Each worker was shown a group of sentences generated by all systems (randomly shuffled) given the same pun word and alternative word pair. Workers were asked to rate each sentence on three aspects: (1) success ( Is the sentence a pun? ), 8 (2) funniness ( How funny is the sentence? ), and (3) grammaticality ( How grammatical is the sentence? ). Success was rated as yes/no, and funniness and grammaticality were rated on a scale from 1 (not at all) to 5 (very). We also included a N/A choice (does not make sense) for funniness to exclude cases where the sentence are not understandable. Workers were explicitly instructed to try their best to give different scores for sentences 8 They were shown the definition from Miller et al. (2017). 6% A breakdown of error types 8% 28% 32% topic not fit topic-pun word not related fail to generate 14% 38% pun word not fit grammar error bad seed sentence Figure 3: Error case breakdown shows that the main issues lie in finding seed sentences that accommodates both the pun word and the topic word (topic not fit + pun word not fit + bad seed sentence). in the same group. We evaluated 150 pun/alternative word pairs. Each generated sentence was rated by 5 workers and their scores were averaged. N/A ratings were excluded unless all ratings of a sentence were N/A, in which case we set its score to 0. We attracted 65, 93, 66 workers for the success, funniness, and grammaticality surveys respectively, and removed 3, 4, 4 workers because their maximum Spearman correlation with other workers was lower than 0.2. We measure inter-annotator agreement using average Spearman correlation among all workers, and the average inter-annotator Spearman correlation for success, funniness, and grammaticality are 0.57, 0.36, and 0.32, respectively. Table 3 shows the overall results. All 3 of our systems outperform the baselines in terms of success rate and funniness. More edits (i.e. swapping, inserting topic words) made the sentence less grammatical, but also much more like puns (higher success rate). Interestingly, introducing the neural smoother did not improve grammaticality and hurt success rate slightly. Manual inspection shows that ungrammaticality is often caused by improper topic word, thus fixing its neighboring words does not truly solve the problem. For example, filling drum (related to lute ) in if that was it was likely that another body would turn up soon, because someone probably wouldn t want to share the lute.. In addition, when the neural model is given a rare topic word, it tends to rewrite it to a common phrase instead, again showing that supervised learning is against the spirit of generating novel content. For example, inserting gentlewoman to not allow me to... produces these people did not allow me to.... Overall, our

8 Method Example Rating 1. Pun/alternative word pair: butter better NJD He is going to come up with the butter a very good approach to the world s economic crisis, the 1 world s biggest economic climate. SURGEN Well, gourmet did it, he thought, it d butter be right. 2 Human Why did the dairy churn? The less said, the butter Pun/alternative word pair: peace piece NJD Further, he said, at the end of the peace, it s not clear that it will be a good example. 1 SURGEN That s because negotiator got my car back to me in one peace. 1.5 Human Life is a puzzle; look here for the missing peace Pun/alternative word pair: flour flower NJD Go, and if you are going on the flour. 1 SURGEN Butter want to know who these two girls are, the new members of the holy flour. 1.5 Human Betty crocker was a flour child Pun/alternative word pair: wait weight NJD Gordon Brown, Georgia s prime minister, said he did not have to wait, but he was not sure whether he 0 had been killed. SURGEN Even from the outside, I could tell that he d already lost some wait. 2 Human Patience is a virtue heavy in wait. 3 Table 5: Examples of generated puns with average human ratings of funniness (1-5). 0 means that all ratings are N/A (does not make sense). SURGEN performs the best and tripled the success rate of NEURALJOINTDECODER with improved funniness and grammaticality scores. Nevertheless, there is still a significant gap between generated puns and expert-written puns across all aspects, indicating that pun generation remains an open challenge. Table 4 shows the pairwise comparison results among our best model SURGEN, NEURALJOINT- DECODER, and expert-written puns. Given the outputs of two systems, we decided win/lose/tie by comparing the average scores of both outputs. We see that SURGEN dominates NEURALJOINT- DECODER with > 50% winning rate on funniness and grammaticality. On success rate, the two methods have many ties since they both have relatively low success rate. Our generated puns were rated funnier than expert-written puns around 10% of the time. 4.4 Error Analysis In Table 5, we show example outputs of our SUR- GEN, the NEURALJOINTDECODER baseline, and expert-written puns. SURGEN sometimes generates creative puns that are rated even funnier than human-written puns (example 1). In contrast, NEURALJOINTDECODER at best generates ambiguous sentences (example 2 and 3) and sometimes the sentences are ungrammatical (example 1) or hard to understand (example 4). The examples also show the current limitation of SURGEN. In example 3, it failed to realize that butter is not animate thus cannot want since our type consistency checker is very simple. To gain further insights on the limitation of our system, we randomly sampled 50 unsuccessful generations (labeled by workers) to analyze the issues. We characterized the issues into 6 non-exclusive categories: (1) weak association between the local context and w a (e.g.,...in the form of a batty (bat) ); (2) w p does not fit in the local context, often due to different POS tags of w a and w p (e.g., vibrate with a taxed (text) ); (3) the topic word is not related to w p (e.g., pagan vs fabrication ); (4) the topic word does not fit in its immediate context, often due to inconsistent types (e.g., slider won t go... ), (5) grammatical errors; and (6) fail to obtain seed sentences or topic words. A breakdown of these errors is shown in Figure 3. The main issues lie in finding seed sentences that accommodate both the pun word and the topic word. There is also room for improvement in predicting pun-related topic words. 5 Discussion and Related Work 5.1 Humor Theory Humor involves complex cognitive activities and many theories attempt to explain what might be considered humorous. Among the leading theories, the incongruity theory (Tony, 2004) is most related to our surprisal principle. The incongruity

9 theory posits that humor is perceived at the moment of resolving the incongruity between two concepts, often involving unexpected shifts in perspectives. Ginzburg et al. (2015) applied the incongruity theory to explain laughter in dialogues. Prior work (Kao et al., 2015) on formalizing incongruity theory for puns focuses on ambiguity between two concepts and the heterogeneity nature of the ambiguity. Our surprisal principle further formalizes unexpectedness (local surprisal) and incongruity resolution (global association). The surprisal principle is also related to studies in psycholinguistics on the relation between surprisal and human comprehension (Levy, 2013; Levy and Gibson, 2013). Our study suggests it could be a fruitful direction to formally study the relationship between human perception of surprisal and humor. 5.2 Humor generation Early approaches to joke generation (Binsted, 1996; Ritchie, 2005) largely rely on templates for specific types of puns. For example, JAPE (Binsted, 1996) generates noun phrase puns as question-answer pairs, e.g., What do you call a [murderer] with [fiber]? A [cereal] [killer]. Petrovic and Matthews (2013) fill in a joke template based on word similarity and uncommonness. Similar to our editing approach, Valitutti et al. (2013) substitutes a word with a taboo word based on form similarity and local coherence to generate adult jokes. Recently, Yu et al. (2018) generates puns from a generic neural language model by simultaneously conditioning on two meanings. Most of these approaches leverage some assumptions of joke structures, e.g., incongruity, relations between words, and word types. Our approach also relies on specific pun structures; we have proposed and operationalized a local-global surprisal principle for pun generation. 5.3 Creative text generation Our work is also built upon generic text generation techniques, in particular recent neural generation models. Hashimoto et al. (2018) developed a retrieve-and-edit approach to improve both grammaticality and diversity of the generated text. Shen et al. (2017); Fu et al. (2018) explored adversarial training to manipulate the style of a sentence. Our neural smoother is also closely related to Li et al. (2018) s delete-retrieve-edit approach to text style transfer. Creative generation is more challenging as it requires both formality (e.g., grammaticality, rhythm, and rhyme) and novelty. Therefore, many works (including us) impose strong constraints on the generative process, such as Petrovic and Matthews (2013); Valitutti et al. (2013) for joke generation, Ghazvininejad et al. (2016) for poetry generation, and Yao et al. (2019) for storytelling. 6 Conclusion In this paper, we tackled pun generation by developing and exploring a local-global surprisal principle. We show that a simple instantiation based on only a language model trained on non-humorous text is effective at detecting puns (though is not fine-grained enough to detect the degree of funniness within puns). To generate puns, we operationalize the surprisal principle with a retrieve-and-edit framework to create contrast in the amount of surprise in local and global contexts. While we improve beyond current techniques, we are still far from human-generated puns. While we believe the local-global surprisal principle is a useful conceptual tool, the principle itself is not quite yet formalized in a robust enough way that can be be used both as a principle for evaluating sentences and can be directly optimized to generate puns. A big challenge in humor, and more generally, creative text generation, is to capture the difference between creativity (novel but well-formed material) and nonsense (ill-formed material). Language models conflate the two, so developing methods that are nuanced enough to recognize this difference is key to future progress. Acknowledgments This work was supported by the DARPA CwC program under ISI prime contract no. W911NF and ARO prime contract no. W911NF We thank Abhinav Moudgil and Justine Kao for sharing their data and results. We also thank members of the Stanford NLP group and USC Plus Lab for insightful discussions. Reproduciblility All code, data, and experiments for this paper are available on the CodaLab platform: codalab.org/worksheets/ 0x5a7d0fe35b144ad68998d74891a31ed6.

10 References D. Aarons Puns and tacit linguistic knowledge. The Routledge Handbook of Language and Humor, Routledge, New York, NY, Routledge Handbooks in Linguistics. K. Binsted Machine Humour: An Implemented Model of Puns. Ph.D. thesis, University of Edinburgh. S. Doogan, A. Ghosh, H. Chen, and T. Veale Idiom savant at SemEval-2017 task 7: Detection and interpretation of English puns. In The 11th International Workshop on Semantic Evaluation. J. Duchi, E. Hazan, and Y. Singer Adaptive subgradient methods for online learning and stochastic optimization. In Conference on Learning Theory (COLT). A. Fan, M. Lewis, and Y. Dauphin Hierarchical neural story generation. arxiv preprint arxiv: Z. Fu, X. Tan, N. Peng, D. Zhao, and R. Yan Style transfer in text: Exploration and evaluation. In Association for the Advancement of Artificial Intelligence (AAAI). M. Ghazvininejad, X. Shi, Y. Choi, and K. Knight Generating topical poetry. In Empirical Methods in Natural Language Processing (EMNLP). J. Ginzburg, E. Breithholtz, R. Cooper, J. Hough, and Y. Tian Understanding laughter. In Proceedings of the 20th Amsterdam Colloquium. K. Guu, T. B. Hashimoto, Y. Oren, and P. Liang Generating sentences by editing prototypes. Transactions of the Association for Computational Linguistics (TACL), 0. F. Hao, C. Hao, S. Maarten, C. Elizabeth, H. Ari, C. Yejin, S. N. A, and O. Mari Sounding board: A user-centric and content-driven social chatbot. arxiv preprint arxiv: T. Hashimoto, K. Guu, Y. Oren, and P. Liang A retrieve-and-edit framework for predicting structured outputs. In Advances in Neural Information Processing Systems (NeurIPS). J. T. Kao, R. Levy, and N. D. Goodman A computational model of linguistic humor in puns. Cognitive Science. D. Kingma and J. Ba Adam: A method for stochastic optimization. arxiv preprint arxiv: R. Levy Memory and surprisal in human sentence comprehension. In Sentence Processing. R. Levy and E. Gibson Surprisal, the PDC, and the primary locus of processing difficulty in relative clauses. Frontiers in Psychology, 4. J. Li, R. Jia, H. He, and P. Liang Delete, retrieve, generate: A simple approach to sentiment and style transfer. In North American Association for Computational Linguistics (NAACL). H. Manurung, G. Ritchie, and H. Thompson Towards a computational model of poetry generation. The University of Edinburgh Technical Report. J. R. Meehan TALE-SPIN, an interactive program that writes stories. In International Joint Conference on Artificial Intelligence (IJCAI). S. Merity, C. Xiong, J. Bradbury, and R. Socher Pointer sentinel mixture models. arxiv preprint arxiv: T. Miller, C. Hempelmann, and I. Gurevych SemEval-2017 task 7: Detection and interpretation of English puns. In Proceedings of the 11th International Workshop on Semantic Evaluation. A. Pauls and D. Klein Large-scale syntactic language modeling with treelets. In Association for Computational Linguistics (ACL). N. Peng, M. Ghazvininejad, J. May, and K. Knight Towards controllable story generation. In NAACL Workshop. S. Petrovic and D. Matthews Unsupervised joke generation from big data. In Association for Computational Linguistics (ACL). G. Ritchie Computational mechanisms for pun generation. In the 10th European Natural Language Generation Workshop. T. Shen, T. Lei, R. Barzilay, and T. Jaakkola Style transfer from non-parallel text by crossalignment. In Advances in Neural Information Processing Systems (NeurIPS). V. Tony Incongruity in humor: Root cause or epiphenomenon? Humor: International Journal of Humor Research, 17. A. Valitutti, H. Toivonen, A. Doucet, and J. M. Toivanen let everything turn well in your wife: Generation of adult humor using lexical constraints. In Association for Computational Linguistics (ACL). J. Weizenbaum ELIZA a computer program for the study of natural language communication between man and machine. Communications of the ACM, 9(1): L. Yao, N. Peng, R. Weischedel, K. Knight, D. Zhao, and R. Yan Plan-and-write: Towards better automatic storytelling. In Association for the Advancement of Artificial Intelligence (AAAI). Z. Yu, J. Tan, and X. Wan A neural approach to pun generation. In Association for Computational Linguistics (ACL).

11 Y. Zhu, R. Kiros, R. Zemel, R. Salakhutdinov, R. Urtasun, A. Torralba, and S. Fidler Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. arxiv preprint arxiv:

UWaterloo at SemEval-2017 Task 7: Locating the Pun Using Syntactic Characteristics and Corpus-based Metrics

UWaterloo at SemEval-2017 Task 7: Locating the Pun Using Syntactic Characteristics and Corpus-based Metrics UWaterloo at SemEval-2017 Task 7: Locating the Pun Using Syntactic Characteristics and Corpus-based Metrics Olga Vechtomova University of Waterloo Waterloo, ON, Canada ovechtom@uwaterloo.ca Abstract The

More information

Idiom Savant at Semeval-2017 Task 7: Detection and Interpretation of English Puns

Idiom Savant at Semeval-2017 Task 7: Detection and Interpretation of English Puns Idiom Savant at Semeval-2017 Task 7: Detection and Interpretation of English Puns Samuel Doogan Aniruddha Ghosh Hanyang Chen Tony Veale Department of Computer Science and Informatics University College

More information

Let Everything Turn Well in Your Wife : Generation of Adult Humor Using Lexical Constraints

Let Everything Turn Well in Your Wife : Generation of Adult Humor Using Lexical Constraints Let Everything Turn Well in Your Wife : Generation of Adult Humor Using Lexical Constraints Alessandro Valitutti Department of Computer Science and HIIT University of Helsinki, Finland Antoine Doucet Normandy

More information

TJHSST Computer Systems Lab Senior Research Project Word Play Generation

TJHSST Computer Systems Lab Senior Research Project Word Play Generation TJHSST Computer Systems Lab Senior Research Project Word Play Generation 2009-2010 Vivaek Shivakumar April 9, 2010 Abstract Computational humor is a subfield of artificial intelligence focusing on computer

More information

Sarcasm Detection in Text: Design Document

Sarcasm Detection in Text: Design Document CSC 59866 Senior Design Project Specification Professor Jie Wei Wednesday, November 23, 2016 Sarcasm Detection in Text: Design Document Jesse Feinman, James Kasakyan, Jeff Stolzenberg 1 Table of contents

More information

An Introduction to Deep Image Aesthetics

An Introduction to Deep Image Aesthetics Seminar in Laboratory of Visual Intelligence and Pattern Analysis (VIPA) An Introduction to Deep Image Aesthetics Yongcheng Jing College of Computer Science and Technology Zhejiang University Zhenchuan

More information

Automatically Creating Word-Play Jokes in Japanese

Automatically Creating Word-Play Jokes in Japanese Automatically Creating Word-Play Jokes in Japanese Jonas SJÖBERGH Kenji ARAKI Graduate School of Information Science and Technology Hokkaido University We present a system for generating wordplay jokes

More information

Computational Laughing: Automatic Recognition of Humorous One-liners

Computational Laughing: Automatic Recognition of Humorous One-liners Computational Laughing: Automatic Recognition of Humorous One-liners Rada Mihalcea (rada@cs.unt.edu) Department of Computer Science, University of North Texas Denton, Texas, USA Carlo Strapparava (strappa@itc.it)

More information

Generating Chinese Classical Poems Based on Images

Generating Chinese Classical Poems Based on Images , March 14-16, 2018, Hong Kong Generating Chinese Classical Poems Based on Images Xiaoyu Wang, Xian Zhong, Lin Li 1 Abstract With the development of the artificial intelligence technology, Chinese classical

More information

HumorHawk at SemEval-2017 Task 6: Mixing Meaning and Sound for Humor Recognition

HumorHawk at SemEval-2017 Task 6: Mixing Meaning and Sound for Humor Recognition HumorHawk at SemEval-2017 Task 6: Mixing Meaning and Sound for Humor Recognition David Donahue, Alexey Romanov, Anna Rumshisky Dept. of Computer Science University of Massachusetts Lowell 198 Riverside

More information

Automatic Joke Generation: Learning Humor from Examples

Automatic Joke Generation: Learning Humor from Examples Automatic Joke Generation: Learning Humor from Examples Thomas Winters, Vincent Nys, and Daniel De Schreye KU Leuven, Belgium, info@thomaswinters.be, vincent.nys@cs.kuleuven.be, danny.deschreye@cs.kuleuven.be

More information

Humor in Collective Discourse: Unsupervised Funniness Detection in the New Yorker Cartoon Caption Contest

Humor in Collective Discourse: Unsupervised Funniness Detection in the New Yorker Cartoon Caption Contest Humor in Collective Discourse: Unsupervised Funniness Detection in the New Yorker Cartoon Caption Contest Dragomir Radev 1, Amanda Stent 2, Joel Tetreault 2, Aasish Pappu 2 Aikaterini Iliakopoulou 3, Agustin

More information

Singer Recognition and Modeling Singer Error

Singer Recognition and Modeling Singer Error Singer Recognition and Modeling Singer Error Johan Ismael Stanford University jismael@stanford.edu Nicholas McGee Stanford University ndmcgee@stanford.edu 1. Abstract We propose a system for recognizing

More information

Formalizing Irony with Doxastic Logic

Formalizing Irony with Doxastic Logic Formalizing Irony with Doxastic Logic WANG ZHONGQUAN National University of Singapore April 22, 2015 1 Introduction Verbal irony is a fundamental rhetoric device in human communication. It is often characterized

More information

Humor as Circuits in Semantic Networks

Humor as Circuits in Semantic Networks Humor as Circuits in Semantic Networks Igor Labutov Cornell University iil4@cornell.edu Hod Lipson Cornell University hod.lipson@cornell.edu Abstract This work presents a first step to a general implementation

More information

Detecting Musical Key with Supervised Learning

Detecting Musical Key with Supervised Learning Detecting Musical Key with Supervised Learning Robert Mahieu Department of Electrical Engineering Stanford University rmahieu@stanford.edu Abstract This paper proposes and tests performance of two different

More information

Comparison, Categorization, and Metaphor Comprehension

Comparison, Categorization, and Metaphor Comprehension Comparison, Categorization, and Metaphor Comprehension Bahriye Selin Gokcesu (bgokcesu@hsc.edu) Department of Psychology, 1 College Rd. Hampden Sydney, VA, 23948 Abstract One of the prevailing questions

More information

Automatic Polyphonic Music Composition Using the EMILE and ABL Grammar Inductors *

Automatic Polyphonic Music Composition Using the EMILE and ABL Grammar Inductors * Automatic Polyphonic Music Composition Using the EMILE and ABL Grammar Inductors * David Ortega-Pacheco and Hiram Calvo Centro de Investigación en Computación, Instituto Politécnico Nacional, Av. Juan

More information

Music Performance Panel: NICI / MMM Position Statement

Music Performance Panel: NICI / MMM Position Statement Music Performance Panel: NICI / MMM Position Statement Peter Desain, Henkjan Honing and Renee Timmers Music, Mind, Machine Group NICI, University of Nijmegen mmm@nici.kun.nl, www.nici.kun.nl/mmm In this

More information

Acoustic Prosodic Features In Sarcastic Utterances

Acoustic Prosodic Features In Sarcastic Utterances Acoustic Prosodic Features In Sarcastic Utterances Introduction: The main goal of this study is to determine if sarcasm can be detected through the analysis of prosodic cues or acoustic features automatically.

More information

LSTM Neural Style Transfer in Music Using Computational Musicology

LSTM Neural Style Transfer in Music Using Computational Musicology LSTM Neural Style Transfer in Music Using Computational Musicology Jett Oristaglio Dartmouth College, June 4 2017 1. Introduction In the 2016 paper A Neural Algorithm of Artistic Style, Gatys et al. discovered

More information

Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues

Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues Kate Park katepark@stanford.edu Annie Hu anniehu@stanford.edu Natalie Muenster ncm000@stanford.edu Abstract We propose detecting

More information

A repetition-based framework for lyric alignment in popular songs

A repetition-based framework for lyric alignment in popular songs A repetition-based framework for lyric alignment in popular songs ABSTRACT LUONG Minh Thang and KAN Min Yen Department of Computer Science, School of Computing, National University of Singapore We examine

More information

Arts, Computers and Artificial Intelligence

Arts, Computers and Artificial Intelligence Arts, Computers and Artificial Intelligence Sol Neeman School of Technology Johnson and Wales University Providence, RI 02903 Abstract Science and art seem to belong to different cultures. Science and

More information

MELODIC AND RHYTHMIC CONTRASTS IN EMOTIONAL SPEECH AND MUSIC

MELODIC AND RHYTHMIC CONTRASTS IN EMOTIONAL SPEECH AND MUSIC MELODIC AND RHYTHMIC CONTRASTS IN EMOTIONAL SPEECH AND MUSIC Lena Quinto, William Forde Thompson, Felicity Louise Keating Psychology, Macquarie University, Australia lena.quinto@mq.edu.au Abstract Many

More information

Browsing News and Talk Video on a Consumer Electronics Platform Using Face Detection

Browsing News and Talk Video on a Consumer Electronics Platform Using Face Detection Browsing News and Talk Video on a Consumer Electronics Platform Using Face Detection Kadir A. Peker, Ajay Divakaran, Tom Lanning Mitsubishi Electric Research Laboratories, Cambridge, MA, USA {peker,ajayd,}@merl.com

More information

Jokes and the Linguistic Mind. Debra Aarons. New York, New York: Routledge Pp. xi +272.

Jokes and the Linguistic Mind. Debra Aarons. New York, New York: Routledge Pp. xi +272. Jokes and the Linguistic Mind. Debra Aarons. New York, New York: Routledge. 2012. Pp. xi +272. It is often said that understanding humor in a language is the highest sign of fluency. Comprehending de dicto

More information

A Layperson Introduction to the Quantum Approach to Humor. Liane Gabora and Samantha Thomson University of British Columbia. and

A Layperson Introduction to the Quantum Approach to Humor. Liane Gabora and Samantha Thomson University of British Columbia. and Reference: Gabora, L., Thomson, S., & Kitto, K. (in press). A layperson introduction to the quantum approach to humor. In W. Ruch (Ed.) Humor: Transdisciplinary approaches. Bogotá Colombia: Universidad

More information

Homographic Puns Recognition Based on Latent Semantic Structures

Homographic Puns Recognition Based on Latent Semantic Structures Homographic Puns Recognition Based on Latent Semantic Structures Yufeng Diao 1,2, Liang Yang 1, Dongyu Zhang 1, Linhong Xu 3, Xiaochao Fan 1, Di Wu 1, Hongfei Lin 1, * 1 Dalian University of Technology,

More information

Music Composition with RNN

Music Composition with RNN Music Composition with RNN Jason Wang Department of Statistics Stanford University zwang01@stanford.edu Abstract Music composition is an interesting problem that tests the creativity capacities of artificial

More information

DAT335 Music Perception and Cognition Cogswell Polytechnical College Spring Week 6 Class Notes

DAT335 Music Perception and Cognition Cogswell Polytechnical College Spring Week 6 Class Notes DAT335 Music Perception and Cognition Cogswell Polytechnical College Spring 2009 Week 6 Class Notes Pitch Perception Introduction Pitch may be described as that attribute of auditory sensation in terms

More information

Generating Original Jokes

Generating Original Jokes SANTA CLARA UNIVERSITY COEN 296 NATURAL LANGUAGE PROCESSING TERM PROJECT Generating Original Jokes Author Ting-yu YEH Nicholas FONG Nathan KERR Brian COX Supervisor Dr. Ming-Hwa WANG March 20, 2018 1 CONTENTS

More information

BIBLIOMETRIC REPORT. Bibliometric analysis of Mälardalen University. Final Report - updated. April 28 th, 2014

BIBLIOMETRIC REPORT. Bibliometric analysis of Mälardalen University. Final Report - updated. April 28 th, 2014 BIBLIOMETRIC REPORT Bibliometric analysis of Mälardalen University Final Report - updated April 28 th, 2014 Bibliometric analysis of Mälardalen University Report for Mälardalen University Per Nyström PhD,

More information

A Discriminative Approach to Topic-based Citation Recommendation

A Discriminative Approach to Topic-based Citation Recommendation A Discriminative Approach to Topic-based Citation Recommendation Jie Tang and Jing Zhang Department of Computer Science and Technology, Tsinghua University, Beijing, 100084. China jietang@tsinghua.edu.cn,zhangjing@keg.cs.tsinghua.edu.cn

More information

Improvised Duet Interaction: Learning Improvisation Techniques for Automatic Accompaniment

Improvised Duet Interaction: Learning Improvisation Techniques for Automatic Accompaniment Improvised Duet Interaction: Learning Improvisation Techniques for Automatic Accompaniment Gus G. Xia Dartmouth College Neukom Institute Hanover, NH, USA gxia@dartmouth.edu Roger B. Dannenberg Carnegie

More information

Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues

Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues Laughbot: Detecting Humor in Spoken Language with Language and Audio Cues Kate Park, Annie Hu, Natalie Muenster Email: katepark@stanford.edu, anniehu@stanford.edu, ncm000@stanford.edu Abstract We propose

More information

PERCEPTUAL QUALITY OF H.264/AVC DEBLOCKING FILTER

PERCEPTUAL QUALITY OF H.264/AVC DEBLOCKING FILTER PERCEPTUAL QUALITY OF H./AVC DEBLOCKING FILTER Y. Zhong, I. Richardson, A. Miller and Y. Zhao School of Enginnering, The Robert Gordon University, Schoolhill, Aberdeen, AB1 1FR, UK Phone: + 1, Fax: + 1,

More information

A Framework for Segmentation of Interview Videos

A Framework for Segmentation of Interview Videos A Framework for Segmentation of Interview Videos Omar Javed, Sohaib Khan, Zeeshan Rasheed, Mubarak Shah Computer Vision Lab School of Electrical Engineering and Computer Science University of Central Florida

More information

Neural evidence for a single lexicogrammatical processing system. Jennifer Hughes

Neural evidence for a single lexicogrammatical processing system. Jennifer Hughes Neural evidence for a single lexicogrammatical processing system Jennifer Hughes j.j.hughes@lancaster.ac.uk Background Approaches to collocation Background Association measures Background EEG, ERPs, and

More information

Universität Bamberg Angewandte Informatik. Seminar KI: gestern, heute, morgen. We are Humor Beings. Understanding and Predicting visual Humor

Universität Bamberg Angewandte Informatik. Seminar KI: gestern, heute, morgen. We are Humor Beings. Understanding and Predicting visual Humor Universität Bamberg Angewandte Informatik Seminar KI: gestern, heute, morgen We are Humor Beings. Understanding and Predicting visual Humor by Daniel Tremmel 18. Februar 2017 advised by Professor Dr. Ute

More information

Figures in Scientific Open Access Publications

Figures in Scientific Open Access Publications Figures in Scientific Open Access Publications Lucia Sohmen 2[0000 0002 2593 8754], Jean Charbonnier 1[0000 0001 6489 7687], Ina Blümel 1,2[0000 0002 3075 7640], Christian Wartena 1[0000 0001 5483 1529],

More information

Regression Model for Politeness Estimation Trained on Examples

Regression Model for Politeness Estimation Trained on Examples Regression Model for Politeness Estimation Trained on Examples Mikhail Alexandrov 1, Natalia Ponomareva 2, Xavier Blanco 1 1 Universidad Autonoma de Barcelona, Spain 2 University of Wolverhampton, UK Email:

More information

arxiv: v1 [cs.lg] 15 Jun 2016

arxiv: v1 [cs.lg] 15 Jun 2016 Deep Learning for Music arxiv:1606.04930v1 [cs.lg] 15 Jun 2016 Allen Huang Department of Management Science and Engineering Stanford University allenh@cs.stanford.edu Abstract Raymond Wu Department of

More information

Large scale Visual Sentiment Ontology and Detectors Using Adjective Noun Pairs

Large scale Visual Sentiment Ontology and Detectors Using Adjective Noun Pairs Large scale Visual Sentiment Ontology and Detectors Using Adjective Noun Pairs Damian Borth 1,2, Rongrong Ji 1, Tao Chen 1, Thomas Breuel 2, Shih-Fu Chang 1 1 Columbia University, New York, USA 2 University

More information

BIBLIOGRAPHIC DATA: A DIFFERENT ANALYSIS PERSPECTIVE. Francesca De Battisti *, Silvia Salini

BIBLIOGRAPHIC DATA: A DIFFERENT ANALYSIS PERSPECTIVE. Francesca De Battisti *, Silvia Salini Electronic Journal of Applied Statistical Analysis EJASA (2012), Electron. J. App. Stat. Anal., Vol. 5, Issue 3, 353 359 e-issn 2070-5948, DOI 10.1285/i20705948v5n3p353 2012 Università del Salento http://siba-ese.unile.it/index.php/ejasa/index

More information

arxiv: v1 [cs.ir] 16 Jan 2019

arxiv: v1 [cs.ir] 16 Jan 2019 It s Only Words And Words Are All I Have Manash Pratim Barman 1, Kavish Dahekar 2, Abhinav Anshuman 3, and Amit Awekar 4 1 Indian Institute of Information Technology, Guwahati 2 SAP Labs, Bengaluru 3 Dell

More information

Affect-based Features for Humour Recognition

Affect-based Features for Humour Recognition Affect-based Features for Humour Recognition Antonio Reyes, Paolo Rosso and Davide Buscaldi Departamento de Sistemas Informáticos y Computación Natural Language Engineering Lab - ELiRF Universidad Politécnica

More information

Automatic Generation of Jokes in Hindi

Automatic Generation of Jokes in Hindi Automatic Generation of Jokes in Hindi by Srishti Aggarwal, Radhika Mamidi in ACL Student Research Workshop (SRW) (Association for Computational Linguistics) (ACL-2017) Vancouver, Canada Report No: IIIT/TR/2017/-1

More information

Where to present your results. V4 Seminars for Young Scientists on Publishing Techniques in the Field of Engineering Science

Where to present your results. V4 Seminars for Young Scientists on Publishing Techniques in the Field of Engineering Science Visegrad Grant No. 21730020 http://vinmes.eu/ V4 Seminars for Young Scientists on Publishing Techniques in the Field of Engineering Science Where to present your results Dr. Balázs Illés Budapest University

More information

AUDIOVISUAL COMMUNICATION

AUDIOVISUAL COMMUNICATION AUDIOVISUAL COMMUNICATION Laboratory Session: Recommendation ITU-T H.261 Fernando Pereira The objective of this lab session about Recommendation ITU-T H.261 is to get the students familiar with many aspects

More information

Riddle-building by rule

Riddle-building by rule Riddle-building by rule Graeme Ritchie University of Aberdeen (Based on work with Kim Binsted, Annalu Waller, Rolf Black, Dave O Mara, Helen Pain, Ruli Manurung, Judith Masthoff, Mukta Aphale, Feng Gao,

More information

Modeling memory for melodies

Modeling memory for melodies Modeling memory for melodies Daniel Müllensiefen 1 and Christian Hennig 2 1 Musikwissenschaftliches Institut, Universität Hamburg, 20354 Hamburg, Germany 2 Department of Statistical Science, University

More information

Acoustic and musical foundations of the speech/song illusion

Acoustic and musical foundations of the speech/song illusion Acoustic and musical foundations of the speech/song illusion Adam Tierney, *1 Aniruddh Patel #2, Mara Breen^3 * Department of Psychological Sciences, Birkbeck, University of London, United Kingdom # Department

More information

Humor recognition using deep learning

Humor recognition using deep learning Humor recognition using deep learning Peng-Yu Chen National Tsing Hua University Hsinchu, Taiwan pengyu@nlplab.cc Von-Wun Soo National Tsing Hua University Hsinchu, Taiwan soo@cs.nthu.edu.tw Abstract Humor

More information

Lecture 9 Source Separation

Lecture 9 Source Separation 10420CS 573100 音樂資訊檢索 Music Information Retrieval Lecture 9 Source Separation Yi-Hsuan Yang Ph.D. http://www.citi.sinica.edu.tw/pages/yang/ yang@citi.sinica.edu.tw Music & Audio Computing Lab, Research

More information

World Journal of Engineering Research and Technology WJERT

World Journal of Engineering Research and Technology WJERT wjert, 2018, Vol. 4, Issue 4, 218-224. Review Article ISSN 2454-695X Maheswari et al. WJERT www.wjert.org SJIF Impact Factor: 5.218 SARCASM DETECTION AND SURVEYING USER AFFECTATION S. Maheswari* 1 and

More information

A Fast Alignment Scheme for Automatic OCR Evaluation of Books

A Fast Alignment Scheme for Automatic OCR Evaluation of Books A Fast Alignment Scheme for Automatic OCR Evaluation of Books Ismet Zeki Yalniz, R. Manmatha Multimedia Indexing and Retrieval Group Dept. of Computer Science, University of Massachusetts Amherst, MA,

More information

What is music as a cognitive ability?

What is music as a cognitive ability? What is music as a cognitive ability? The musical intuitions, conscious and unconscious, of a listener who is experienced in a musical idiom. Ability to organize and make coherent the surface patterns

More information

Computational Models for Incongruity Detection in Humour

Computational Models for Incongruity Detection in Humour Computational Models for Incongruity Detection in Humour Rada Mihalcea 1,3, Carlo Strapparava 2, and Stephen Pulman 3 1 Computer Science Department, University of North Texas rada@cs.unt.edu 2 FBK-IRST

More information

The ACL Anthology Network Corpus. University of Michigan

The ACL Anthology Network Corpus. University of Michigan The ACL Anthology Corpus Dragomir R. Radev 1,2, Pradeep Muthukrishnan 1, Vahed Qazvinian 1 1 Department of Electrical Engineering and Computer Science 2 School of Information University of Michigan {radev,mpradeep,vahed}@umich.edu

More information

hit), and assume that longer incidental sounds (forest noise, water, wind noise) resemble a Gaussian noise distribution.

hit), and assume that longer incidental sounds (forest noise, water, wind noise) resemble a Gaussian noise distribution. CS 229 FINAL PROJECT A SOUNDHOUND FOR THE SOUNDS OF HOUNDS WEAKLY SUPERVISED MODELING OF ANIMAL SOUNDS ROBERT COLCORD, ETHAN GELLER, MATTHEW HORTON Abstract: We propose a hybrid approach to generating

More information

Retiming Sequential Circuits for Low Power

Retiming Sequential Circuits for Low Power Retiming Sequential Circuits for Low Power José Monteiro, Srinivas Devadas Department of EECS MIT, Cambridge, MA Abhijit Ghosh Mitsubishi Electric Research Laboratories Sunnyvale, CA Abstract Switching

More information

High accuracy citation extraction and named entity recognition for a heterogeneous corpus of academic papers

High accuracy citation extraction and named entity recognition for a heterogeneous corpus of academic papers High accuracy citation extraction and named entity recognition for a heterogeneous corpus of academic papers Brett Powley and Robert Dale Centre for Language Technology Macquarie University Sydney, NSW

More information

in the Howard County Public School System and Rocketship Education

in the Howard County Public School System and Rocketship Education Technical Appendix May 2016 DREAMBOX LEARNING ACHIEVEMENT GROWTH in the Howard County Public School System and Rocketship Education Abstract In this technical appendix, we present analyses of the relationship

More information

Chinese Word Sense Disambiguation with PageRank and HowNet

Chinese Word Sense Disambiguation with PageRank and HowNet Chinese Word Sense Disambiguation with PageRank and HowNet Jinghua Wang Beiing University of Posts and Telecommunications Beiing, China wh_smile@163.com Jianyi Liu Beiing University of Posts and Telecommunications

More information

Music Mood. Sheng Xu, Albert Peyton, Ryan Bhular

Music Mood. Sheng Xu, Albert Peyton, Ryan Bhular Music Mood Sheng Xu, Albert Peyton, Ryan Bhular What is Music Mood A psychological & musical topic Human emotions conveyed in music can be comprehended from two aspects: Lyrics Music Factors that affect

More information

Less is More: Picking Informative Frames for Video Captioning

Less is More: Picking Informative Frames for Video Captioning Less is More: Picking Informative Frames for Video Captioning ECCV 2018 Yangyu Chen 1, Shuhui Wang 2, Weigang Zhang 3 and Qingming Huang 1,2 1 University of Chinese Academy of Science, Beijing, 100049,

More information

VISUAL CONTENT BASED SEGMENTATION OF TALK & GAME SHOWS. O. Javed, S. Khan, Z. Rasheed, M.Shah. {ojaved, khan, zrasheed,

VISUAL CONTENT BASED SEGMENTATION OF TALK & GAME SHOWS. O. Javed, S. Khan, Z. Rasheed, M.Shah. {ojaved, khan, zrasheed, VISUAL CONTENT BASED SEGMENTATION OF TALK & GAME SHOWS O. Javed, S. Khan, Z. Rasheed, M.Shah {ojaved, khan, zrasheed, shah}@cs.ucf.edu Computer Vision Lab School of Electrical Engineering and Computer

More information

A STATISTICAL VIEW ON THE EXPRESSIVE TIMING OF PIANO ROLLED CHORDS

A STATISTICAL VIEW ON THE EXPRESSIVE TIMING OF PIANO ROLLED CHORDS A STATISTICAL VIEW ON THE EXPRESSIVE TIMING OF PIANO ROLLED CHORDS Mutian Fu 1 Guangyu Xia 2 Roger Dannenberg 2 Larry Wasserman 2 1 School of Music, Carnegie Mellon University, USA 2 School of Computer

More information

Understanding the Changing Roles of Scientific Publications via Citation Embeddings

Understanding the Changing Roles of Scientific Publications via Citation Embeddings Understanding the Changing Roles of Scientific Publications via Citation Embeddings Jiangen He Chaomei Chen {jiangen.he, chaomei.chen}@drexel.edu College of Computing and Informatics, Drexel University,

More information

Analysis and Clustering of Musical Compositions using Melody-based Features

Analysis and Clustering of Musical Compositions using Melody-based Features Analysis and Clustering of Musical Compositions using Melody-based Features Isaac Caswell Erika Ji December 13, 2013 Abstract This paper demonstrates that melodic structure fundamentally differentiates

More information

Music Similarity and Cover Song Identification: The Case of Jazz

Music Similarity and Cover Song Identification: The Case of Jazz Music Similarity and Cover Song Identification: The Case of Jazz Simon Dixon and Peter Foster s.e.dixon@qmul.ac.uk Centre for Digital Music School of Electronic Engineering and Computer Science Queen Mary

More information

The Encryption Theory of the Evolution of Humor: Honest Signaling for Homophilic Assortment

The Encryption Theory of the Evolution of Humor: Honest Signaling for Homophilic Assortment The Encryption Theory of the Evolution of Humor: Honest Signaling for Homophilic Assortment Thomas Flamson, Ph.D. UC Davis ~ Anthropology IBNeC / HBES Gramado, RS 2 September 2015 Variation & Assortment

More information

Supplemental Material: Color Compatibility From Large Datasets

Supplemental Material: Color Compatibility From Large Datasets Supplemental Material: Color Compatibility From Large Datasets Peter O Donovan, Aseem Agarwala, and Aaron Hertzmann Project URL: www.dgp.toronto.edu/ donovan/color/ 1 Unmixing color preferences In the

More information

Identifying Humor in Reviews using Background Text Sources

Identifying Humor in Reviews using Background Text Sources Identifying Humor in Reviews using Background Text Sources Alex Morales and ChengXiang Zhai Department of Computer Science University of Illinois, Urbana-Champaign amorale4@illinois.edu czhai@illinois.edu

More information

A computational approach to detection of conceptual incongruity in text and its applications

A computational approach to detection of conceptual incongruity in text and its applications A computational approach to detection of conceptual incongruity in text and its applications A DISSERTATION SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL OF THE UNIVERSITY OF MINNESOTA BY Amogh Mahapatra

More information

UC Merced Proceedings of the Annual Meeting of the Cognitive Science Society

UC Merced Proceedings of the Annual Meeting of the Cognitive Science Society UC Merced Proceedings of the Annual Meeting of the Cognitive Science Society Title Computationally Recognizing Wordplay in Jokes Permalink https://escholarship.org/uc/item/0v54b9jk Journal Proceedings

More information

Automatic Analysis of Musical Lyrics

Automatic Analysis of Musical Lyrics Merrimack College Merrimack ScholarWorks Honors Senior Capstone Projects Honors Program Spring 2018 Automatic Analysis of Musical Lyrics Joanna Gormley Merrimack College, gormleyjo@merrimack.edu Follow

More information

Information processing in high- and low-risk parents: What can we learn from EEG?

Information processing in high- and low-risk parents: What can we learn from EEG? Information processing in high- and low-risk parents: What can we learn from EEG? Social Information Processing What differentiates parents who abuse their children from parents who don t? Mandy M. Rabenhorst

More information

Using Variational Autoencoders to Learn Variations in Data

Using Variational Autoencoders to Learn Variations in Data Using Variational Autoencoders to Learn Variations in Data By Dr. Ethan M. Rudd and Cody Wild Often, we would like to be able to model probability distributions of high-dimensional data points that represent

More information

Make Me Laugh: Recommending Humoristic Content on the WWW

Make Me Laugh: Recommending Humoristic Content on the WWW S. Diefenbach, N. Henze & M. Pielot (Hrsg.): Mensch und Computer 2015 Tagungsband, Stuttgart: Oldenbourg Wissenschaftsverlag, 2015, S. 193-201. Make Me Laugh: Recommending Humoristic Content on the WWW

More information

Automatically Extracting Word Relationships as Templates for Pun Generation

Automatically Extracting Word Relationships as Templates for Pun Generation Automatically Extracting as s for Pun Generation Bryan Anthony Hong and Ethel Ong College of Computer Studies De La Salle University Manila, 1004 Philippines bashx5@yahoo.com, ethel.ong@delasalle.ph Abstract

More information

Sentiment Analysis. Andrea Esuli

Sentiment Analysis. Andrea Esuli Sentiment Analysis Andrea Esuli What is Sentiment Analysis? What is Sentiment Analysis? Sentiment analysis and opinion mining is the field of study that analyzes people s opinions, sentiments, evaluations,

More information

WordFinder. Verginica Barbu Mititelu RACAI / 13 Calea 13 Septembrie, Bucharest, Romania

WordFinder. Verginica Barbu Mititelu RACAI / 13 Calea 13 Septembrie, Bucharest, Romania WordFinder Catalin Mititelu Stefanini / 6A Dimitrie Pompei Bd, Bucharest, Romania catalinmititelu@yahoo.com Verginica Barbu Mititelu RACAI / 13 Calea 13 Septembrie, Bucharest, Romania vergi@racai.ro Abstract

More information

Audio Feature Extraction for Corpus Analysis

Audio Feature Extraction for Corpus Analysis Audio Feature Extraction for Corpus Analysis Anja Volk Sound and Music Technology 5 Dec 2017 1 Corpus analysis What is corpus analysis study a large corpus of music for gaining insights on general trends

More information

Computational Modelling of Harmony

Computational Modelling of Harmony Computational Modelling of Harmony Simon Dixon Centre for Digital Music, Queen Mary University of London, Mile End Rd, London E1 4NS, UK simon.dixon@elec.qmul.ac.uk http://www.elec.qmul.ac.uk/people/simond

More information

CPU Bach: An Automatic Chorale Harmonization System

CPU Bach: An Automatic Chorale Harmonization System CPU Bach: An Automatic Chorale Harmonization System Matt Hanlon mhanlon@fas Tim Ledlie ledlie@fas January 15, 2002 Abstract We present an automated system for the harmonization of fourpart chorales in

More information

Perceptual Coding: Hype or Hope?

Perceptual Coding: Hype or Hope? QoMEX 2016 Keynote Speech Perceptual Coding: Hype or Hope? June 6, 2016 C.-C. Jay Kuo University of Southern California 1 Is There Anything Left in Video Coding? First Asked in Late 90 s Background After

More information

Musical Creativity. Jukka Toivanen Introduction to Computational Creativity Dept. of Computer Science University of Helsinki

Musical Creativity. Jukka Toivanen Introduction to Computational Creativity Dept. of Computer Science University of Helsinki Musical Creativity Jukka Toivanen Introduction to Computational Creativity Dept. of Computer Science University of Helsinki Basic Terminology Melody = linear succession of musical tones that the listener

More information

Student Performance Q&A:

Student Performance Q&A: Student Performance Q&A: 2004 AP English Language & Composition Free-Response Questions The following comments on the 2004 free-response questions for AP English Language and Composition were written by

More information

NETFLIX MOVIE RATING ANALYSIS

NETFLIX MOVIE RATING ANALYSIS NETFLIX MOVIE RATING ANALYSIS Danny Dean EXECUTIVE SUMMARY Perhaps only a few us have wondered whether or not the number words in a movie s title could be linked to its success. You may question the relevance

More information

A combination of approaches to solve Task How Many Ratings? of the KDD CUP 2007

A combination of approaches to solve Task How Many Ratings? of the KDD CUP 2007 A combination of approaches to solve Tas How Many Ratings? of the KDD CUP 2007 Jorge Sueiras C/ Arequipa +34 9 382 45 54 orge.sueiras@neo-metrics.com Daniel Vélez C/ Arequipa +34 9 382 45 54 José Luis

More information

arxiv: v1 [cs.cl] 26 Jun 2015

arxiv: v1 [cs.cl] 26 Jun 2015 Humor in Collective Discourse: Unsupervised Funniness Detection in the New Yorker Cartoon Caption Contest arxiv:1506.08126v1 [cs.cl] 26 Jun 2015 Dragomir Radev 1, Amanda Stent 2, Joel Tetreault 2, Aasish

More information

Bi-Modal Music Emotion Recognition: Novel Lyrical Features and Dataset

Bi-Modal Music Emotion Recognition: Novel Lyrical Features and Dataset Bi-Modal Music Emotion Recognition: Novel Lyrical Features and Dataset Ricardo Malheiro, Renato Panda, Paulo Gomes, Rui Paiva CISUC Centre for Informatics and Systems of the University of Coimbra {rsmal,

More information

Analysis of local and global timing and pitch change in ordinary

Analysis of local and global timing and pitch change in ordinary Alma Mater Studiorum University of Bologna, August -6 6 Analysis of local and global timing and pitch change in ordinary melodies Roger Watt Dept. of Psychology, University of Stirling, Scotland r.j.watt@stirling.ac.uk

More information

Distortion Analysis Of Tamil Language Characters Recognition

Distortion Analysis Of Tamil Language Characters Recognition www.ijcsi.org 390 Distortion Analysis Of Tamil Language Characters Recognition Gowri.N 1, R. Bhaskaran 2, 1. T.B.A.K. College for Women, Kilakarai, 2. School Of Mathematics, Madurai Kamaraj University,

More information

A Computational Approach to Re-Interpretation: Generation of Emphatic Poems Inspired by Internet Blogs

A Computational Approach to Re-Interpretation: Generation of Emphatic Poems Inspired by Internet Blogs Modeling Changing Perspectives Reconceptualizing Sensorimotor Experiences: Papers from the 2014 AAAI Fall Symposium A Computational Approach to Re-Interpretation: Generation of Emphatic Poems Inspired

More information

Visual Argumentation in Commercials: the Tulip Test 1

Visual Argumentation in Commercials: the Tulip Test 1 Opus et Educatio Volume 4. Number 2. Hédi Virág CSORDÁS Gábor FORRAI Visual Argumentation in Commercials: the Tulip Test 1 Introduction Advertisements are a shared subject of inquiry for media theory and

More information

Probabilistic Grammars for Music

Probabilistic Grammars for Music Probabilistic Grammars for Music Rens Bod ILLC, University of Amsterdam Nieuwe Achtergracht 166, 1018 WV Amsterdam rens@science.uva.nl Abstract We investigate whether probabilistic parsing techniques from

More information

gresearch Focus Cognitive Sciences

gresearch Focus Cognitive Sciences Learning about Music Cognition by Asking MIR Questions Sebastian Stober August 12, 2016 CogMIR, New York City sstober@uni-potsdam.de http://www.uni-potsdam.de/mlcog/ MLC g Machine Learning in Cognitive

More information