Nerd-Author Fun v2: Text Analysis

I promised this week that my blog post would be about some of my C# coding, which also happens to dovetail in beautifully with my writing. I’ve taken my earlier work and begun the super-charging process. That being said: this is just the beginning. In the future I plan to make it available, far more powerful and with a few of the bugs ironed out.

The general premise behind the program is that it can load your story from a text file, and then allow you to analyse it. At the moment it is sans-UI – which means it doesn’t have pretty user windows, checkboxes and other controls. I’m calling it Text Analysis Command Line (TAC). As it’s a command line program you have to type commands in to operate it.

So what can it do?

Like any good program it contains help – typing ‘?’ will give you a list and basic description of the available commands; typing ‘<command> ?’ will give you detailed options on that particular command.

wordcount-1

When you see a pipe symbol ‘|’ it means or. Square brackets (‘[‘, ‘]’) mean optional.

Most commands can either display output on the screen or save the results to a file. If using a single greater-than symbol (‘>’) the file will be saved (unless it already exists). Using the double option ‘>>’ will save the file, overwriting it if necessary.

Below is a description of all of the currently available commands. The results are based on processing Vengeance Will Come, my scifi/fantasy adventure (available now):

wordcount. You can display the frequency of every word used. Earlier in the year I bought Scrivener (left). For the most part it’s a great program but I was disappointed there was no way to export (or even easily query) word count data. The image of TAC (right) shows a snippet of both the textual version (default) and the ‘basic mode’ (using -b option). The basic mode is valuable if opening the file in Excel to do pretty graphs.

wordcount can also provide wordcount-word lengththe number of words which begin with given letters (-f) or the length of words (-l).

Just in case you’re curious the longest word at 20 characters is ‘uncharacteristically’. The three 16’s are: ‘conspiratorially’, ‘incontrovertible’ and ‘responsibilities’.

For the purpose of completeness, I’ll briefly mention the data command. At the moment it’s limited, a means to interrogate the data. In order to do all of this (and future) processing I painstakingly categorise every character of text into a type. Using the -expseg option outputs this information.

datacmd-2
-expseg option

 

At this stage the only two other data commands are -sen (output sentence). For example outputting the sentence at segment 128 is:

At first light they invade my mind, besieging it to the point of exhaustion.

And -block (output block) at 128:

“I wish that I didn’t know the future; that I couldn’t see the prophecies unfold before me. At first light they invade my mind, besieging it to the point of exhaustion. Even in my fitful sleep they haunt me as wild animals stalk the scent of blood, turning what little rest I get into an extension of my waking nightmare. I cannot escape.

The find command is powerful and will be leveraged heavily in future updates.

find-1

Unsurprisingly, find locates the occurrences of a specified word. Importantly the before and after options allow displaying the word in a variable level of context (e.g. want to see 10 words preceding the word, or only 5?).

find can also locate every instance of a specified type of punctuation. Want to know how often I use exclamation marks? Typing ‘find -p’ brings up a list of punctuation options from which a selection can be made.

find-2

The answer is of course 45 (as displayed on the screenshot). However, now I know exactly where they are (and in what context).

find-3.PNG
The first use of ! occurs at the 660th character in my novel.

I’m a big believer in not over-using the exclamation mark, so a tool like this would let me easily see how often I’ve used it in a given book (and calculate the amount of text between each usage). More importantly, it can also let me track down when I’ve used a ” instead of a “ which seems to happen no matter how careful I am.

This brings me to the end of the tour of TAC v0.0.1, I hope you liked it.

Advertisements

Highlights from ‘Knife of Dreams’

In blogging about my own book, Vengeance Will Come, I got a little behind in sharing my highlights as I read through the Wheel of Time series. Getting back on track here are my thoughts and comments on Book 11, Knife Of Dreams.

One of the things which I have commented on several times – because it is worthy of repetition is how Robert Jordan explores the differences between the genders. It seems that confusion and the up-is-down way that men and women think and act toward one another are endless fodder for jokes and character tension. (And much of it based in some truth).

  • only a fool thought he knew what was in a woman’s head just because she had a smile on her face. (Page 229)
  • Women could compress a great deal into one look. (Page 233)
  • When a woman went silent on you, there usually was trouble in the offing (Page 280)
  • A man wanted to stand well in his wife’s eyes. (Page 438)
  • “We’ll talk about it,” she murmured, the bond filling with stubborn resolve. The most dire words a woman can say short of “I’m going to kill you,” Rand thought. (Page 460)
  • She stood there giving him one of those looks women carried in their belt pouches. (Page 487)
  • …Caraline paused her talk with Min to give him a look that would have had him hunting for the stab wound had he noticed it. (Page 494)
  • “Still, a cold bath helps a man keep his mind off his troubles.”“I thought that was for keeping your mind off women,” Perrin said. He was in no mood for joking, but he could not expect everyone to be as grim as he was. Elyas laughed. “What else causes a man’s troubles?” He disappeared into the water, and Tallanvor replaced him. (Page 617)

