---
abstract: 'Crosstalk, also known by its Chinese name [*xiangsheng*]{}, is a traditional Chinese comedic performing art featuring jokes and funny dialogues, and one of China’s most popular cultural elements. It is typically in the form of a dialogue between two performers for the purpose of bringing laughter to the audience, with one person acting as the leading comedian and the other as the supporting role. Though general dialogue generation has been widely explored in previous studies, it is unknown whether such entertaining dialogues can be automatically generated or not. In this paper, we for the first time investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. Given the utterance of the leading comedian in each dialogue, our task aims to generate the replying utterance of the supporting role. We propose a humor-enhanced translation model to address this task and human evaluation results demonstrate the efficacy of our proposed model. The feasibility of automatic entertaining dialogue generation is also verified.'
author:
- |
    Shikang Du, Xiaojun Wan, Yajie Ye\
    Institute of Computer Science and Technology, The MOE Key Laboratory of Computational Linguistics\
    Peking University, Beijing 100871, China\
    {dusk, wanxiaojun, yeyajie}@pku.edu.cn\
bibliography:
- 'aaai18.bib'
title: Towards Automatic Generation of Entertaining Dialogues in Chinese Crosstalks
---

[UTF8]{}[gbsn]{}

Introduction
============

Crosstalk, also known by its Chinese name *相声/xiangsheng*, is a traditional Chinese comedic performing art, and one of China’s most popular cultural elements. It is typically in the form of a dialogue between two performers, but much less often can also be a monologue by a solo performer, or even less frequently, a group act by multiple performers. The crosstalk language, rich in puns and allusions, is delivered in a rapid, bantering style. The purpose of Xiangsheng is to bring laughter to the audience, and the crosstalk language features humorous dialogues [@link1979genie; @moser1990reflexivity; @terence2013china; @mackerras2013performing].

The language style of crosstalk is just like chatting or gossip, but is more funny and humorous, especially in crosstalks given by two performers. It would be an ideal resource for studying humor in dialogue system.

However, there are some special rules in crosstalks. For the crosstalk between two performers, one person acts as the leading comedian (or [*逗哏/dougen*]{} in Chinese) and the other as the supporting role (or [*捧哏/penggen*]{}). The two performers usually stand before an audience and deliver their lines in rapid fire by turn. They echo each other in the crosstalk performance. In each turn, the leading role usually tells stories and jokes, or does some sound imitation in his utterance, and the supporting role points out the humorous point in the leading role’s performance, or even adds fuel to the leading role’s performance, making it funnier. For example,

  -------- -------------------------------------------------
  **A**:   楚国大夫屈原，五月初五死的，我们
           应该永远怀念屈原。要是没有屈原，
           我们怎么能有这三天假期呢？
           The mid-autumn festival is in memory of Qu
           Yuan. We should keep him in mind forever,
           because his death brings us this 3-day holiday.
  **B**:   这个，代价大点儿。
           It costs him a lot (to have a holiday).
  **A**:   我觉得应该再多放几天假。
           I think it would be better with more holidays.
  **B**:   那得死多少人啊。
           How many people would die then!
  -------- -------------------------------------------------

In this example, B acts as the supporting role. His last response unexpectedly links the number of holiday with the number of people died, which makes the whole dialogue more funny. But in many cases, the supporting one acts as a go-between, gives positive response (such as “当然/Of course” or “这样/That’s why”) or negative response (such as “啊？/Ah?”), and sometimes repeats key points in the leading role’s utterance, making the narration given by the leading role go smoothly (e.g. A: 虽然道路崎岖，所幸还有蒙蒙月色/ Although the road is rough, the moonlight is bright. B:还能看见点/ We can still see things on the road.) In brief, the crosstalk between two performers can be considered a special and challenging dialogue form - the entertaining dialogue.

Though general dialogue generation has been widely explored and achieved great success in previous studies [@li-EtAl:2016:EMNLP20162; @sordoni-EtAl:2015:NAACL-HLT; @ritter2011data], it is unknown whether such entertaining dialogues can be automatically generated or not. If computers can generate entertaining dialogues well, the AI ability of computer will be further validated. The function of generating entertaining dialogues is also very useful in many interactive products, making them more appealing. In this study, we for the first time investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. Given the utterance of the leading comedian in each dialogue, our task aims to generate the replying words of the supporting role.

