A better spell checker

Somewhere between spell checking and grammar checking is a need for context-specific word checking. I’ve been doing a little writing on the soft keyboard of the iPhone and noticed that while the spell checker is great at correcting mis-spelled words, it is not good at helping you out with words within a certain context. Consider typing this;

Science diction

Now, that’s a single character incorrect; both words are spelled correctly, but so rarely occur together in English prose that we may suppose there is probably a spelling mistake here. Any mobile provider that gets this right will probably make these keyboards entirely workable. It may not be so relevant on full-sized keyboards, but these smaller keyboards have implicitly more mistakes. Much smaller keys combined with big fat thumbs makes this kind of mistake much more likely. In fact, I’ve done it four times this post;

Fill-sized keyboards
Big far thumbs
Done it twice this lost
Dome it three times this post
Done it four tomes this post

Awful. I can’t even wrote the list of my mistakes without making the same type of mistakes over and over.

Anyway, I think if this kind of correction could be built into a smartphone editor, it would lead to much faster typing. You would be able to slap in text much faster, not worrying so much about what you really typed, and have the editor figure out from a corpus of English text what you probably meant.


Creative writing on the iPhone followup – iUI

I just wrote about the problems of note taking on the iPhone and PC. It may not be as difficult as I previously thought. There is a great project called iUI on google code which makes it easy to roll your own iPhone-flavoured website. I got this very basic screen up and running within minutes. I may look into creating an Ajax app using iUI, jQuery, markdown, and WMD

Using speech synthesis to improve your writing

I’ve just discovered a fancy-pants new way of helping me with my fiction, and I thought I’d share. The idea is to use a speech synthesiser to listen to parts of your writing. By listening, you hear problems that aren’t so obvious on the page.

I recently bought a copy of [Cepstral’s][cepstral] text-to-speech software, buying one of their voices for $30. This lets you do some very nice things. Originally I just intended to listen to web pages using the [Click, Speak][] firefox extension. Rather nice; visit a web page, choose ‘speak selection’ from a menu, and hear the web page. Neato.

But I’ve found it more useful when editing fiction. Select a sentence or paragraph and have it spoken back to you. As you listen, awkward phrases will jump out at you. Sentences that flow badly become more obvious. Good writing seems satisfying when you hear it read out.

So how can you go about it? Well, [Cepstral][] do a free demo download of their voices. I’m using Cepstral Alison. Cepstral do their own text editor called _swifttalker_. Just cut and pastie text into the editor and click the play button. Until you buy it comes with a prefixed message about licenced, but if you purchase it’ll go away.

If you are more technically inclined, and are comfortable writing scripts for your word processor (say, macros for MS Word, or python for [Sublime Text][st], or lisp programs for [emacs][]) then you can use the `swift.exe` program that comes with a Cepstral voice, piping selected text into the executable. That’s what I’m doing, and it’s great.

[cepstral]: http://cepstral.com/
[Click, Speak]: http://clickspeak.clcworld.net/
[st]: http://www.sublimetext.com
[emacs]: http://www.emacswiki.org

The Amazing Expanding Sentence

I’ve been thinking about writing software for a while now; first [Ariadne][], and then several little projects.

One that’s been at the back of my mind, not fully developed but nagging me, is the idea I’ve come to label **The Amazing Expanding Sentence.**

Here’s the idea. Let’s say you’re a writer and you want to write a novel. You start of with a single sentence

A wonderful tale of a rebel who overturns
an evil empire.

Well, that sounds pretty cool. So we want to expand that sentence. Somehow (and this, of course, is the trick I’m looking for) we ‘overwrite’ this sentence with two or more sentneces.

We meet Jake, a folk singer, who has a
dead-end job. He learns a terrible secret
about a senator about to become president.
He runs across America, and finally corners
the senator in his Volcano base.

Well, you get the idea. The first sentence has expanded, but the old one is there. You keep expanding, hopefully until you’ve detailed the whole story, moving through one-line summary, synopsis, treatment, chapter summary, scene summary, and novel.

There is probably some horrific flaw to the whole idea.

[Ariadne]: http://www.getariadne.com

Automatic Word Counts in MS Word

I’m writing fiction at the moment. Which of course means I’m wasting time fiddling with formatting in Word.

A neat manuscript [requires a word count](http://www.cs.cmu.edu/~mslee/format.html) on the first page. MS Word will give you a neat word count if you try the `Insert` menu, then `Field…`, choose `NumWords`, and hit OK.

It’s fine, as far as it goes, but it’s very precise; it gives you a count that looks a little too autistic; ‘7672 words’. What you’d rather see is an approximation to, say, 100 words. Something more like ‘7700 words’. It’s fiddly, but you can do it. Save this off in a template somewhere and you’ll have automatic, neat wordcounting for ever after.

1. use `Insert` | `Field…`
2. Click the ‘Formula’ button
3. Type what follows and hit OK.

`= round ( 666 / 100 , 0) * 100`

You should see ‘700’ displayed as the approximate word count. This is 666 rounded to the nearest hundred. Change `100` to `1000` in the line above to round to the nearest thousand. To get your story’s count…

4. Right-click the number 700 and choose ‘Toggle Field Codes’
5. Select the number `666`
6. Hit ctrl-F9. The number now reads **{** 666 **}**
7. Delete `666` and type `NumWords` instead.

**{** = round ( **{** NumWords **}** / 100 , 0) * 100 **}**`

8. Right-click the grey field and choose ‘Update Field’
9. Voila! A neat wordcount, rounded to the nearest 100 words, and always up-to-date. The awesome power of a computer, neatly rounded.