« Boskone 2007 Recap | Main | The New Comprehensible, or, This is Not a Literary Manifesto, Thank God »

February 19, 2007

Hitting the Target

The Gender Genie is a Web site which purports to be able to guess from a text (preferably of more than 500 words) whether the writer of the text is male or female (some algorithm is involved). Well, I was curious how "The Sagan Diary," which is "written" by a woman, reads to this algorithm, so I fed in the text. The response:

The Gender Genie thinks the author of this passage is: female!

Just to be sure to it doesn't think I'm natively girly, however, I also fed it the first chapter of The Android's Dream, in which, as you know, someone farts someone else to death. The result: The algorithm believes the author of that passage is male.

I'm authorially hermaphroditic! Cool.

Posted by john at February 19, 2007 04:18 PM

Trackback Pings

TrackBack URL for this entry:


KevinQ | February 19, 2007 04:36 PM

Well done. I know some authors say that writing in the voice of another gender can be difficult. Fooling a computer isn't the same as convincing another human being, but past familiarity with your writing leaves me with little doubt that you were able to pull it off.

Well done.


Kate | February 19, 2007 04:50 PM

I'm really confused. Any sort of 'soap box' post on my site, and I come back as a male writer, but any time I'm talking about Valentine's Day or Dunkin Donuts, I'm a woman.


In a quick test of 10 posts, 7 came out male oriented. I swear to God, the last time I looked, I didn't have a penis.

cephyn | February 19, 2007 04:55 PM

John, did you actively try to make TSD sound like a female's writing, and TAD sound like a male's? Was there any conscious effort at all to do that? I'm just curious.

John Scalzi | February 19, 2007 04:55 PM


"I swear to God, the last time I looked, I didn't have a penis."

'm going to take your word for that, Kate.

Clearly, one ought not take this algorithm too seriously.


Well, in the case of TAD, I was writing as me, and I'm male. In the case of TSD, I was trying to write a first-person account from the point of view of a character who among many other qualities she possesses, is also a woman.

Steve Nagy | February 19, 2007 05:00 PM

Pretty interesting. And accurate for the most part. I tested sections from my WIP, where different chapters are told from a different character viewpoint, one male, one female, and it accurately pegged the "writer" as male and female where the viewpoint shifted. So label me authorially hermaphroditic as well. :-)

Chang, father of pangolins | February 19, 2007 05:01 PM

Niiiiicceee. I think it's a highly admirable trait to be able to write in the voice of the opposite gender. I'm eager to make sure my female characters ring true and aren't just male characters with breasts.

John H | February 19, 2007 05:04 PM

Not sure if using the first chapter of TAD is a fair test - I would suspect the mere presence of the word 'fart' would skew the results...

James | February 19, 2007 05:12 PM

Don't believe Kate. (S)he plays video games, reads science fiction, shoots firearms, contemplates a zombie armageddon, and generally gives most men a run for their money in the "manly" category.


Unfortunately for me, my time-travel/multiverse piece consistently tests female (told third person, limited omniscient), while my blog posts test consistently male.

If you look at the bottom of your results, it gives you a keyword index that gives some insight into the scoring procedure. I don't know that I agree with it.

Female words seem to include: Past tenses, future predictive (should, could, would), interrogative key words, and personal pronouns (me, myself, hers, yours). Male words seem to include: the bulk of prepositions that describe location, direct verbs (is, are), adjectives defining quantity.

So we can conclude from this that women are generally quick to bring up the past, quick to nag (you SHOULD/COULD do this; WOULD you do this), and inherently selfish (personal pronouns). Men are direct, concerned with defining exactly what you're talking about, and insensitive.

That sound about right?

Mary | February 19, 2007 05:22 PM

I tested that hypothesis. I looked for the first chapter of "Good in Bed" by Jennifer Weiner, whose work is usually classified as "chick-lit". I had a hell of a time registering any chunk of her writing as female, to begin with, but finally got the Genie to get her gender right with this:

