Statistical gender detection for Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore Initial commit Mar 20, 2012
.rspec
CHANGELOG.md
Gemfile
LICENSE
README.md Updated link and added note Jul 21, 2018
Rakefile Fixed linter error [skip ci] Aug 8, 2018
guess.gemspec Updated style Mar 11, 2015

README.md

Guess

Statistical gender detection for Ruby

Works with first names

Guess.gender("Don")
# {gender: "male", confidence: 0.9965635738831615}

And full names

Guess.gender("Betty Draper")
# {gender: "female", confidence: 0.9992498124531133}

or

Guess.gender("Draper, Betty")

Occasionally, it just doesn’t know

Guess.gender("Manhattan")
# {gender: "unknown", confidence: nil}

Data obtained from the US Census Bureau, so it works best with American names. The data source does not contain information on non-binary genders.

Installation

Add this line to your application’s Gemfile:

gem 'guess'

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: