Home For Fiction – Blog

for thinking people


programming

Vocabulary Richness Ratio: a JavaScript Analyzer for Fiction Texts

August 18, 2020

I’ve been reading a lot of Yukio Mishima’s fiction lately. In awe of the richness of his vocabulary, I decided to code a little program that analyzes a novel and tells us how diverse the author’s word choices are. Enter Vocabulary Richness Ratio, my newest JavaScript experiment!

Just like my Fiction Complexity Index attempt, the Vocabulary Richness Ratio is:

  • available to you to try here on this page.
  • a work-in-progress – in other words, take the results with a grain of salt.

I’ve combined my expertise in literature and creative writing together with my interest in coding, and this little program was the result. Again, I must emphasize that it’s only a work-in-progress. It can give you a hint of how rich the vocabulary of your book is, but it’s not exact science.

vocabulary richness ratio
Vocabulary Richness Ratio is a JavaScript program that finds unique words in a text and, together with other factors, estimates how diverse the book’s vocabulary is
(more…)

A JavaScript Poem Shuffler

July 18, 2020

As I’ve mentioned many times on the blog, meaning is a very fluid concept in literature. This fact inspired me to see what happens when we completely distort the author’s original intention, while still maintaining some minimal cohesion. This JavaScript poem shuffler was the result.

As the name perhaps implies, my JavaScript poem shuffler takes a poem and randomly reorganizes its lines.

Now, you might have two questions about this:

  • Doesn’t that render the poem meaningless?
  • Why should we care?

Amazingly, both these questions have the same answer, as we’ll see in more detail. Briefly, let me just say that this little coding exercise also provides us with excellent teaching material in terms of affective power and, indeed, the creation of meaning in literature.

JavaScript Poem Shuffler
Apparently chaotic patterns can still hold meaning – if they are predicated on affect. This JavaScript poem shuffler is a good example of this
(more…)

Fiction Complexity Index: Calculate Your Novel’s Genre Positioning

June 17, 2020

Romance novels aren’t as complex as literary fiction. Similarly, historical fiction is more complex than, say, young-adult fantasy. I’ve been thinking, we need a Fiction Complexity Index. Moreover, we need a Fiction Complexity Index by genre; a number that can give us a rough estimate of whether our novel is “about right” in terms of complexity.

And so, I decided to make one!

The good news is, this little Fiction Complexity Index is something you, too can benefit from. Because I decided to code it in a way that allows anyone to upload their novel (as a .txt file) and immediately see the results.

Fiction complexity index
A Fiction Complexity Index can help us see whether a text is suitable for the intended genre
(more…)