back
42 comments
The biggest problem I have right now with this is "her". The 3rd person possessive and objective cases are identical for female ("her"), but different for male ("him" / "his").

So these 2 sentences flip "her" differently:

    It was created by her very quickly
    It was created by her very own child
I'm no NLP expert so if anyone has some ideas, please see this issue: https://github.com/Garrett-R/gender_bender/issues/2
Have you tried nltk’s part of speech tagging?
Experimented with SpaCy, didn't work too well, but will try nltk.
This doesn't "examine gender norms" it just creates a lot of non-sense per book like "She had to go to war like most women and like many ended up amputated and homeless"
Would love to hear more about why you call that nonsense.

I think that's a great example though. I'm male, and I think a common misconception is that gender equality is only for the benefit of females. But feminist issues effect everyone. Like women being allowed to join the workforce increased productivity which also benefited men from having cheaper products.

Or this example you point out, men are typically the ones being drafted into war or at least the ones serving on the front lines. I think that raises a lot of interesting questions too. Is that fair? Should women more often be included in drafts or mandatory service? Should women be included in the decisions to go to war? Would we have less wars if that were the case?

> Or this example you point out, men are typically the ones being drafted into war or at least the ones serving on the front lines. I think that raises a lot of interesting questions too. Is that fair? Should women more often be included in drafts or mandatory service? Should women be included in the decisions to go to war? Would we have less wars if that were the case?

I'd question - aside from medical needs, when should men and women not be treated the same?

Which is a round about way of saying, of course women should be drafted into war.

> Like women being allowed to join the workforce increased productivity which also benefited men from having cheaper products

It also nearly doubled the labour force without actually doubling the number of jobs available, which arguably resulted in the stagnation of wages to the point where dual incomes became necessary for families to maintain the same standard of living as they did decades ago.

There are advantages, but let's not pretend it has been some panacea. Dropping birth rates in the first world may largely be to do with women deferring pregnancy for career advancement.

> Should women more often be included in drafts or mandatory service?

War is war. The military needs to be distinct from other fields as it is not an experimental playground for egalitarianism, it is the profession of targeted death and destruction. Changes to the military have to be evaluated in the context of "what makes the most efficient military unit", not "what military unit represent everyone back home best". It's not a representational game, it's a crudely real necessity for the security of a country.

On that front, real study can show what makes a more cohesive unit. If adding women helps, do it. If it hurts, don't do it. Doing it to make a point may endanger real lives.

> Should women be included in the decisions to go to war?

Aren't they already? Plenty of female politicians, advisors, representatives. Of course they should be involved, but on their own merits and through their own career advancement, please. Trudeau-style arbitrary enforcement of representational quotas promises no guarantee of better decisionmaking.

> Would we have less wars if that were the case?

Do women have fewer interpersonal conflicts with their peers than men?

> War is war. The military needs to be distinct from other fields as it is not an experimental playground for egalitarianism, it is the profession of targeted death and destruction. Changes to the military have to be evaluated in the context of "what makes the most efficient military unit", not "what military unit represent everyone back home best". It's not a representational game, it's a crudely real necessity for the security of a country.

NASA used to have a requirement that astronauts had to have experience as military test pilots. The military said that test pilots could only be men. This meant that women could never become test pilots nor astronauts.

Then someone put a few women through the NASA tests and found they performed at the same level as men, and sometimes better than men.

Too often "let's be careful, we need to test this" is used as an excuse to continue discrimination even though that's objectively worse.

https://history.nasa.gov/printFriendly/flats.html

> Too often "let's be careful, we need to test this" is used as an excuse to continue discrimination even though that's objectively worse

You just said they tested it and they did fine. That's all I am asking for. I don't think your quoted statement logically follows from that at all.

I think it's pretty fair to say that the battlefield is a different situation even than being an astronaut and what works in one place may not work in all places.

> Do women have fewer interpersonal conflicts with their peers than men?

Perhaps not, but I believe women are more likely than men to resort to using words rather than physical violence during an interpersonal conflict.

Isn't the fact that you labeled this sentence as "non-sense," just because the sex of subject has changed, kind of suggesting that this can easily lead to a discussion on gender norms?
Well, that's still examining gender norms, isn't it? Like, Jabberwocky is nonsense but it is also examining what language is.
Why is that nonsense?
> Dawn Quixote

Not sure if this is intentional or not, but "Don" in this case isn't a name, but a title. Does the library attempt to determine whether a name that can also be a word is in fact used as a name in a given instance? (Not blaming it for getting this one wrong if it does, since it's a Spanish rather than English word)

