Write On

Simon Burns
Aug 25, 2017 · 2 min read

For my latest little side project, I decided to do something a bit more experimental…the world’s first cognitive writing game! Try it at cogniwrite.mybluemix.net

The aim of the game is to write a story following certain steps and emotions. So the game tells you the next step in the story that it expects, as well as what sentiment and emotion it wants by the time you reach that step. The idea is not to immediately write the next step, the player must build up to the step by setting the emotion and sentiment.

Understanding the writing

To understand what is being written I used Watson Assistant. I created an intent for each step in the story and provided a number of examples for each step. I also created some relevant entities for the story, like characters and locations. I used the dialog to keep track of the story, and check for the correct intent and entities at each step.

This is a more unusual use of Watson Assistant, as we are not simply responding to user questions, we are understanding what is being written in the background, and controlling the application state based on it.

Understanding the emotion

To understand the emotion and sentiment of the writing, I used Watson Natural Language Understanding (NLU). This doesn’t need any training so you can just start sending text to it. While the game just submits the last sentence to Watson Conversation, it submits all the text since the last step to NLU. This gives the player time to build the desired emotion.

Bringing it all together

I wrote a simple front end and NodeJS backend to bring it all together. This captures players’ writing, submits it to Watson Assistant and NLU, and updates the game state based on the responses.

Why?

I made this game for a couple of reasons. Firstly, it was fun and let me build something a little different with Watson. Secondly, it is an example of taking continuous input and submitting it to Watson to spot things that are of interest. This can also work on larger pieces of text where you can analyze a bit at a time.

Play!

Have a go of cogniWrite and let me know what you think!

If you are interested in using Watson, then have a look at my other articles in the Conversational Directory.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade