I didn’t do as much literature survey on this as I’d’ve wanted, but I came across this paper [pdf]. Word frequencies are different among men and women, apparently. That’s the basis of disambiguation. Women use more pronouns than men do, and the frequency compares with that of fiction, while that of men compares with nonfiction.
So I guess it should work like this: identify genre of the piece, and then identify gender.