There have been a few points throughout the series where Jordan’s writing has elicited an emotional response from me. It’s impressive to consider that even though I know something is pure fiction, it can still register an emotional response of sadness or elation. (In much the same ways as animation can). One such scene is where Nynaeve tricks her husband Lan, by depositing him as far away from his dangerous goal as she could (while still keeping her word), and then Travels (ala teleports) to every village along his route, calling for soldiers to join him.

“My name is Nynaeve ti al’Meara Mandragoran. The message I want sent is this. My husband rides from World’s End toward Tarwin’s Gap, toward Tarmon Gai’don. Will he ride alone?” (Page 472)

The Wheel of Time is undeniably an EPIC fantasy. The world is populated by numerous cultures; each with their own customs, fashion and architecture. Not to mention biases against each-other. Oops, I guess I did mention it.

Commoners in these lands seemed to believe themselves equal to everyone. Selucia gave the same sort of instructions to the lanky young man who took …[her horse]…  The young man stared at Selucia’s chest, until she slapped him. Hard. He only grinned and led the dun away rubbing his cheek. Tuon sighed. That was all very well for Selucia, but for herself, striking a commoner would lower her eyes for months. (Page 609)

For us in the West, a woman slapping a rude man would be (fairly) appropriate. The idea though that it would result in shame for the woman is so contradictory. It adds a flavour to the story; a richness and a difference to the culture. Jordan turns our social norms on their head: women are often more respected than men, blond-hair and Caucasian skin seem to be rare.

Being an epic fantasy, the series is full of prophecy which is used as a foretaste of what is to come, and then as a reward when it is paid off (especially when in a surprising way). However, prophecy isn’t always fulfilled with a trumpet sounding and a big climax – sometimes it occurs out of happenstance:

The ring was a carver’s try-piece, bought only because it stuck on his finger; he would give up those memories of Hawkwing’s face along with every other old memory, if it would get the bloody snakes out of his head; and yet those things had gained him a wife. The Band of the Red Hand would never have existed without those old memories of battles. (Page 809)

It never hurts to throw in a little bit of superstition or a lack of understanding. Characters after all, aren’t all-knowing.

His companion waved a plump, dismissive hand even while staring at the Maidens. “Worms?” he said absently. “Everybody knows silk grows on trees.” Walking deeper into the common room, Rand shook his head as the proprietor advanced to meet him. Worms! The tales people could come up with to try prying coin out of somebody else. (Page 483)

And just some good quotes:

  • flattery oiled the insignificant as well as it did the mighty. (Page 72)
  • yet the biting, sulphurous smell that filled the chill night air seemed an ill omen, and hardened men offered their prayers aloud as fervently as the beardless boys. (Page 98)
  • Birgitte was the first to arrive, the bond filled with weary discontent. “A ride?” she said, and when Elayne explained, she began raising objections. Well, some of it was objections; the rest was just insults. “What hare-brained, crack-pated scheme are you talking about, Birgitte?” (Page 733)

And a great quote to remember when plotting stories:

It was never this way in stories. In stories, everything was always wrapped up neatly by the end. Real life was much . . . messier. (Page 798)

And the list of words which I either didn’t know, or don’t use enough. Whilst I do love good words, and enjoy being educated by what I read, personally – I would hesitate to use so many “big words” in my own writing. Granted, they are few among thousands… still, I would hesitate.

  • hale (Page 9)
  • salubrious (Page 90)
  • tincture (Page 91)
  • zephyr (Page 97)
  • androgynous (Page 142)
  • griddle (Page 217)
  • derrick (Page 220)
  • coppiced (Page 307)
  • desiccated (Page 309)
  • perquisite (Page 400)
  • andirons (Page 414)
  • demure (Page 434)
  • gobbet (Page 449)
  • charnel (Page 450)
  • detritus (Page 567)
  • susurration (Page 581)
  • grouse (Page 590)
  • suet (Page 596)
  • asperity (Page 638)
  • ebullience (Page 729)
  • vituperative (Page 787)
  • visages (Page 791)