We propose a humor-enhanced translation model to address this special and challenging task, and the model explicitly leverages a sub-model to measure the humorous characteristic of a dialogue. Human evaluation results on a real Chinese crosstalk dataset demonstrate the efficacy of our proposed model, which can outperform several retrieval based and generation based baselines. The feasibility of automatic entertaining dialogue generation is also verified.

The contributions of this paper are summarized as follows:

1\) We are the first to investigate the new task of entertaining dialogue generation in Chinese crosstalks.

2\) We propose a humor-enhanced translation model to address this challenging task by making use of a sub-model to measure the humorous characteristic of a dialogue.

3\) Manual evaluation is performed to verify the efficacy of our proposed model and the feasibility of automatic entertaining dialogue generation.

In the rest of this paper, we will first describe the details of our proposed model and then present and discuss the evaluation results. After that, we introduce the related work. Lastly, we conclude this paper.

Our Generation Method
=====================

Given an utterance $\mathbf{s}$ of the leading role (i.e. *dougen*) in Chinese crosstalks, our task aims to generate the replying utterance $\mathbf{r}$ of the supporting role (i.e. [*penggen*]{}), which is called crosstalk response generation (CRG). The generated utterance needs to be fluent and related to the leading role’s utterance. Moreover, it is also expected that the generated utterance can make the dialogue more funny and entertaining.

As mentioned earlier, our task is a special form of dialogue generation. In recent years, there are many methods proposed for dialogue generation based on a large set of training data, including the deep learning methods (especially sequence-to-sequence models) [@li-EtAl:2016:EMNLP20162]. However, deep learning methods usually require a large training set to achieve good performance in dialogue generation tasks, which is hard to obtain for our task. So, we choose a more traditional but effective way based on machine translation to address the new task of crosstalk response generation.

*penggen* often gives comments on *dougen*’s utterance, sometimes *penggen* even retells the *dougen*’s words but in a more humorous way. We believe that the *dougen*’s response has some potential patterns according to the utterance given by *penggen*, and treat response generation as a monolingual translation problem, in which the given input (utterance given by *dougen*) is treated as the foreign language and the humorous response as the source language. Machine translation (MT) has already been successfully used in response generation [@ritter2011data], in which input post was seen as a sequence of words, and word or phrase based translation was made to generate another sequence of words as response. If we simply treat crosstalk response generation as a general dialogue generation problem, we can apply statistical machine translation (SMT) model [@koehn2003statistical] to generate responses accordingly, ignoring the entertaining characteristic of crosstalk. In machine translation, beam search is used in decoding process, which could generate multiple candidates with scores. Usually only the candidate with the highest score could be accepted. These scores reflects the similarity of the candidate and reference. However, just like that some question may have many different answers, there might still be acceptable, or even unexpected but wonderful candidates with lower scores. It’s a pity to get these good response ignored just because they shares little similarity with the references in a limited training dataset. To exploit them, and also to address the crosstalk generation problem, we propose a humor-enhanced machine translation model to generate response utterance in crosstalk. Our proposed model leverages a sub-model to explicitly model the degree of humor of a dialogue, and integrate it with other sub-models, as illustrated in **Figure \[fig:sys\]**.

![\[fig:sys\] General architecture of our system](xiangsheng_high_level.pdf){width="80mm"}

Response Generation Model
-------------------------

We get pairs of aligned utterance and response from the dialogue fragments in Chinese crosstalks, which are considered monolingual parallel data. The two performers echo each other in a crosstalk, and their roles keep consistent in the whole crosstalk, and the leading role and the supporting role of each utterance can be easily identified. Then we segment the utterances into words. Each pair consists of a sequence of words $\mathbf{s} (\{s_1, s_2, ..., s_l\})$ spoken by the leading role, and a sequence of words $\mathbf{ref}$ replied by the supporting role, while the response we generated is denoted as $\mathbf{r} (\{r_1, r_2, ..., r_l\})$.