I had met Bruce Guberman at a party, in what felt like a scene from somebody else’s life. I’d never actually met a guy at a social gathering who’d been so taken with me that he actually asked me for a date on the spot. My typical m.o. is to wear down their resistance with my wit, my charm, and usually a home-cooked dinner starring kosher chicken with garlic and rosemary. Bruce did not require a chicken. Bruce was easy.

I was stationed in the corner of the living room, where I had a good view of the room, plus easy access to the hot artichoke dip. I was doing my imitation of my mother’s life partner Tanya trying to eat an Alaskan king crab leg with her arm in a sling. So the first time I saw Bruce, I had one of my arms jammed against my chest, sling-style, and my mouth wide open and my neck twisted at a particularly grotesque angle as I tried to suck the imaginary meat out of the imaginary claw. I was just getting to the part where I accidentally jammed the crab leg into my right nostril, and I think there might have been hot artichoke dip on my cheek. My friends were pretty much speechless with laughter, when Bruce walked up. He was tall, and tanned, with a goatee and a dirty-blond ponytail, and soft brown eyes.

I tested this repeatedly by changing keywords such as "chicken", "party" and "crab" to "fart", but the Genie didn't switch back to male again.

Another beautiful theory slain by ugly facts. Sorry.

Mary | February 19, 2007 05:23 PM

Whoops! There should have been two italicized paragraphs there.

Matt Ruff | February 19, 2007 05:35 PM

Based on sample chapters from Set This House in Order, I also appear to be an authorial hermaphrodite. While it's tempting to ascribe this to the fact that it's an MPD novel, I think the real explanation is that I use an almost equal number of "male" and "female" keywords, so that the gender of a particular passage becomes a matter of luck.

BTW, I'm more than a bit puzzled as to why the words "the" and "a" are considered masculine. Do women not use articles in their fiction?

Bruce Cohen, SpeakerToManagers | February 19, 2007 06:10 PM

Do women not use articles in their fiction?

That can't be correct. Kate very clearly said WTF in her post.

Matt Ruff | February 19, 2007 06:52 PM

Kate very clearly said WTF in her post.

Yes, but that was non-fiction...

Steve Buchheit | February 19, 2007 06:52 PM

Huhn, that's interesting. I tried six "finished" and two unfinish stories, divided equally between my SF and F writing. For my SF writing it says I'm male (not that I need external validation). But for my fantasy writing, it rates me as female. What's up with that?

Matt Ruff | February 19, 2007 06:53 PM

Kate very clearly said WTF in her post.

Yes, but that was non-fiction...

Kate | February 19, 2007 07:37 PM

Yes, but according to this stupid male and female translation now, the fiction story I just posted is written in male flare as well. Perhaps this program is the clear example of what is fundamentally wrong with trying to ascertain what a woman is really thinking to begin with.

Kill me now.

P.S. James is a cakeass for implying that I am a man. I clearly have two bazongas and a bajingo.

Elyse Grasso | February 19, 2007 08:26 PM

I tried it on 3 chunks of my recent fiction, 3 blogs posts and 2 chapters from some old projects. Everything came up male except one of the blog posts, and even those results were weird: the blog post about cooking came up male, and the post about coding an html to plaintext filter came up female.

I blame excessive geekiness. It's probably just as well I write male protagonists when even writing about my own life comes out 'male'.

fastfinge | February 19, 2007 09:33 PM

Did some testing of this with gutenberg texts. Seems this isn't accurate for older texts; most Victorian writing seems to come out female.

James | February 19, 2007 09:49 PM

Kate - I think using urban slang just reinforces that your posts are written by your inner man. Embrace your spiritual johnson.

Justine Larbalestier | February 19, 2007 09:56 PM

I'm very unimpressed with it. As many of you have discovered if what you feed is about boys it thinks the author is one; and if it's about girls you are a girl.

It claims to work better for longer pieces of at least 500 words or more so I fed it whole novels (hey, it beats writing them), but still got the same results.

CmdrSue | February 19, 2007 10:46 PM

