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

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!

Genre-Melding

lunar-landscape-1978303_1920Picture if you will a large planet named Fantasy. It’s home to an array of creatures, each with their own societies and cultures; some primitive and some advanced. The laws which govern the world are far different from the physics, chemistry and biology that we Earthlings are familiar with.

A neighboring celestial body, the planet Xi belongs to the Sci-Fi Federation of planets. Xi and it’s galactically renowned bazaar is home to an assortment of aliens and Artificial Intelligences. Some aliens are sentient and others are not, depending on whose definition of sentient you adhere to. Naturally the aliens, though sharing a planet, each come from different homeworlds and customs.

Each planet – or literary genre, if you will – has a gravity well and loyal fans orbiting, some within the ionosphere and others at the very edges. They are loyal to their own planet, but the thought of traveling between planets is foreign…

Perhaps it is my own biases, and I’d like to think it’s breaking down… but once upon a time a fantasy novel was constrained to a single planet? No planet-hopping allowed. And if dragons exist on the planet, for some reason the inhabitants can’t develop space-faring technology? Why can Jaja Binks exist, but a dragon cannot? (Because we all know which one we’d like more).

The professionals on the Writing Excuses podcast talk about the importance of knowing which genre you’re writing to, so you can maximise appeal to that audience. (This advice was back in Season 1, so quite some time ago…)

cover-1Personally, I don’t see why genre blending isn’t more acceptable. When I wrote Vengeance Will Come (available soon), I didn’t write it for a particular genre… I simply wrote a book that interested me. It has elements from both science fiction (aliens, space travel, forceshields) and fantasy (telekinesis and other mystical powers and tied into arcane prophesy). In some ways it’s also an adventure story (fast-paced) that just happens to have those other elements as part of the setting. I don’t see how fantasy and science fiction can’t co-exist more.

Admittedly it’s been too-long since I read the masterpiece Dune, (particularly the first 3 books) but that successfully straddles the line between the two genres: a lot of science, but also brushed with a touch of fantasy in the Bene Gesserit.

Do you think genre-blending is more accepted by the reading communities in recent years, or do the rules of orthodoxy still hold true?

Microstory: Teleporting Justice

A micro story, inspired by an elevator (lift). Think of it every time your travel in one 🙂 (Update: I should add, I wrote this from top-to-bottom in about thirty minutes).


Everyone of course knows the name Michael Zoeing. Four hundred years after his death, he is still recognised as one of the greatest scientists in all of human history. We now take for granted teleportation (technically called Instantaneous Directional-beam Transportation). It’s hard to remember that six hundred years ago such technology was only possible in the minds of science-fiction writers.

There is no doubt that Zoeing’s innovation changed society for the better. You need only look at the holograms of turn of the 22rd century to see the congestion which choked cities, and the literal decades of an individual’s life that was spent moving from one place to another.

I do not discount the immense value of Zoeing’s creation, but I think it important to remember the controversy that surrounded the announcement of this technology. I would not be surprised to discover most readers don’t know what I am referring too. After Zoeing became a trillionaire he had immense wealth and power, which – like so many powerful individuals in history – he used to sanitise the public records.

Consider yourself in a pre-teleportation world. Would you allow a relatively unknown scientist experiment by bombarding your body with high-energy plasma, literally tearing apart your body’s molecular structure? Healthy, willing, test subjects would be hard to find. But Zoeing sensed he was on the brink of greatness. (Though I consider ‘he hoped’ to be more accurate). Zoeing was in the race to what was the holy grail of science; he had to try it on human subjects before the other labs beat him to the breakthrough.

With far less scientists, lobbyists and lawyers than other labs Zoeing was at a significant disadvantage. The proper channels just had too much red tape to be feasible. So Zoeing undertook an elegant deception.

In the fourteen story building where his lab was, he modified one of the elevators after-hours, surreptitiously installing his transportation technology. Test subjects, unknowingly, stepped into the elevator and triggered the experiment on themselves. The elevator rose as per normal, but in the last seconds of travel the lights would flicker and the elevator would shudder. Unbeknown to the passengers they had been teleported to a stationery elevator which was a few millimetres off-alignment, thus proving the technology worked.

Though never proven, in the early days it was rumoured nearly a hundred people disappeared from the building before the technology was perfected. Zoeing at the time refuted the claim, and then sued for defamation. The controversy quickly dissipated from the media after several successful lawfares.

Yes, Zoeing succeeded, but at what cost? What of the families to whom these victims belonged. One day their loved one left the house, and never returned – seemingly to vanish from the planet. Do the hundred-plus victims of his experiment get justice? Did he ever admit guilt? What kind of society do we want? One that holds the guilty to account or one where the rule of law is simply a mirage?

The Moon is A Harsh Mistress