Given the leading role’s utterance $\mathbf{s}$, we aim to generate the best response utterance $\mathbf{r}$ by using our proposed generation model. The proposed generation model has three sub-models(M1, M2, M3): translation model, language model and humor model. We will introduce each sub-model and then introduce the framework of model combination.

### Translation Model (M1)

The translation model translates the given leading role’s utterance $\mathbf{s}$ into a sequence of words $\mathbf{r}$, which is treated as the response. Let $({s}_i, {r}_i)$ be a pair of translation units, we can compute the word translation probability distribution $\phi_{tm}({s}_i, {r}_i)$ , which is defined in [@koehn2003statistical]. Each word $s_i$ in input utterance is translated to a word in response $r_i$, and the word in response would be reordered.

Reordering of generated response is modeled by a relative distortion probability distribution $d(a_i - b_{i-1})$, where $a_i$ is the starting position of the word in the input utterance $\mathbf{s}$ translated to the $i$-th word in generated response $\mathbf{r}$, and $b_{i-1}$ denotes the end position of the word in the input utterance translated into the $(i-1)$-th word in the response. We use $d=\alpha^{|x-1|}$ as implementation.

Thus, the translation score between the leading role’s utterance $\mathbf{s}$ and generated response $\mathbf{r}$ is: $$%   p_{tm}\left( \mathbf{s}, \mathbf{r} \right) = D(\mathbf{s}, \mathbf{r}) \prod_{i=1}^{l}\phi_{tm}({s}_i, {r}_i)
    p_{tm}\left( \mathbf{r}, \mathbf{s} \right) = \prod_{i=1}^{l}\phi_{tm}({s}_i, {r}_i) d(a_i - b_{i-1})$$

### Language Model (M2)

We use a 4-gram language model in this work. The language model based score is computed as:

$$p_{lm}({\mathbf r}) = \prod_j p(r_j|r_{j-3}r_{j-2}r_{j-1})$$

where $r_j$ is the $j$-th element of $\mathbf r$.

### Humor Model (M3)

We want to build a model to measure the degree of humor of a dialogue. However, humor is very complex. In Chinese crosstalks, humor can be expressed by the actors’ tone, body language and verbal language. In this study, we mainly focus on modeling the verbally expressed humor in crosstalks.

We build a classifier to determine the probability of being humorous for each response candidate in the context of the input utterance. In this model, we evaluate humor in 4 dimensions, just as the same as [@yang2015humor] : (a) Incongruity, (b) Ambiguity, (c) Interpersonal Effect, and (d) Phonetic Style.

Incongruity structure plays an important role in verbal humor, as stated in [@lefcourt2001humor] and [@paulos2008mathematics]. Although it is hard to determine incongruity, it is relatively easier to calculate the semantic disconnection in a sentence. We use Word2vec to derive the word embeddings and then compute the distances between word vectors.

When a listener expects one meaning, but is forced to use another meaning [@yang2015humor], there is ambiguity. This distraction often makes people laugh. To measure the ambiguity in the sentence, we collect a number of antonyms and synonyms for feature extraction. Note that antonyms are used as as an important feature in humor detection in [@mihalcea2005making]. Using Chinese WordNet [@huang2010infrastructure], we get the pairs of antonyms and synonyms.

Interpersonal effect is associated with sentimental effect [@zhang2014recognizing]. A word with sentimental polarity reflects the emotion expressed by the writer. We use a dictionary in [@Xu2008] to compute the sentimental polarity of each word, and add them up as the overall sentimental polarity of a sentence.

Many humorous texts play with sounds, creating incongruous sounds or words. Homophonic words have more potential to be phonetically funny. We count the number of homophonic words and words with the same rhyme, with the help of pypinyin[^1] .

Furthermore, adult slang is described in [@mihalcea2005making] as a key feature to recognize jokes, so we count the number of slangs.

Note that we extract features from the response alone and also extract features from the whole turn of dialogue consisting of both the given input utterance and the response. To summarize, the features we use are listed below:

-   minimum and maximum distances of each pair of word vectors in the response;

