The human emotion model
The robot also needs a model of the human it is talking to, so it can make different responses based on how the human is feeling. We are going to create a smaller version of the emotion model we used earlier. We model four emotions for our human interactions for the robot to use in formulating responses: happy/sad, and welcoming/distant. We can put emotion tags into our patterns in the script file with [happy] , [sad],[welcome] or [distant] to mark the emotions of responses. For example, if we are not getting answers to our questions, we can mark that response with [distant] to note that our subject is not being cooperative:
Our human emotion model makes use of a Python dictionary data structure to hold our model. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access