https://github.com/fmariluis/gender-detection
Clojure library for name gender detection
https://github.com/fmariluis/gender-detection
clojure
Last synced: 3 months ago
JSON representation
Clojure library for name gender detection
- Host: GitHub
- URL: https://github.com/fmariluis/gender-detection
- Owner: fmariluis
- License: epl-1.0
- Created: 2018-05-27T02:48:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-03T13:54:54.000Z (over 7 years ago)
- Last Synced: 2025-10-14T09:17:47.736Z (4 months ago)
- Topics: clojure
- Language: Clojure
- Homepage:
- Size: 914 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gender-detection
[](https://clojars.org/gender-detection)
[](https://travis-ci.org/fmariluis/gender-detection)
Simple library to detect the gender of a name. The current version supports English and Spanish names.
## Install
`[gender-detection "0.1.1"]` in your `project.clj`.
## Usage
```clj
(ns example
(:require [gender-detection.core :as gd]))
```
You can try to find the gender of a name:
```clj
(gd/find-gender "Susana" :es)
;;=> :F
(gd/find-gender "Beth" :en)
;;=> :F
(gd/find-gender "Carlos" :es)
;;=> :M
(gd/find-gender "Peter" :en)
;;=> :M
(gd/find-gender "Vorplax" :en)
;;=> nil
```
Case doesn't matter, accents are stripped.
There are two simple boolean functions too:
```clj
(gd/male? "Carlos" :es)
;;=> t
(gd/female? "Susana" :es)
;;=> :F
(gd/female? "Vorplax2" :es)
;;=> nil
```
## License
Copyright © 2018 Franco Mariluis
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.