-   minimum and maximum distances of each pair of word vectors in the whole turn of dialogue (including the given input utterance and the response);

-   number of pairs of antonyms in the response;

-   number of pairs of antonyms in the whole turn of dialogue;

-   number of pairs of synonyms in the response;

-   number of pairs of synonyms in the whole turn of dialogue;

-   sentimental polarity in the response;

-   sentimental polarity in the whole turn of dialogue;

-   number of homophonic words in the response;

-   number of homophonic words in the whole turn of dialogue;

-   number of the words with same rhyme in the response;

-   number of the words with same rhyme in the whole turn of dialogue;

-   number of slangs in the response.

We choose the random forest classifier [@Liaw2002] because it generally outperforms other classifiers based on our empirical analysis.

The output probability for $\mathbf{r}$ is used as the humor model score $p_{hm}({\mathbf r})$.

### Model Combination

We use a log-linear framework to combine the above three sub-models and get our response generation model. Note that the translation model corresponds to two parts.

$$\begin{split}
        p({\mathbf r}|{\mathbf s})
        &= \lambda_{tm} \sum_i \log \phi_{tm}(s_i, r_i)\\
        &+ \lambda_{ds} \sum_i \log d(a_i - b_{i-1})\\
        &+ \lambda_{lm} \sum_j \log p(r_j|r_{j-3}r_{j-2}r_{j-1})\\
        &%+ \lambda_{crm} \log p_{crm}({\mathbf r}) 
        + \lambda_{hm} \log p_{hm}({\mathbf r})
    \end{split}$$

where $\lambda_{tm}$, $\lambda_{ds}$, $\lambda_{lm}$and $\lambda_{hm}$ are weight parameters of the sub-models and can be learned automatically.

Learning and Decoding
---------------------

In the model M1, we use relative frequency to estimate the word translation probability distribution $\phi_{tm}({s}_i, {r}_i)$, and no smoothing is performed.

$$\phi_{tm}(s, r) = \frac{\mathrm{count}(s,r)}{\sum_s (s,r)}$$

A special token NULL is added to each utterance and aligned to each unaligned foreign word.

The training process is similar to that in [@ritter2011data]. We use the widely used toolkit Moses [@koehn2007moses] to train the translation model.

The scikit-learn toolkit[^2] is used and the probability of prediction is acquired through the API function of [predict\_proba]{}.

In order to estimate weight parameters in the combined model, we apply the minimum error rate training (MERT) algorithm [@Och:2003:MER:1075096.1075117], which has been broadly used in SMT. The most common optimization objective function is BLEU-4 [@papineni2002bleu], which requires human references. We take the original human response derived from our parallel corpus as the single reference. We use the tool Z-MERT [@zaidan2009z] for estimation. The weight parameter values that lead to the highest BLEU-4 scores on the development set are finally selected.

In the decoding process, we use the beam search algorithm to generate the top-100 best response candidates for each input utterance based on M1 and M2. Then we obtain the score of M3 of each candidate, rank the candidates according to the combined model and select the best candidate as output.

Final Reranking with the Humor Model
------------------------------------

Note that the above combined model is optimized for the BLEU-4 score, but the BLEU-4 score cannot well reflect the humorous aspect of generated responses, so in order to improve the humor level of a dialogue, we further select the top-five best response candidates generated by the above combined model and rerank them according to the score of the humor model (M3), and finally use the top-ranked one as the output. Note that We use only top five candidates in this step because it is more efficient and effective to rerank a small number of high-quality candidates, while the readability and relevance of other candidates with low ranks cannot be guaranteed. The number of five is determined based on the development set.

Experiment Setup
================

Experiment Data
---------------

We collect the crosstalk data from multiple sources: (a) published books[^3]; (b) websites[^4] , where Chinese crosstalk fans collect and collate existing famous crosstalk masterpieces. (c) records of crosstalk play. The dataset we collect consists of over $173,000$ pairs of utterances, from $1,551$ famous excerpts of crosstalks. Since long sentences would slow down our training process, we filtered out responses longer than 60 words. In order to improve qualty, we also filtered out very short responses that are usually 1 modal particles. Over $150,000$ utterances was used in our dataset after this process. We divide the pairs of utterances and responses in the dataset into three parts, and we randomly select $2000$ pairs as the test set, $4000$ pairs as the development set for weight parameter estimation, and the rest as the training set for translation model.

