New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

is-gendered

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-gendered

  • 0.0.7
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gendered

THIS LIBRARY IS STILL IN DEVELOPMENT.

Guess the gender of names with the help of the genderize.io.

gem install gendered

You can guess one name at a time...

> require 'gendered'
> name = Gendered::Name.new("Sean")
> name.gender
> :not_guessed
> name.guess!
=> :male
> name.male?
=> true
> name.female?
=> false
> name.probability
=> "0.99E0"
> name.sample_size
=> 967

Or batch up a list of names (which sends only one request per hundred names to the API)...

> require 'gendered'
> name_list = Gendered::NameList.new(["Sean","Theresa"])
> name_list.guess!
=> [:male, :female]
> name_list.collect { |name| name.male? }
=> [true, false]
> name_list.collect { |name| name.female? }
=> [false, true]
> name_list.collect { |name| name.probability.to_f }
=> [0.99, 1.0]
> name_list.collect { |name| name.sample_size }
=> [967, 370]
> name_list["Sean"].gender
=> :male

Options can be passed in too...

options = { :apikey => "X123Y456", :country_id => "dk" }
name = Gendered::Name.new("Sean")
name.guess!(options)
name_list = Gendered::NameList.new(["Kim", "Theresa"], options)

Or set globally, as defaults...

Gendered.configure do |config|
  config.apikey = "X123Y456"
  config.language_id = "pt"
  # ...
end

FAQs

Package last updated on 02 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc