I have been intrigued by the applications of Artificial Intelligence (AI). The theory goes that you can program a machine to do things that humans are doing today. I buy the argument about machines replacing humans in routine, mundane tasks. But, can a machine take over the creativity process? Can a machine exhibit emotions like humans do? Can it write a poem or a story? In my own little way, I set out to find out...
Machines taking over humans' tasks - this is not something new. As we look around us, we see lots of examples of this. Afterall, the Automated Teller Machine - or as we better know it, the "ATM" - is a machine that replaced a human, the bank teller.
But with the growing attention and hype about Artificial Intelligence and Machine Learning, people are talking about two diametrically opposite scenarios: one in which machines help propel mankind into an amazing future, and the other where machines rule the world, to the point where humans become subservient to them.
While I believe that AI has the ability to make our lives much easier by taking over the performance of mundane tasks, there is still a question in the back of my head; can AI replace the thing that makes us human - emotions? Can it grow the ability to feel emotion and express it, through poems or stories?
I have been working on a book, a novella of sorts for quite some time now. It is titled "Catharsis" and tells the story of a girl who goes through some challenges in life. When I shared the first draft of the book with my teachers and my family for inputs, some of them said that it was "dark" and "not inspiring". While I agreed that it was a dark story - it was meant to be - I also knew that there was a good message behind it, one that was inspiring. Perhaps I didn't make it clear enough though, and I had to know for sure - had my book lost all the optimistic connotations I had tried to incorporate into it?
To get an independent view, I turned to a computer. I had just taken a few data analytics and machine learning classes from Berkeley and Stanford, and started researching a topic called "Sentiment Analysis", whereby you could have a piece of software analyze the sentiment of the written word.
After nearly a month of playing around with various algorithms and public domain pieces of software, I was able to get a lexicon called "DepecheMood" to analyze my book. I had to download the software, and feed it each chapter of my book and have it tell me the sentiment of the chapter. DepecheMood is the world's largest crowd-sourced sentiment analysis program whereby the community at large trains the software to understand and classify sentiment of a given piece of text into eight categories, viz: Afraid, Angry, Sad, Annoyed, Don't Care, Amused, Inspired and Happy.
I wrote small programs that summarized the sentiment of each chapter as an average of the sentiments of each line in the chapter.
The result was, as shown in the picture below, eye-opening for me.
From the picture above, it was clear to me that while my story did have a mix of emotions, there was nothing really exciting about the "mood" of the story. It did seem a bit monotonous, and arguably didn't have enough of the positive sentiments like Happiness and Inspiration. It did seem more skewed towards the negative sentiments.
The machine had answered my question, without a bias.
I set out to rewrite my book. It took me nearly five months to come up with the revised version. I resisted the temptation to feed each chapter in, till I was done with the writing. However, when I finished writing, I ran the analysis again, and here is what the summary result looked like.
This time, the story had more ups and downs, perhaps more twists and turns in emotions. One chapter in particular (chapter 3) had the protagonist really afraid, but also inspired to do something about the problem she was facing. As the story progressed, you could see the protagonist being happy and overcoming her fears. I will not spoil the story further, but you can see that the final version looks completely different than the original version I started out with.
So, did I have the machine write me a story? Did it replace me as a writer? No. I had the machine tell me what was wrong with my story and helped me write a better story, with the message I had set out to send.
The future of machines making humans better, is a future that I see with Artificial Intelligence and robots.
Machines taking over humans' tasks - this is not something new. As we look around us, we see lots of examples of this. Afterall, the Automated Teller Machine - or as we better know it, the "ATM" - is a machine that replaced a human, the bank teller.
But with the growing attention and hype about Artificial Intelligence and Machine Learning, people are talking about two diametrically opposite scenarios: one in which machines help propel mankind into an amazing future, and the other where machines rule the world, to the point where humans become subservient to them.
While I believe that AI has the ability to make our lives much easier by taking over the performance of mundane tasks, there is still a question in the back of my head; can AI replace the thing that makes us human - emotions? Can it grow the ability to feel emotion and express it, through poems or stories?
I have been working on a book, a novella of sorts for quite some time now. It is titled "Catharsis" and tells the story of a girl who goes through some challenges in life. When I shared the first draft of the book with my teachers and my family for inputs, some of them said that it was "dark" and "not inspiring". While I agreed that it was a dark story - it was meant to be - I also knew that there was a good message behind it, one that was inspiring. Perhaps I didn't make it clear enough though, and I had to know for sure - had my book lost all the optimistic connotations I had tried to incorporate into it?
To get an independent view, I turned to a computer. I had just taken a few data analytics and machine learning classes from Berkeley and Stanford, and started researching a topic called "Sentiment Analysis", whereby you could have a piece of software analyze the sentiment of the written word.
After nearly a month of playing around with various algorithms and public domain pieces of software, I was able to get a lexicon called "DepecheMood" to analyze my book. I had to download the software, and feed it each chapter of my book and have it tell me the sentiment of the chapter. DepecheMood is the world's largest crowd-sourced sentiment analysis program whereby the community at large trains the software to understand and classify sentiment of a given piece of text into eight categories, viz: Afraid, Angry, Sad, Annoyed, Don't Care, Amused, Inspired and Happy.
I wrote small programs that summarized the sentiment of each chapter as an average of the sentiments of each line in the chapter.
The result was, as shown in the picture below, eye-opening for me.
![]() | |
|
From the picture above, it was clear to me that while my story did have a mix of emotions, there was nothing really exciting about the "mood" of the story. It did seem a bit monotonous, and arguably didn't have enough of the positive sentiments like Happiness and Inspiration. It did seem more skewed towards the negative sentiments.
The machine had answered my question, without a bias.
I set out to rewrite my book. It took me nearly five months to come up with the revised version. I resisted the temptation to feed each chapter in, till I was done with the writing. However, when I finished writing, I ran the analysis again, and here is what the summary result looked like.
![]() |
Figure 2: Sentiment Analysis of the final version of my book |
This time, the story had more ups and downs, perhaps more twists and turns in emotions. One chapter in particular (chapter 3) had the protagonist really afraid, but also inspired to do something about the problem she was facing. As the story progressed, you could see the protagonist being happy and overcoming her fears. I will not spoil the story further, but you can see that the final version looks completely different than the original version I started out with.
So, did I have the machine write me a story? Did it replace me as a writer? No. I had the machine tell me what was wrong with my story and helped me write a better story, with the message I had set out to send.
The future of machines making humans better, is a future that I see with Artificial Intelligence and robots.
Nice research!
ReplyDeleteVery interesting... I had read that it is possible to analyze sentiments.. Didn't realize this could be one of the applications....Opens up many new possibilities eh?
ReplyDeleteTrue, the possibilities are amazing and seemingly endless.
DeleteThank you for your comment!
Excellent writeup for a 17 year old. All the best
ReplyDeleteExcellent work on sentiment analysis.Good work keep it up
ReplyDeleteMachines or for that matter anything new always challenges the status quo. Wonderful to see you so creative and expressive . best wishes ,
ReplyDeleteKC Shetty
A friend of your mom
I think that's the mark of true innovation - the disruption of the status quo.
DeleteThank you for your comment!
Very deep thoughts Roshini...looking forward to read your book..I see a future wherein man and machine will collaborate and assist each other ..as each has their own strengths...and make a better society for all .. very best to you Roshini
ReplyDeleteVinutha ( your mom's friend)
I think it's great that we all have the opportunity to witness the beginning of the collaboration of man and machine. It really is a time that will go down in history.
DeleteMy book ("Catharsis") is now available on amazon.com! - https://bit.ly/roshniprasad
Thank you for your comment!
I hadn't ever thought about having my writing analyzed for sentiment, so this was a new concept for me. We use software to analyze tone, readability, "perkiness" and grammar rules.
ReplyDeleteNow I'm thinking it would be really cool to have software analyze my emails before I send them so I could get feedback on the sentiment I was conveying. I would always communicate "collaborative" instead of "hostile."
Wow, that's a great application of sentiment analysis, I hadn't thought of that! I think it could definitely improve workplace morale if people were aware of how others might receive their messages.
DeleteThank you for your comment!
I liked the way you penned your line of thoughts that led you to the final work.... such detailed analysis!
ReplyDeleteThis is going to take you places...God bless!
Thank you!
Delete