Actually, that was intentional just to be funny. There are indeed many words which can sometimes be names (some months, some town names, I even know a woman who's birth name was America).

I let the user control which names are translated (and they select a name for each unique identified name) and allows the user to mark a suspected name as not a name. This is the `--interactive-naming` flag.

I added that after the first iteration and reading through an ePub on my Kobo and found tons of random proper nouns "flipped".

> I even know a woman who's birth name was America

I know an “Africa” and know of a “Madeinusa” (“made in U.S.A”, which she was not).

Sounds like the Miranda musical where one of the main characters is named "Usnavy" after the inscription on a ship..
Cool! I must not have seen that flag from my quick glance at the README
The whole gender issue has been very well covered and is now overrated.

Much more important is to get people (especially typical parochial Americans) to realize that there exist other human beings in other countries. Even the most sexist American male is aware of gender issues (even if he doesn't agree with them). But even "liberal", "soft-hearted" Americans don't much care or know about the life of someone in say Bangladesh or Indonesia.

So maybe you could also think of changing nationalities. E.g. change Anglo-American names to Bangladeshi or Indonesian ones.

> The whole gender issue has been very well covered and is now overrated.

> Much more important is to get people (especially typical parochial Americans) to realize that there exist other human beings in other countries.

That's extremely important, too! But I don't think that it means that sex and gender issues are no longer important (in code, language, or society in general).

> E.g. change Anglo-American names to Bangladeshi or Indonesian ones.

They would just be strange. SF is full of strange made up names. It's not interesting.

However "Ancillary justice" is very unusual and interesting read, where "her" sometimes means a man, because protagonist has trouble recognizing or caring about human gender.

Perhaps on a macro level gender issues have been covered at a surface level. However most people don't grasp how ingrained gender biases exist in everyday situations or in this case, literature. This is an interesting project to bring those more nuanced or subtle biases to light.
Everybody already knows about the missing tampons in the men's restroom. Tell me about the little kid's life I could have saved with five dollars.
> Tell me about the little kid's life I could have saved with five dollars.

I do not know where you got that estimate of $5 from.

Here are more credible estimates according to GiveWell (https://www.givewell.org/how-we-work/our-criteria/cost-effec...):

> As of November 2016, the median estimate of our top charities' cost-effectiveness ranged from ~$900 to ~$7,000 per equivalent life saved.

What does any of this mean?
I read it as a disdainful version of "instead of focusing on small-scale complaints about gender issues, why don't we focus on more important and large-scale issues like saving children's lives?"
Good point. Also learning about gender bias might also then translate to quicker understanding in terms of other biases, like biases the apu8812 is pointing out. People who tend to move towards a progressive attitude in one aspect (like sexism) tend to then adopt more progressive attitude in other social attitudes it seems.
That's an interesting point. I wonder to what extent it is a zero-sum game in terms of people's attention and capacity to care about problems. I wonder if there were less attention on the sexism problem in the US whether Americans would really turn to other problems or would their attention be caught by, say celebrity news or something useless. I suppose it's somewhere in the middle like most things.
It is interesting and close to some things I have been thinking about (vide http://p.migdal.pl/2017/09/30/dating-for-nerds-gender-differ...).

Did you try making some interactive version? I think this could be inspiring for a large audience.

Did you try using things like word2vec, to find word “analogies”? (They are often biased, like doctor - man + woman is nurse.) Comparing two “translations” could be interesting.

That would be interesting to try to add word2vec. I wonder if I was successful, and the analogies are biased like you mention, then the book would be flipped but still feel "normal".

So, "the nurse walked in and she said hi" would presumably get translated with word2vec to "the doctor walked in and he said hi".

That's not the effect I was going for, but it would be really interesting to compare the differences like you mention.

Could you perhaps make a simple but user-friendly website that lets people convert their epubs?
I have thought about that. I will do if there's demand since I would really love for people to be actually using this and right now only developers can use it.

Will require a bit of simple front end work. For example, translating an epub really needs to involve the user (which is currently available in the terminal) since it's very difficult to automatically translate names.

For example, "April" can be a month, a town name or a person's name. It needs flipping if it's a name, but not otherwise. Even context sometimes doesn't help: "We were worried about April."

Nice one! Original, sharp and funny.
Thanks, you should try reading one of the epub's, it's quite entertaining, and you some interesting assumptions that you may otherwise would have overlooked.
“If Ivan weren’t my son perhaps I’d be dating him”

Loved the examples, can’t wait to try it!

Great, and feel free to leave a comment if you do use it in some interesting way!
Excuse me, but this "flipping" business only further reinforces the idea of gender as a binary construct, which is problematic.
True, I was originally going to name it `gender_flipper`, but someone made the same point, so I called it `gender_bender`.

This way, the name will still make sense if the ability to go from gendered pronouns to genderless pronouns ("singular they" or "ze") is added. PRs are welcome!

For now, I just put "Flip gender" in the title of this HN post to more accurately reflect what the package does today.

Not sure if you're trolling but a tool which flips between two popular genders doesn't deny existence of other genders. Not everything related to gender has to be about the gender spectrum.
A k2+ gender version would be an interesting expansion on the idea though. Since the notion of a complementary or inverse gender isn't universal to all genders, maybe cases where there's no clear inverse the gender could be swapped with a randomly chosen gender. Or just swap any explicit gender reference with a different randomly chosen gender. This becomes a bit more challenging if you want to keep the output cohesive though, since you'd probably have to introduce some sort of entity linking scheme.

Another issue is finding an appropriate k for genders, assuming this package is implemented with some sort of hard coded gender mapping. This becomes more complex when accounting for different cultures, which probably just ends up multiplying k by m cultures.

Agreed, you can tackle one problem at a time. And I think progress on one might spread over to the other also.