  Explicitly modeling emotions in dialogue generation has important
applications, such as building empathetic personal companions. In this study,
we consider the task of expressing a specific emotion for dialogue generation.
Previous approaches take the emotion as an input signal, which may be ignored
during inference. We instead propose a search-based emotional dialogue system
by simulated annealing (SA). Specifically, we first define a scoring function
that combines contextual coherence and emotional correctness. Then, SA
iteratively edits a general response and searches for a sentence with a higher
score, enforcing the presence of the desired emotion. We evaluate our system on
the NLPCC2017 dataset. Our proposed method shows 12% improvements in emotion
accuracy compared with the previous state-of-the-art method, without hurting
the generation quality (measured by BLEU).