Writing: The Passing of Time

sundial-3692590_640One of the tricks to master in writing is how to show the passage of time in a story. For example if Chapter 2 occurs two weeks after Chapter 1, how do you show that? It’s one area I’m still honing in my writing.

I first highlighted these lines in book 11 of the Wheel of Time series:

“…the sun more than halfway to the horizon, by the time he saw what he was looking for.” (Page 151)

“In a morning ritual, his fingers made another knot mechanically, then slid down the cord, counting. Twenty-two knots. Twenty-two mornings since Faile was kidnapped.” (Page 156)

The first obviously makes use of the position of the sun, and the second describes in a clever action-oriented manner the time that has passed. I decided to exclude these two quotes from my upcoming highlights post, because I wanted to examine the topic further.

Of course the crudest way to show time is simply to tell the reader “10 days later…” I’ll admit earlier drafts of Vengeance Will Come had this a lot. There were two reasons for this: I didn’t know any better  and I was also using the prompts to aid my own keeping track of time. It is a crude approach which pulls the reader out of the story. There are still a few instances of itin the book, but it’s something I use rarely now.

A better way, as the old adage goes, is to show the reader instead of telling them. The goal, I think, should be to show the passage of time through the setting and/or character.

Here are some of the ideas I brainstormed. If you have any other ideas, please add them in a comment below.timescale

 

 

Now Published: Vengeance Will Come

Earlier this week, I published Vengeance Will Come on Amazon. You can read it now for the low price of $1.50 (US) or $2.12 (AU).

cover-1

After oscillating more than a conviction-less politician with contradictory poll information on if I should publish and how I should publish I finally just did it. I wrote Vengeance Will Come hoping that others would find it an entertaining read – and that wasn’t going to happen if I didn’t put it out into the public sphere.

At the moment it is just an e-book, though I’ve had a few requests for a print book – so I will look into the implications of that in the future.

This is the description on the Amazon page to whet the reading appetite.

‘A man in a fight for survival will grasp at anything to use as a weapon.’

A shadowy cult with arcane powers foments hostilities between two Regents, locking them in a bitter struggle that traverses planets.

Regent Menas Senay has been promised the long-awaited revenge that will free him from the demons of his past. He’s willing to pay anything to achieve it, even if it costs him everything.

When Menas attacks the Tador capital he unleashes a series of events that rock Regent Danyel Abudra’s life to its foundations. Danyel soon discovers that even rulers are slaves in adverse circumstances, and that to prevail will be harder than he can conceive.

But they’d both better hope the cult doesn’t get what it wants from the deal.

Vengeance costs more than anyone expects, and it’s coming…

At just over 100,000 words and 297 pages this book is approximately 20% longer since my last revision cycle, and 15% shorter than the original draft. (I’ll talk more about the revision process in future posts).

Thanks and credit for the background image on the cover must go to the talented user Gellinger who uploaded and made it available for use at pixabay.

landscape-2806202_1920

Seeing Vengeance Will Come finally available for others to read is a great encouragement to keep writing!

Vengeance Will Come (Very Soon)

My goal was to finish the revision of my first fantasy-adventure novel, Vengeance Will Come by the end of September. I am very close to finishing (95%).

There are 4 more scenes to revise and a few ‘TODO’ items I’ve listed for follow-up. So the end is just around the corner. I could have finished it and achieved my goal, if I’d been willing to be sadistic with myself.

As much as I love writing, and do it as a hobby, it is still tough work. Many break-in writers share how they work two jobs – a day job to pay the bills and then their writing, which they treat like a second job. It does feel that way. You’re always under pressure to produce and to perform. If you’re not writing, you’re thinking about writing. Which can be tiring in my experience.

The older I get the more I realise that life is too short. I decided I wasn’t going to make myself unhappy to achieve a self-imposed deadline. I would have some leisure time on the weekend – to read, to cook and to continue getting the garden under control.

That being the case, I believe I should be finished in approximately a week.

Highlights from Crossroads of Twilight

My highlighted sections (and a few associated thoughts) from Robert Jordan’s Wheel of Time, book 10 – Crossroads Of Twilight. I have pruned these comments quite hard, taking only a few picked from the bunch.