Since training language model requires a large-scale dataset, which could hardly be offered in the domain of crosstalks, we add Chinese microblog messages from Sina Weibo[^5] to enlarge the corpus for language model training. The language styles in Weibo and Chinese crosstalks are quite similar in that the sentences in Weibo messages and crosstalks are usually short and informal. We collect 6 million pieces of Weibo messages and comments from Sina Weibo.

Not all utterances in Chinese crosstalks are humorous, because there are many utterances serving as go-betweens, so we have to manually build the training data for humor model learning. Because of the lack of Chinese humorousness dataset, we randomly collect $6000$ pairs of utterances in Chinese crosstalks, and manually label them into two classes: [*humorous*]{} or [*not humorous*]{}. $348$ pairs are marked as [*humorous*]{}, and we replicate the minor class instances and remove some major class instances to make the class distribution more balanced.

Then we use the labeled data for training the random forest classifier in the humor model.

Comparison Methods
------------------

We implement retrieval based methods for comparison:

-   [**Seq2Seq**]{}: Treat this problem as translation problem with <span style="font-variant:small-caps;">Seq2Seq</span> model with attention. GRU cells are used in RNN, and number of cells are 256.

-   [**Ir-Ur**]{}: Retrieve the response which is most similar to the input utterance from both the development set and the training set.

-   [**Ir-Uu**]{}: Retrieve the most similar utterance to the input utterance, and then return the response associated with the retrieved utterance;

-   [**Ir-Cxt**]{}: Retrieve the response which is most similar to the input utterance and three previous utterances of the input utterance;

Similarity was calculated by comparing word-level cosine similarity.

Our proposed method consists of all the three sub-models (including the final selection step), named as [**Smt-H**]{}. We further compare our method with the basic machine translation method considering two sub-models M1, M2, named as [**Smt**]{}.

Note that in our method, the humor model is used in both the combined model and the final reranking process.

Evaluation Metrics
------------------

We adopt human evaluation to verify the effectiveness of our system. We also report automatic evaluation results with BLEU [@papineni2002bleu]. But in the dataset only one reference response is provided for each given utterance, and the humor aspect cannot be well captured by the BLEU metrics. So we rely both on automatic and human evaluation results for this special task.

We employ two human judges to rate each generated response in three aspects:

**Readability**: It reflects the grammar correctness and fluency;

**Entertainment**: It reflects the level of humor of the response;

**Relevance**: It reflects the semantic relevance between the input utterance and the response generated. It also reflects logic and sentimental consistency.

Each judge is asked to assign an integer score in the range of 0 $\sim$ 2 to each generated response with respect to each aspect. The score $0$ means “poor” or “not at all”, $2$ means “good” or “very well”, and $1$ means “partially good” or “acceptable”. For example, In readability, $1$ means that there are some grammar mistakes but human evaluator can still understand the meaning of the response.

To help human raters to determine whether the generated response is relevant to the input utterance, we also provide previous two rounds of dialogues of the input utterance to the raters.

Result and Analysis
===================

Automatic Evaluation Results
----------------------------

As shown in \[res-auto\], we found the BLEU score of our <span style="font-variant:small-caps;">Smt-H</span> is higher than baselines in the $2000$ utterances test set, which can be simply explained since more global features could be accessed in our <span style="font-variant:small-caps;">Smt-H</span> model. *t*-test results on BLEU scores of the two model show that their difference is significant ($p< 1\times 10{-5}$).

                                                          BLEU-4      BLEU-3      BLEU-2      BLEU-1
  ------------------------------------------------------- ----------- ----------- ----------- -----------
  <span style="font-variant:small-caps;">Smt-H</span>     **16.62**   **18.99**   **22.41**   **29.57**
  <span style="font-variant:small-caps;">Smt</span>       15.13       17.39       20.62       27.39
  <span style="font-variant:small-caps;">Seq2Seq</span>   16.03       17.76       20.63       27.66
  <span style="font-variant:small-caps;">Ir-Uu</span>     2.6         3.51        5.52        12.53
  <span style="font-variant:small-caps;">Ir-Ur</span>     4.4         5.15        6.83        13.13
  <span style="font-variant:small-caps;">Ir-Cxt</span>    3.14        4.17        6.34        13.76
  <span style="font-variant:small-caps;">Rnd</span>       0.00        0.00        1.65        9.73

  : Automatic Evaluation Result of <span style="font-variant:small-caps;">Smt</span>, <span style="font-variant:small-caps;">Smt-H</span> and <span style="font-variant:small-caps;">Seq2Seq</span>[]{data-label="res-auto"}