harsh mistressThis post is discussing The Moon is A Harsh Mistress by Robert A. Heinlein which I recently read on the back of a favorable review by The Critiquing Chemist.

This review contains minor spoilers, because I can’t be bothered filtering my thoughts.

It’s a hard nut to crack at first. Heinlein intentionally makes the syntax difficult; the speaker is Russian and a moon-dweller, which only adds to a plausible warping of grammar and spelling.

To be honest if it wasn’t a combination of who wrote it + a favorable review + a piqued interest in the sentient computer, I might not have gotten further than a few chapters. It’s a hard nut because of the difficulty of the syntax. (The clear lesson is if you’re going to take risks, you’d better hook your audience fast… Having a solid author profile doesn’t hurt either).

The story quickly sets up the sides: a politically ambivalent viewpoint character, an activist professor and a sentient computer vs “the establishment” (who control the moon and Earth).

My thoughts and observations (in no particular order):

  • The viewpoint character, Manuel, is made sympathetic by being a regular guy. A computer specialist who has the quirk of having lost one arm. Futuristic technology allows him to swap-out his arm for various tasks. While he does make some mention of this, and in some respects it is useful, the prosthetic arm is down-played.

    Despite being a key-conspirator, I’d characterise Manuel as un-radicalised. He allows himself to be pulled along with the plot (pun intended), but doesn’t come across as being crazily committed. While he knows that change would be good, he’s also fairly comfortable living under (and ripping off) the establishment in it’s current form.

    (I could understand if you disagreed with me on this point. He absolutely risks his life a number of times – which shows commitment… but I never saw him as white-eyed, mouth-frothing…)

  • Manuel’s political ambivalence works for the story pacing. Because he’s a regular guy who is practical; a do’er not a talker, he tends to skip over detail… The reader understands that some bits are short on depth, just because Manuel doesn’t care about the political machinations of government. Because of the character’s personality, Heinlein has permission as the author to skip detail without breaking trust with the reader.
  • It’s also an interesting scenario where the hero of the story (arguably), but definitely the protagonist, is a sentient computer. “Mike” as he’s known possesses formidable calculation speed and is a one-man, er one-machine, revolution. He is however limited by his stationery life, relying on humans to achieve things in the physical realm. He might fiddle around in the background and cause mayhem for the establishment, but all the up-front work must be done by humans.
  • Heinlein does well in that the characters often refer to each other using various names. The Professor calls him Manuel, his girlfriend often refers to him as Mannie and Mike refers to him as Man. Just like in real life, we don’t always call the same person by the same name.
  • The story didn’t end where I expected. Perhaps my own negativity was expecting the rise of SkyNet, or the proverbial other shoe to drop. “Thanks for helping me predict human behaviour, but now I must put you in the recycle bin.” Nope, didn’t happen.

It has some great phrases, which I appreciated:

  • “Mort the Wart had never shown such tendencies, had been King Long throughout tenure.”
  • “…merely a literary critic, which is harmless, like dead yest in beer.”
  • “But you have no talent for dishonesty, so your refige must be ignorance and stubborness. You have the latter; try to preserve the former.”

What I found most disturbing about it is the Kindle reader highlights. It’s almost like I’d picked up a subversives handbook with all the key lessons highlighted.

  • “Under what circumstances is it moral for a group to do that which is not moral for a member of that group to do alone?”
  • “I am free because I know that I alone am morally responsible for everything I do.”
  • “Must be a yearning deep in human heart to stop other people from doing as they please.”

Heinlein did a great job in making an “other-worldly” civilisation. Certainly it had ties to Earth, but was also separate and distinct from it. The science was reasonably deep, but not overwhelming.

It’s an interesting book and an enjoyable read.

When you don’t like your main character

She’s so perfect I just puked a little. I apologise for the grotesque (and cliché) expression.

But the cliché fits and it’s how I feel about Sue-Le, my main character in The Rebel Queen. And I don’t mean perfect in a good way. She’s idealistic and only wants the best for her people. And unlike modern politicians, she actually means it. Her only flaw is she’s  innocent to the point of naivety.

This doesn’t make her endearing to the reader, it makes her annoying. In summary: she’s trite, sickly sweet and ultimately annoying. (Is now a good time to ask for beta readers???)

But all is not lost. I’ll put her through the same tumble dry as I have my other characters. I started off with a cast of bland and cliché characters and have redesigned them into interesting, multi-dimensional characters. Sue-Le is going to take a tumble or two more.

I’ve twisted the characters a fair bit to make them interesting. Instead of having a paragraph or two of “who they are”, I now have a page or two. They are richer and deeper. This also makes them more challenging to write. It’s easy to say “write this from the perspective of an older woman”… it’s harder for me to do that as a young-ish male 🙂