One important aspect of being a writer in my opinion is the skill of observation. (Which is quite funny, because at times I can be very un-observant). It’s looking at an object or person and noticing details. For example: not just that Sally was angry, but how that affected her face and body in minute detail. How it changed the words she used and the way she said them. (And how that could be related to other things or animals etc for similes). It is then those details which help to paint a vivid word-picture, or an interesting and insightful phrase. I can only presume, Jordan must have been watching at least one rain storm as he wrote these lines:

  • the only thing truly certain was that none of that mattered a spit in a rainstorm. (Page 25)
  • Rain fell by buckets, (Page 92)
  • driving the rain like stones from slings (Page 93)

As I’ve said numerous times, I like wisdom written down in a story:

  • how the horror of yesterday became merely the uneasiness of today, once you grew accustomed. (Page 61)
  • Loyalty to the Crystal Throne is precious above the breath of life, followed closely by knowing when to keep silent. The more who speak of a thing, the more will learn of it who should not.’ (Page 142)
  • Cowardice was the sort of rumor that stuck like greasy mud; you never could wash it off completely. (Page 258)
  • Hard times uncovered hard talents in the most surprising people. (Page 325
  • Truth almost always did come out in the end, but by the end, truth was often so wrapped around with rumors and speculation and absolute lies that most people never did believe it. (Page 393)

The differences between men and women provide endless fodder:

  • In his experience, if a woman did not want to hear something, she could ignore it till you yourself started to doubt you had spoken. (Page 89)
  • A woman started hissing at him like a kettle, a man with any brains found a way to cool her down fast. (Page 125)

I’m not sure if ‘humorous’ is quite the right word, but this was an interesting device I saw used a couple of times. First, the set up: relate someone or something

[She was like] A motherly farmwife amused by the antics of others in the village. Even some sisters were foolish enough to dismiss her that easily. (Page 394)

And then a few sentences later pay it off, by introducing a twist to the descriptor:

‘And why would we want to allow that?’ Anaiya said finally, in a dangerous voice. ‘We didn’t come all this way to talk to Elaida.’ She was a farmwife with a cleaver hidden behind her back and a mind to use it, now. (Page 395)

And three more lines I liked, for good measure:

  • The steps that led to the throne were as delicate as any court dance, and if the dance sometimes came to resemble a tavern brawl, you still had to make your steps with grace and precision in order to gain your goal. (Page 271)
  • They were generally accounted a thieving, unlettered lot who only bathed by accident, when they had to wade a stream. (Page 396)
  • She was not afraid. She was a skin stuffed to bursting with terror. (Page 495)

And something I started to do part way through book 10 was to highlight interesting words. Being a bit of a logophile, I like interesting words. (Yes, I once highlighted great words in a dictionary). Definitions are from Wordnik.

  • pomander – A mixture of aromatic substances enclosed in a bag or box as a protection against odor or infection, formerly worn on one’s person but now usually placed in a dresser drawer or closet.
  • ruction – A riotous disturbance; a noisy quarrel.
  • voluble – Marked by a ready flow of speech; fluent.
  • nimbus -A radiant light that appears usually in the form of a circle or halo about or over the head in the representation of a god, demigod, saint, or sacred person such as a king or an emperor.
  • lading – The act of loading.
  • inured -To habituate to something undesirable, especially by prolonged subjection; accustom: “Though the food became no more palatable, he soon became sufficiently inured to it” ( John Barth).
  • sibilant – Of, characterized by, or producing a hissing sound
  • languorous – lacking energy, spirit, liveliness or vitality
  • vulpine – Of, resembling, or characteristic of a fox.
  • avarice – Immoderate desire for wealth; cupidity.

Unfortunately, my love of words doesn’t help me beat my wife at Scrabble. I still get utterly decimated.

Fighting Paralysis

I’ve hit the difficult spot in my story.

I believe I know what is wrong with it, but I am not quite sure how to fix it yet. And the change seems so big that it results in a fear-like response. It is too big a problem to fix, my brain says, shying away from the task. The worry expands and grows: have I changed that character’s motivations earlier in my revision? What is the timing of the different scenes, and can I fit them together?

It’s an irrational fear. I know I can work through the problems, however it feels like I’m at the base of Mt Everest and have one gigantic, massive mountain to climb.

I can’t let paralysis win. I can’t let it chase me away or stop me dead. I need to choose the fight response (and not flight or freeze).