Skip to content

Latest commit

 

History

History
71 lines (57 loc) · 1.03 KB

README.md

File metadata and controls

71 lines (57 loc) · 1.03 KB

Genderize API

Super simple API for first name to gender conversion. Currently 16.201 Turkey, 31.015 USA first name included (see data folder).

Install

go get github.com/ismailbaskin/genderize

Run

PORT=9090 genderize

Note: default port is 8080

Docker

docker run -p 8080:8080 -d ismailbaskin/genderize

HTTP Usage

curl 'http://127.0.0.1:9090/Mustafa'

Result

[
    {
        "name": "Mustafa",
        "gender": "male",
        "accuracy": 100
    }
]

Multi name usage

curl 'http://127.0.0.1:9090/Halil%20İbrahim'

Result

[
    {
        "name": "Halil",
        "gender": "male",
        "accuracy": 100
    },
    {
        "name": "İbrahim",
        "gender": "male",
        "accuracy": 100
    }
]

JSONP Support

curl 'http://127.0.0.1:9090/Halil%20İbrahim?callback=mycallback'

Result

mycallback([{"name":"halil","gender":"male","accuracy":100},{"name":"İbrahim","gender":"male","accuracy":100}])