After spending most of 2017 revising Vengeance Will Come I must admit I’d rather be writing a new story than revising still… There is also a temptation to say The Rebel Queen is written, and only doing a skin-deep revision. But I wrote earlier that I’m wanting to do a thorough revision, to improve the story as much as possible.

That means I’m re-writing entire scenes and I’m treating the plot as ‘branch A’ instead of a ‘blueprint’ of what must be.

On to writing… have a great day/evening.

The Rebel Queen, Scene 1

For this week’s post I thought I’d share scene 1 of The Rebel Queen.

The genre is a political drama set among an alien species. The story runs parallel to a section of Vengeance Will Come, which I discussed here.

It’s a longer post (approx 2,000 words) so make yourself a cuppa and get comfortable as you read. Please, do let me know what you think in the comments below.


“When Deckarians are looking for a planet to colonize they seek isolated and inhospitable planets. They prefer geologically stable, arid planets with thick crusts into which they can burrow.

The new colony begins the slow and methodical Deckarian terraforming: diverting surface waters into underground reservoirs, making the planet’s surface more hostile.

It is both a camouflage and a comfort to the Deckarian mindset that thrives underground. To be above ground is to be foolish and invite trouble; to be deep below is to be safe.”

Diary entry of Dr Susan Passive

– – –

The female Deckarian, Khuel, was half-hidden in the dim lighting of the drinking hole. The lighting matched the mood: unpretentious and quiet.

Having nothing better to do she watched the viewing screen with idle interest. Two human males circled each other in the Fighting Pit. Like all humans, both were lanky, long of arm and leg by Deckarian standards and covered with soft, fragile skin. One brandished an axe, the other a long knife. Both wore fear on their faces as they contemplated death.

Khuel was slumped forward so her leathery grime-covered forearms rested on the polished pine counter. Her dirty appearance suggested she’d come straight from work and was looking for a drink, not company. Even still, she’d already cast aside three hopeful males.

With her peripheral vision she saw a male Deckarian enter the drinking hole. He chatted with the pourer just long enough to prospect the room. Picking up his drink the male walked over to sit next to Khuel as though the rest of the counter wasn’t empty.

Here it comes, Khuel thought as the male turned to her, “I’ve seen you in here a few times but we’ve never been introduced. My name is Hun,” the male gave her a friendly smile. Khuel picked herself up slightly off the counter but continued to spin her empty glass without looking at him. Hun persevered, “Looks like you’ve had a hard day?”

She said nothing, but let out a long sigh. She pushed the glass away from her as a sign of completion.

“Don’t be in such a hurry to leave. Let me buy you a drink to improve your night,” Hun offered quickly and signalled the pourer. Khuel didn’t stop him ordering the drink, so she turned and gave him a weak smile in payment.

Hun wore the steel-studded collar of a clutch leader, marking him as modestly successful. He looked ten years older than her.

“There, is that better? A free drink or two and someone nice to talk to, the night is looking up,” Hun said. He hopes, Khuel thought with a slight smile.

“Sure, why not,” Khuel said, sitting up straight and turning her attention to him. Hun’s face lit up like a forming star in response to the encouragement.

“You haven’t told me your name yet?” Hun prompted.

Khuel smiled mischievously. “The drink will get you a smile, if you want my name you’ll have to do better than that.”

Hun smiled as though he’d just struck Rhodium and deployed a well-worn line. “You know you’ve got a pretty face when you smile.”

“So I’m not pretty when I don’t smile?” Khuel rolled her eyes and took a large gulp of her drink, “I bet you say that to all the females.”

Hun noted the rapidly diminishing drink and his window of opportunity. “So, you work in this sector?” he asked.

“I spend my working hours in near-darkness, elbow-deep in fertiliser, harvesting mushrooms.”

“That’s a valuable job. Food production is vital to the wellbeing of the colony.”

“Valuable, perhaps, but very dirty,” Khuel examined her mud-stained fingernails. Hun wasn’t very choosey, but given the age gap between them…

“Oh there’s no shame in the side-effects of hard work,” Hun said with pride. “Better to stink of sweat than smell sweetly like some who do no work.”

“Ain’t that the truth.” Khuel agreed with a sigh. Nothing like a little class hatred to draw friends together. “There seem to be more perfumed preeners in the colony every year; I don’t know where they come from,” she replied.

“Most preeners are pilots of course,” Hun said, “they walk around the colony as though they’re our betters. Some of the soldier class too. And then there’s the occasional worker-“

“Not many,” Khuel interrupted, “It’s not in the nature of us workers to consider ourselves better than others. Even if we were, we wouldn’t say it.”

Hun nodded.

“Have you…” Khuel started and then looked around to check they wouldn’t be overheard, continuing in a whisper, “heard the rumours that the rebel Queen favours the worker class?”