If I'd had to guess before using the Genie I would have said that my writing tended towards the masculine. I quickly proved that with some blog posts and fiction. And then some more. And then some more... So I got paranoid and dug out some stuff I wrote in the romance genre. Ahhhh! So I CAN think like a girl. Good.

Because otherwise I was going to have to go reprogram the Genie with an axe.

Come on, I used the word "with." I get girl points for that.

Carl V. | February 20, 2007 12:30 AM

Well then....wouldn't you be fun on dates?!?!?

Nick Stump | February 20, 2007 01:17 AM

I'd like a bajingo with a side salad and a Diet Coke. No dressing on the bajingo.

Nick Stump | February 20, 2007 01:35 AM

I just had to try the thing. Turns out I'm 56 year old waitress living in Midland, Texas.

Thanks a lot, John. I'm not sure how I'm gonna explain this to my wife.

Steve Buchheit | February 20, 2007 08:48 AM

Justine Larbalestier, I'm not so sure your "feed it boys it'll think your a boy..." theory works. I fed it about 1000 words of two guys talking about hunting and setting up the fantasy/horror story and it came back as "Female."

ship | February 20, 2007 09:24 AM

i pasted in 1064 words from a chapter and apparently my writing is male. this is good, considering the character telling the story is male

Justine Larbalestier | February 20, 2007 09:41 AM

Steve Buchheit: I fed it about 1000 words of two guys talking about hunting and setting up the fantasy/horror story and it came back as "Female."

Okay, it's algorithms make no sense at all then.

Gotta say that makes me happy as I really don't believe there is a "female" or "male" way to write.

Ray | February 20, 2007 09:52 AM

I pasted the entire Oxford 2007 dictionary and it told me to quit acting like a child and to go fsck myself....
SO on that note...
serv1-nicc-lab#./tear_drop -FSCK -U


John H | February 20, 2007 09:57 AM

Mary: I tested this repeatedly by changing keywords such as "chicken", "party" and "crab" to "fart"

Did it improve the story? Bruce did not require a fart. Bruce was easy.

Steve Buchheit | February 20, 2007 10:00 AM

While the toy is fun to play with, I think there's an uber-discussion to be had here, does it matter (male of female writer) and if it does, why can it so often be faked (women writing as men, men writing as women)? How can one fake it well? What does lead to believability of the voice? Can it be distilled as these types of algorithms would lead us to believe, or is it still an art?

Or am I just suffering from lack of caffeine?

Ray | February 20, 2007 10:01 AM

But seriously.
Im impressed that someone would spend god knows how much time figuring out the algorithm to determine if authors are male or female.


John H | February 20, 2007 10:04 AM

Since Mary decided to test it by replacing certain words of Jennifer Weiner's with the word 'fart', I thought, "What would happen if you changed all the words to 'fart'?" So I plugged in the word 'fart' 330 times, and...

It was confounded.

So apparently, the word 'fart' has absolutely no bearing on its analysis - I stand corrected...

ship | February 20, 2007 10:08 AM

"does it matter (male of female writer) and if it does, why can it so often be faked (women writing as men, men writing as women)?"

i don't know how much faith i put in this algorithm, it's basing the decision on male of female using keywords. what matters most is that a good writer will use the correct voice, depending on whether that voice is male or female, and convince the reader. i've seen poor male authors fail miserably writing a woman's voice, and vice versa.

Bruce Cohen (SpeakerToManagers) | February 20, 2007 10:15 AM

Yes, but that was non-fiction...
As if anything on this blog could be other than fiction!

Steve Buchheit | February 20, 2007 10:18 AM

Ship, I guess I'm not talking about the algorithm, but live human readers. As has been shown on this (and other) blog(s), this algorithm really can't tell the author's sex from the text (at least for fiction, I haven't seen much non-fiction results run through it).

A.R.Yngve | February 20, 2007 10:22 AM

Has anyone fed the program a sample from a standard Romance novel?

Matt Ruff | February 20, 2007 10:51 AM

While the toy is fun to play with, I think there's an uber-discussion to be had here, does it matter (male of female writer) and if it does, why can it so often be faked (women writing as men, men writing as women)?

