Skip to content

chaseisabelle/genderizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

genderizer

golang package for genderize.io


https://genderize.io/


example

package main

import (
	"fmt"
	"github.com/chaseisabelle/genderizer"
	"os"
)

func main() {
	genderizations, err := genderizer.New().Genderize(os.Args[1:]...)

	if err != nil {
		panic(err)
	}

	fmt.Println("genderizations:")

	for _, genderization := range genderizations {
		fmt.Println()
		fmt.Println(fmt.Sprintf("\tname: %s", genderization.Name))
		fmt.Println(fmt.Sprintf("\tgender: %s", genderization.Gender))
		fmt.Println(fmt.Sprintf("\tprobability: %f", genderization.Probability))
		fmt.Println(fmt.Sprintf("\tcount: %d", genderization.Count))
	}
}

running the example...

$ go run -race main.go chase isabelle
genders:

	name: chase
	gender: male
	probability: 0.960000
	count: 306

	name: isabelle
	gender: female
	probability: 1.000000
	count: 867

About

genderize.io golang package

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages