This gem will give you your gender based on your name.
Add this line to your application's Gemfile:
gem 'genderize'
And then execute:
$ bundle
Or install it yourself as:
$ gem install genderize
If you want to use this its quite simple:
$ include Genderize # To directly use gender method
$ res = gender "kareena"
#output {"name"=>"kareena", "gender"=>"female", "probability"=>"1.00", "count"=>5}
$ res["gender"] # => female
- Fork it ( https://github.com/dilkhush/genderize/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request