As expected, the <span style="font-variant:small-caps;">Seq2Seq</span> model could get better scores in our automatic test than ordinary <span style="font-variant:small-caps;">Smt</span> model, but not better than our <span style="font-variant:small-caps;">Smt-H</span> model. A larger training set might help improve performance of the deep learning based model. BLEU scores of all <span style="font-variant:small-caps;">Ir</span> based models are lower than $5\%$ One possible reason is that the crosstalk dataset is not very large, and the utterances in the dataset are very diversified, so it is hard for retrieval based methods to find proper responses from the dataset directly. While generation based methods are more flexible and they can generate new responses for input utterances. For the retrieval based methods, IR-UR performs better than IR-UU, which is contrary to our intuition. This phenomenon has been discussed in [@ritter2011data].

Human Evaluation Results
------------------------

We randomly selected $150$ input utterances in the test set and asked two raters to label the responses generated by retrieval based methods and machine translation based methods. The percentage of each rating level is calculated for each method with respect to each aspect, as shown in **Figure \[fig:score\]**. Since retrieval based methods extract existing utterances directly from the dataset, the readability of the retrieved responses is usually very good and thus we do not need to label the readability of these responses. We further compute the relative ratio of the average rating score of each method to the average rating score of the basic [Smt]{} model with respect to each aspect, as shown in **Table \[res-relative\]**, and a ratio score larger than 100% means the corresponding method performs better than the basic [Smt]{} model, while a ratio score lower than 100% means the corresponding method performs worse than the basic [Smt]{} model.

                  <span style="font-variant:small-caps;">Smt</span>   <span style="font-variant:small-caps;">Smt-H</span>   <span style="font-variant:small-caps;">Seq2Seq</span>   <span style="font-variant:small-caps;">Ir-Uu</span>   <span style="font-variant:small-caps;">Ir-Ur</span>   <span style="font-variant:small-caps;">Ir-Cxt</span>
  --------------- --------------------------------------------------- ----------------------------------------------------- ------------------------------------------------------- ----------------------------------------------------- ----------------------------------------------------- ------------------------------------------------------
  Readability     100.00%                                             100.41%                                               110.74%                                                 -                                                     -                                                     -
  Entertainment   100.00%                                             120.59%                                               69.12%                                                  4.47%                                                 8.94%                                                 13.41%
  Relevance       100.00%                                             98.42%                                                99.74%                                                  28.69%                                                58.97%                                                39.84%

As can be seen from the human evaluation results, the responses generated by machine translation based methods are much more entertaining and relevant than retrieval based methods. We also find that that [Ir-Ur]{} returns more relevant responses than [Ir-Uu]{}. It also reveal that the translation model could generate more entertaining but less fluent response than <span style="font-variant:small-caps;">Seq2Seq</span> model. It could be explained that the responses generated by <span style="font-variant:small-caps;">Seq2Seq</span> model are too ordinary to get people feel amused. Comparing [Smt]{} with [Smt-H]{}, we can see that [Smt-H]{} receives higher rating scores than [Smt]{} with respect to fluency and entertainment. The comparison results demonstrate that the use of the humor model can indeed make the generated responses more entertaining, which is very important for Chinese crosstalks. An auxiliary effect by using the humor model is to improve the readability of the generated responses.

