Package Exports
- name-gender-classifier
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (name-gender-classifier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Gender classifier from first name
A simple neural network that classifies the gender of first names. The current model is trained for German first names but can easily be modified for every other language.
Install
npm i name-gender-classifier
Example
const classifyName = require('name-gender-classifier');
classifyName('Andrea').then((prediction) => {
console.log(`${prediction.name} is probably a ${prediction.male ? 'male' : 'female'} name`);
// logs: Andrea is probably a female name
});
classifyName('Peter').then(console.log); // logs: { male: true, female: false, name: 'Peter' }