A chatbot is perceived as more humanlike and likeable if it includes some jokes in its output. But most existing joke generators were not designed to be integrated into chatbots. This paper presents Witscript, a novel joke generation system that can improvise original, contextually relevant jokes, such as humorous responses during a conversation. The system is based on joke writing algorithms created by an expert comedy writer. Witscript employs well-known tools of natural language processing to extract keywords from a topic sentence and, using wordplay, to link those keywords and related words to create a punch line. Then a pretrained neural network language model that has been fine-tuned on a dataset of TV show monologue jokes is used to complete the joke response by filling the gap between the topic sentence and the punch line. A method of internal scoring filters out jokes that don't meet a preset standard of quality. Human evaluators judged Witscript's responses to input sentences to be jokes more than 40% of the time. This is evidence that Witscript represents an important next step toward giving a chatbot a humanlike sense of humor.
翻译:聊天机器人若在其输出中融入一些笑话,会显得更有人情味且更讨喜。但现有的大多数笑话生成器并非为集成到聊天机器中而设计。本文提出Witscript,一种新颖的笑话生成系统,能够在对话中即兴创作原创且上下文相关的笑话,例如幽默的回应。该系统基于一位专业喜剧编剧创作的笑话写作算法。Witscript运用自然语言处理的常用工具从主题句中提取关键词,并通过文字游戏将这些关键词及相关词汇关联起来以生成笑点。随后,一个在电视剧独白笑话数据集上微调过的预训练神经网络语言模型被用于填补主题句与笑点之间的空缺,从而完成笑话回应。一种内部评分方法过滤掉未达到预设质量标准的笑话。人类评估者认为,Witscript对输入句子的回应有超过40%的比例是笑话。这证明Witscript代表着赋予聊天机器人类人幽默感的重要下一步。