Now we show two examples of input utterances and different responses generated by [Ir-Uu]{}, [Smt]{} and [Smt-H]{} as follows:

  --------------------------------------------------------------- -------------------------------------
  **A**:                                                          躲？我把扁担一横，立托千斤
  *(context)*                                                     闸，迎着他的铁棍——咔！ /Hide?
                                                                  I bravely used my shoulder pole to
                                                                  meet against his iron bar... Crack!
  **B**:                                                          铁棍飞 。/His iron bar dropped?
  **A(input)**:                                                   扁担折了。 /No, my shoulder pole
                                                                  was fractured.
  **B(<span style="font-variant:small-caps;">Smt</span>)**:       搁在一块儿说个绕嘴的折了拿
                                                                  什么打？ /Put them together
                                                                  and tell me a tongue twister,
                                                                  what else could be used to meet
                                                                  against his weapon?
  **B(<span style="font-variant:small-caps;">Smt-H</span>)**:     好 — 折啦 ？
                                                                  /What? It was fractured?
  **B(<span style="font-variant:small-caps;">Seq2Seq</span>)**:   这回该二朝的关系? /
                                                                  (*Broken sentences*)
  **B(<span style="font-variant:small-caps;">Ir-Uu</span>)**:     都知道。
                                                                  /We all know that.
  --------------------------------------------------------------- -------------------------------------

  **B***(context)*:                                               老乡们 / My Fellow villagers
  --------------------------------------------------------------- -------------------------------
  **A(input)**:                                                   猪尾巴 / The pork tail
  **B(<span style="font-variant:small-caps;">Smt</span>)**:       噢！才生下来的？你？
                                                                  /Were just born? You? Are you
                                                                  kidding me?
  **B(<span style="font-variant:small-caps;">Smt-H</span>)**:     注意吧 / Pay attention
  **B(<span style="font-variant:small-caps;">Seq2Seq</span>)**:   注意吧 / Pay attention
  **B(<span style="font-variant:small-caps;">Ir-Uu</span>)**:     嗬 / Ho

In the first example, the response generated by <span style="font-variant:small-caps;">Smt-H</span> is more related to the input utterance. In the second example, the Chinese phrase 猪尾巴/“pork tail” has the same pronunciation with 注意吧/“pay attention” in the response generated by <span style="font-variant:small-caps;">Smt-H</span>. It is laughable since the supporting role (B) distorts A’s utterance’s meaning with a skill of homophonic, while the responses generated by <span style="font-variant:small-caps;">Smt</span> and <span style="font-variant:small-caps;">Ir-Uu</span> are totally irrelevant.

Discussion
----------

Our method works well with short input. It can generate appropriate responses which act as go-between in narration. For example,

**A**: 你爸爸穿衣裳也讲究。/ Your father is dainty about his dress.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 怎么讲究？/ Dainty? How ?

Some responses generated by our method are entertaining. For example,

**A**: 龙生龙, 凤生凤, 老鼠的儿子会打洞/Dragon born dragon, chicken born chicken, mouse’s son could only make hole. (*You are just like a mouse.*)

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 你不是后继无鼠了吗这代, 您这套我都会了。/ You even don’t have a mouse-like successor! I’ve found out your strategy.

With the use of the humor model in the combined model and the use of it in the final reranking process, our method can generate better response. For example,

**A**: 比如说我是天上的一颗星星。/ For example, I am a star in the heaven.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 噢这是不是。 / Oh, is it this one?

**B**(<span style="font-variant:small-caps;">Smt</span>): 是噢是你。 / Well, it’s you.

**B**(<span style="font-variant:small-caps;">Seq2Seq</span>): 可不对。 / That’s right.

However, there are still several shortcomings for our method:

1\) Some generated responses are not fluent and the readability is not good. Some responses are broken sentences. For example,

**A**: 好，新春进步！/Well, hope you make progress in new spring.

**B**(<span style="font-variant:small-caps;">Smt-H</span>): 不春进步了。/Not spring progress.

The reason may be that the current crosstalk corpus is not adequate for training a high-quality language model, but unfortunately it is hard to obtain a large crosstalk corpus because fewer and fewer people still work on this performing art and create new crosstalks.

