Let's Talk About Sex!

Pop quiz hotshot! How many of the following git -at me subscribers (Taylor, Sacha, Jamie, and Brooklyn) are male? Would your answer change if they were British or Russian?

With the increasing number of androgynous, curiously spelled, and region-specific names, gender is a touchy subject. Much like asking a woman when her baby is due, it’s not a detail you want to guess at blindly. You’re liable to walk away with a black eye.

For most applications, gender is a nice data point to have, but it doesn’t affect core functionality. Consequently, you may decide to eliminate it, reducing signup friction and concerns about data security.

And that’s all well and good - until you get traction and want to monetize your user base. Targeted ads, data mining, selling anonymized data - whatever it is - gender suddenly becomes an important piece of the puzzle. So now what?

Enter Sex Machine. This Ruby gem from Brian Muller implements Jörg Michael’s Gender program, which uses a comprehensive regionalized dictionary to determine if a name is male, female, mostly male, mostly female, or too androgynous for a definitive conclusion.

```ruby # Basic examples require ‘sexmachine’ d = SexMachine::Detector.new d.get_gender(“Neal”) ## Male d.get_gender(“Sam”) ## Mostly Male d.get_gender(“Eliane”) ## Female

Regional & spelling variations

d.get_gender(“Sasha”) ## Mostly Male d.get_gender(“Sasha”, :great_britain) ## Female d.get_gender(“Sacha”) ## Mostly Female

d.get_gender(“Cam”) ## Mostly Male d.get_gender(“Cam”, :great_britain) ## Mostly Female

This one is just for fun

d.get_gender(“Sterling”) ## Male d.get_gender(“Mallory”) ## Mostly Female d.get_gender(“Archer”) ## Androgynous ```

If your app already has access to first name and location, adding gender immediately transforms your app-specific data into a useful and salable dataset. That alone could be the difference between a $10M and $50M valuation.

Want to contribute to this project or try it out for yourself? Install the gem right now and get to hacking: gem install sexmachine

Join the discussion

2017 Neal Shyam