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.


Fitness, Fatness; what matters for diseases like heart disease?

I’ve been reading the rather excellent [junk food science](http://junkfoodscience.blogspot.com/) blog recently, and I’ve found it really interesting. The author shares some of the big research into obesity and nutrition. What’s really interesting is that many of the guidelines we hear on a regular basis seem to have no scientific credibility. And I don’t mean things that sound outlandish, like diets composed entirely of cranberries and algae smoothies, but really straightforward, everyone-believes this stuff. Things like;

– being overweight causes heart disease.
– eating fruits and vegetables is good for you.
– reducing your fat intake is healthy.

What’s interesting is how little is shown to be true by actual respectable science. In [this article](http://junkfoodscience.blogspot.com/2007/10/junkfood-science-exclusive-big-one.html), the author considers the results of the Women’s Health Initiative (WHI) Dietary Modification Trial. This trial was a study of nearly 50,000 postmenopausal women; some ate a ‘healthy diet’ high in fruit, vegetables, fibre, and whole grains, and low in fat. The control group ate whatever they felt like. The women were on the study for eight years, and at the end they were tested for heart disease, weight, cancers, etc. Here’s what the study found;

Cardiovascular disease:

> “a dietary intervention that reduced total fat intake and increased intakes of vegetables, fruits, and grains did not significantly reduce the risk of CHD, stroke, or CVD in postmenopausal women.”

Breast cancer:

> “We found no evidence that lower intake of total fat or specific major types of fat was associated with a decreased risk of breast cancer.”

Colon and rectal cancer:

> “a low-fat dietary pattern intervention did not reduce the risk of colorectal cancer in postmenopausal women during 8.1 years of follow-up.”

Body Weight:

> The women following a “healthy” diet for eight years didn’t end up thinner. They lost a bit at the beginning, but had regained it back years before the end of the trial, despite continued restrained eating and eating fewer calories (361 kcal/day less than they had been at the start of the study). During the last years of the trial and at the end, the researchers found an insignificant difference in weight changes between the intervention and control group of a mere 0.7 kg. They concluded:

>> “A low-fat eating pattern does not result in weight gain in postmenopausal women.”

Which is pretty amazing. Women on eight years of a recommended healthy diet were just as likely to get heart disease, clogged arteries, strokes, or three kinds of cancer, and were no thinner than the women who ate whatever they fancied.

A similar [study of male veterans](http://junkfoodscience.blogspot.com/2009/06/paradoxes-compel-us-to-think.html) found similar things. They followed about 1,000 men who were healthy in 1987, and followed up in 2004. By then, 208 had died. The overweight men in the study had a 34% better survivability than normal [BMI](http://en.wikipedia.org/wiki/Body_mass_index), whereas obese men had a 44% better chance of being alive.

That’s a fairly hefty foundation stone in a lot of the advice we see on how to live healthily. That being overweight leads to all manner of diseases and problems is heard so often that it’s incredible that it isn’t really backed up by the literature. And if that isn’t credible, then all the smaller studies and claims, about foods being either Good or Bad (chocolate, red wine, antioxidants, dihydrogen monoxide, polyungiptomobes) are probably equally suspect.

It’s got me intrigued. Over the next little while, I’m going to try to find the real papers, the real studies, that have managed to show what really does, and does not, have a benefit.

So my first aim will be to find out what effect cardiovascular fitness has on heart disease. Does getting fit help you avoid heart disease?

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 Rise And Fall of Art Forms

Two things you should read; this [coilhouse post][ch] introducing [“The Decline of Fashion Photography”][art].

[ch]: http://coilhouse.net/2007/11/24/the-decline-of-fashion-photography/
[art]: http://www.slate.com/features/010510_fashion-slide-show/01.htm

The main article traces one art form from the fifties to the present-day in twenty-eight photos and comments. Her argument is that the form has descended from a heyday to a low point nowadays, with either too little art, or too little fashion.

In a wider sense, it’s interesting to consider whether art forms generally go through such rises and falls. This has to be quite focussed; I think arguing for a golden age of cinema, or of music, would be ridiculous; but arguing for the heydey of zombie explotation movies, or mod, or house music, that’s possible.

For me, the interesting question is around sci-fi short fiction. Recently, it’s been [argued][we] and [riffed on][al] that science fiction short story mags like [Analog][an] have been declining in circulation; does this mean that form of written, printed short fiction drawing to a close? Is it being transformed by the internet? free electronic distribution of magazines like [hub][], reworking the form into [flash fiction][ff], and changing the medium by podcasting (eg [pseudopod][pp]) suggest the forms mutating rapidly and that the classic sub-10,000 word, printed paper story might well atrophy away. After all, while people might not be comfortable reading a whole book on a screen, they’ll read an awful lot of short pieces.

PS: I’d recommend [coilhouse][chm]; it’s a interesting art blog focussing on alt culture.

[we]: http://www.warrenellis.com/?p=5212
[chm]: http://www.coilhouse.net
[al]: http://www.hub-mag.co.uk/?p=11
[an]: http://www.analogsf.com/0712/issue_12.shtml
[pp]: http://pseudopod.org/
[ff]: http://www.365tomorrows.com/
[hub]: http://www.hub-mag.co.uk/

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.