1.0.0 • Published 6 years ago
@awanisius/genderizer v1.0.0
It works very well for common Javanese names.
Requirements and Use
You can install this package via any package registry or build it yourself from the source.
npm package (recommended)
This package is currently available in registry.npmjs.org and npm.pkg.github.com. It can be installed using your preferred package manager
(e.g. npm, Yarn, pnpm). See the documentation for each package manager for
installation command. and I strongly recommend installing with an option such as
--exact to install the packages as exact versions.
- npm:
npm install @awanisius/genderizer --save - Yarn:
yarn add @awanisius/genderizer --dev
API
estimation = genderizer(name[, sanitized])
- Parameter
- string
name: name to be predicted - boolean
sanitized: is the name has been sanitized?
- string
- Return Object
genderconfidencelogProbLP
Example
Script:
const genderizer = require('genderizer')
let estimation = genderizer('Ahmad Ainul Rizki')
console.log(estimation)Output:
{
gender: 'L',
confidence: 0.9999999999994883,
logProb: {
L: -52.325253924628846,
P: -80.62619514175651
}
}I Love Coffee
1.0.0
6 years ago