I think there's another uber-discussion to be had, about how the toy's underlying algorithm actually works, and whether our responses to it are an example of the Eliza effect.

Wouldn't it be funny if this business about keywords was just a dodge, and it was actually determining the maleness or femaleness of texts by flipping a digital coin?

John H | February 20, 2007 11:00 AM

Well, it gives you the reason for deciding which way it picks. It produces its result by weighing specific keywords (giving some words more weight than others) and adding up the scores. It even highlights the keywords in the text...

Justine Larbalestier | February 20, 2007 12:16 PM

Matt Ruff: Wouldn't it be funny if this business about keywords was just a dodge, and it was actually determining the maleness or femaleness of texts by flipping a digital coin?

It'd prolly be more accurate that way.

Carol Elaine | February 20, 2007 12:59 PM

In 2003 the Gender Genie said I was authorially hermaphroditic as well. Today I tried it with text from four recent entries. Guess what? Again, two entries read as female and two as male. I'm still authorially hermaphroditic.

Steve Buchheit | February 20, 2007 01:15 PM

Matt Ruff: Wouldn't it be funny if this business about keywords was just a dodge, and it was actually determining the maleness or femaleness of texts by flipping a digital coin?

Easy enough to test. Resubmit the same text different times and see if the scores change.

Dr. Phil | February 20, 2007 01:58 PM

Interesting. I fed it 3 stories.

(1) A story about a man who becomes a machine. Male, but nearly even.

(2) A story about a lesbian trying to get a first date on a military starship. Female.

(3) A story about someone very much like me whose pile of boxes from my office accidentally collapse into something like a black hole. Decidedly male.

As a parlor game, it definitely has some amusement value. Might be useful if one was writing for a different market or trying for a particular voice -- as these three stories did.

Dr. Phil

Tim Morris | February 20, 2007 03:28 PM

Interesting. I fed it two chunks of non-fiction from statements of facts for briefs in criminal cases and two frgements of fiction backstory for a story I've been playing with for a while.

The non-fiction was solidly female, the fiction male.

I'm male, by the way.

Nick Stump | February 20, 2007 04:38 PM

I'm told I write women well--at least in screenplays. I once did a writer-for-hire adaptation of Lee Smith's, "Saving Grace". Lee liked the way I wrote the women characters, and her kind comments meant a lot to me.

My wife, the real writer in the house, has a theory. She thinks men from homes where the father was absent much of the time spend their formative years listening to women more than men and therefore are better able to write in a woman's voice better than we might think. I don't know if she has anything there or not, but it's an interesting idea.

Matt Ruff | February 20, 2007 07:39 PM

Just discovered another fun game you can play with this thing: check the 'nads of your favorite historical document!

Magna Carta*: female.
Declaration of Independence: male.
U.S. Constitution: female.
Gettysburg address & Emancipation proclamation: double-Y chromo male.
Preamble to the new Iraqi Constitution**: more manly than the D.o.I., but Lincoln would make it his prison bitch.

*English translation from the British Library
**English translation from Wikipedia

Metal Fatigue | February 20, 2007 09:56 PM

Steve: The right way to do it "randomly" would be to run the text through a strong hash function such as MD5, then use the value of the least significant bit to determine gender. That way the same document always returns the same result, but results over the universe of possible documents are random. Input canonicalization would be key, of course, so that it wouldn't be confused by changes in spacing, punctuation and such.

It is a sign of how much work I ought to be doing right now that I am already writing this program in my head.

Luke | February 23, 2007 02:52 PM

Yeah, but that would be really unstable. Like if you added a space at the end, bam it could switch. Gotta be a little more subtle than that...

Post a comment.

Comments are moderated to stop spam; if your comment goes into moderation, it may take a couple of hours to be released. Please read this for my comment moderation policies.
Preview will not show paragraph breaks. Trust me, they're there.
The proprietor generally responds to commenters in kind. If you're polite, he'll be polite. If you're a jackass, he'll be a jackass. If you are ignorant, he may correct you.
When in doubt, read the comment thread rules.

Remember Me?

(you may use HTML tags for style)