Ready for maths? No? Well, how about pictures?
Nice, Mole, what are we looking at?
What you see before you is a word sentiment chart of The Gribble’s Eye plotted over the length of the story. This was created using some “R” code and the libraries offered by the professor behind http://www.archerjockers.com/
The pair of people behind the book The Bestseller Code used such code to allow them to grade and understand the so-called literary market: https://books.google.com/books/about/The_Bestseller_Code.html?id=4fXUDAAAQBAJ&printsec=frontcover&source=kp_read_button#v=onepage&q&f=false
I took their code and ran my second, wee novel through it. And that picture is what the code produced.
Sentiment goes up and down. Happy and gay and positive. Sad, angry, loathsome and negative. Good books have a signature sine wave of sentiment. Marketable books have this even more.
Now, mine is neither good nor marketable, but, it’s interesting to note that there is a definite pattern to the story: We start up, then down, up, down, and end on a big UP!
Whee! What a ride.
You want to do this for your own story? Sure. Here’s the R code:
library(syuzhet) library(readtext) setwd("C:\\Documents and Settings\\MeTheUser\\Desktop\\") text <- get_text_as_string("YOURBOOK.txt") s_v <- get_sentences(text) raw_values <- get_sentiment(s_v, method = "syuzhet") dct_vals <- get_dct_transform(raw_values) simple_plot(raw_values, title = "TITLE OF BOOK", legend_pos = "top", lps = 20, window = 0.05)
You’ll have to struggle with installing the supporting modules — but, hey! You’re smart. You can figure it out.
(If you can’t, send me your story text — just words — and I’ll run them through this bit of code for you.)
Wow! That is super interesting. Who would have thought… No book here, otherwise would definitely run it.
LikeLiked by 1 person
Glad you thought it intriguing. Yeah, I think this analysis stuff has some ex post relation to how to market or work with a particular novel. Well, that’s the analyst in me talking.
LikeLiked by 1 person
Could this work on shorter things? Stories, posts?
LikeLiked by 1 person
Absolutely. Although the resolution will dwindle with fewer words. You write “happy day today, sad day tomorrow” and you won’t get much responsiveness. If you a sample (even a gutenberg sample) you want run, let me know.
LikeLiked by 1 person
Naturally. I understand, the smaller the sample, the less accurate the results.
I will keep it in mind.
LikeLiked by 1 person
You seem to be of an equitably positioned persona situated as such to adsorb and propose — equally — notions that might benefit us both. How might you consider leveraging such a symbiotic vision of the world?
LikeLike