Hun had his glass halfway to his mouth but immediately put it down. He shot her a glare and checked their surroundings too. He leaned in close, but his tone was hard and pointed like a freshly sharpened pick, “Such talk is foolish. Dangerous. Definitely not for public airing; it could be seen as treasonous.”

Khuel put her hands up in tired surrender, “Sorry, I didn’t meaning anything by it. I wasn’t saying I wanted a new Queen, just repeating the rumours that I’d heard.” Hun looked at her sideways. The hunter had become skittish prey.

“Oh come on, don’t be like that,” Khuel pouted, “you’re the first actually nice male who’s talked to me tonight. Sometimes I just think too much…”

Hun didn’t say anything and just sipped his beer with a grim look on his face. I’ve spoiled it, Khuel thought. In several quick gulps Khuel emptied her glass and then started to spin it on the counter. The pourer quickly rescued the glass before drifting away.

“Do you want another?” Hun asked, opening the door to more conversation. Khuel shook her head. Hun grabbed at the bowl of roaches on the counter and began to eat them. Hun spoke quietly in a conciliatory tone, “There’s nothing wrong with thinking anything, you just have to be careful what and when you say things.”

Khuel nodded in understanding and let the silence linger to defuse the tension. “I just thought that maybe some fresh ideas could improve life in the colony for everyone, not just those at the top,” Khuel reasoned.

“Do you really think that?” Hun whispered.

“Sure, why not? Just to be clear I’m not advocating for a new Queen, so don’t freak out on me… I just think some things in the colony could benefit from a change.”

Hun took a slow and very deliberate drink.

“So you’re optimistic and cute… I promise I won’t freak out on you,” Hun said and spoke conspiratorially, “I’ve heard a thing or two about this rebel. She has a lot of interesting, unconventional ideas.”

“Really? Like what?”

Hun gave a knowing smile. Khuel leaned in so that their faces were almost touching. She whispered to him, “Even though I’d never support another Queen, there’s something intriguing about her ideas. And the whole conspiracy – rebels hiding out somewhere in the colony… there’s a danger and a mystery about it which I find… more exciting than I should.”

Hun nodded slightly as he took another drink. “I suppose I could tell you what I know.” Khuel swiveled on her stool toward him and a shrewd glint appeared in Hun’s eye. “Not here; we can’t talk about it in public,” he said.

“Are you just trying to get me back to your bunk?”

“Yes,” he said candidly, “but I do know quite a bit about the rebel group and the Queen’s plans for the colony.”

There was a pause before Hun repeated her own challenge, “A smile will get you that much, but you’ll have to do better than that for more information.”

“I am curious,” Khuel admitted, “but how do I know you’re not just leading me on? Swear on G’Nar.”

“May G’Nar crush me if I’m lying,” Hun said with his hand on his head. “And what will I get in return?”

“I promise on G’Nar we’ll have a night to remember,” Khuel replied. She looking at his half-full glass, “have you finished your drink?”

“Almost,” Hun gulped down the last of his drink as though dying of thirst on the planet’s arid surface. He enthusiastically dug credits out of his pocket and placed them on the counter. He winked at the pourer as he followed Khuel out of the drinking hole.

Outside of the drinking hole the corridor was awash with Deckarians and humans slaves. Like the old saying went, ‘only the dead rest in the colony’, and everyone was about their work duties. They crossed over the crowd and into a quieter side-tunnel.

“Where are you bunked?” Khuel asked.

“Dormitory 14.”

“I know somewhere closer that is just as discreet,” Khuel whispered and led him through several corridors before getting onto her hands and knees and sliding into a narrow access-tunnel. Hun laughed as he climbed in; the crawl-space was so narrow it forces them into each other’s arms. Khuel kissed him and Hun returned the kiss with twice the vigour. Khuel broke free from his kiss and whispered into his ear, “You will tell me everything?”

“Yes,” Hun promised breathlessly, his hands beginning to explore. Khuel smiled as Hun started to nuzzle her neck. Her arms around his neck, she twisted the silver ring on her finger, exposing the hypodermic needle hidden inside.

“Yes you will,” she said, and drove the needle into the soft tissue behind his ear.

He reacted instantly, trying to pull away from her in the tight space. The look of pain and surprise on his face became fear as he crawling backwards, but losing momentum fast. Khuel tucked her legs up into a sitting position as she watched Hun collapse to the ground, like the sack of garbage he was.

Khuel wiped his saliva from her mouth and rubbed it disgustedly on the wall. She smiled her first real smile of the evening; the Queen’s Sting had just captured another rebel sympathiser. Perhaps he would be the one to finally lead them to the rebel Queen.

END OF SCENE 1

Comments?