2\) In some cases, our method will only give the input words back without translation and rewriting (e.g. 八匹马呀/Ah, there are eight horses). This may be caused by the data sparsity problem in the dataset. If the words or expressions do not or seldom appear in the training corpus, our method cannot find any “translations” to them and can only return them back directly.

Related Work
============

The most closely related work is dialogue generation Previous work in this field relies on rule-based methods, from learning generation rules from a set of authored labels or rules [@Oh:2000:SLG:1117562.1117568; @banchs2012iris] to building statistical models based on templates or heuristic rules [@levin2000stochastic; @pieraccini2009we]. li-EtAl:2017:EMNLP20175 After the explosive growth of social networks, the large amount of conversation data enables the data-driven approach to generate dialogue. Research on statistical dialogue systems fall into two categories: 1) information retrieval (IR) based methods [@ji2014information], 2) the statistical machine translation (SMT) based methods [@ritter2011data]. IR based methods aim to pick up suitable responses by ranking candidate responses. But there is an obvious drawback for these methods that the responses are selected from a fixed response set and it is not possible to produce new responses for special inputs. SMT based methods treat response generation as a SMT problem on post-response parallel data. These methods are purely data-driven and can generate new responses.

More recently, neural network based methods are being applied in this field . In particular, <span style="font-variant:small-caps;">Seq2Seq</span> model and reinforcement learning are used to improve the quality of generated responses [@li-EtAl:2016:EMNLP20162]. Adversarial learning are also applied in this field in recent years [@li-EtAl:2017:EMNLP20175]. [@serban2017hierarchical] introduced stochastic latent variable into RNN model into the response generation problem. Neural network based methods are promising for dialogue generation. However, as mentioned in section 2, training a neural network model requires a large corpus. Sometimes it is hard to obtain a large corpus in a specific domain, which limits their performance. Another kind of related work is computational humor. Humor recognition or computation in natural language is still a challenging task. Although understanding universal humor characteristics is almost impossible, there are many attempts to capture latent structure behind humor. Taylor used ontological semantics to detect humor. Yang identified several semantic structures behind humor and employed a computational approach to recognizing humor. Other studies also investigate humor with spoken or multimodal signals [@purandare2006humor]. But none of these works provide a systematical explanation of humor, not to mention recognizing humor in Chinese crosstalks.

Moreover, there are several studies attempting to generate puns and jokes. For example, The JAPE system was developed to automatically generate punning riddles [@binsted1994implemented; @binsted1997computational], and it relies on a template-based NLG system, combining fixed text with slots. Following the seminal work of Binsted and Ritchie, the HAHAcronym system was developed to produce humorous acronyms [@stock2005act] and the subsequent system of [@binsted2003pun] focuses on the generation of referential jokes. More recently, an interesting unsupervised alternative to this earlier work was offered [@petrovic2013unsupervised], and it does not require labeled examples or hard-coded rules. It starts from a template involving three slots and then finds funny triples. However, the task of entertaining dialogue generation has not been investigated.

Conclusions and Future Work
===========================

In this paper, we investigate the possibility of automatic generation of entertaining dialogues in Chinese crosstalks. We proposed a humor-enhanced translation model to generate the replying utterance of the supporting role, given the utterance of the leading comedian in Chinese crosstalks. Evaluation results on a real Chinese crosstalk dataset verify the efficacy of our proposed model, especially the usefulness of the humor model.

In future work, we will try to enlarge the dataset by exploiting dialogue data in other similar domains, aiming at further improving the performance. We will also investigate generating the utterance of the leading role in the crosstalks, given the context utterances in several previous turns of dialogues.

[^1]: http://pypi.python.org/pypi/pypinyin

[^2]: http://scikit-learn.org/stable/index.html

[^3]: (1)Liu Yingnan. [*A Complete Collection of China Traditional Cross Talks 5 Vols.*]{}, Culture and Art Publishing House, 2010.   (2)Wang Wenzhang. [*Famous Crosstalk Actor’s Masterpiece Series*]{}, Culture and Art Publishing House, 2004. et,al.

[^4]: \(1) http://www.xiangsheng.org; (2) http://www.tquyi. com; et, al.

[^5]: http://weibo.com
