Helsingin yliopisto, Matemaattis-luonnontieteellinen tiedekuntaUniversity of Helsinki, Faculty of ScienceHelsingfors universitet, Matematisk-naturvetenskapliga fakultetenSalmenkivi, Essi2020URN:NBN:fi:hulib-202005202221http://hdl.handle.net/10138/315157This work introduces a system for generating radio play scripts. Generating dramatic dialogue presents unique challenges in language generation. In addition to fluency of language, dramatic text should exhibit plot and characters' affective stances to each other and events. Character relationships and affect may be expressed beneath the surface level of everyday conversation topics. In the affect-driven dialogue generation system introduced by this thesis, characters have goals, relationships and a three-dimensional model of mood which influences their behaviour. Given conflicting goals, characters will navigate the web of conversation, making choices that influence others to accept their goal while simultaneously trying to maintain the relationship to others. Characters react emotionally to each others' speech acts and express their own affective state in how they speak. The system separates the form of a sentence from its content, allowing the system to generate a wide range of coherent, dramatic conversations by combining affect-expressing sentence templates with goal-expressing content. Because content and form are independent from each other, only a finite number of sentence templates need to be prepared to generate conversations about any content.engNLPNLGtekstin generointilaskennallinen luovuusModeling emotions in dialogue generationpro gradu -tutkielmatTietojenkäsittelytiede