Skip to main content

indonamegender

Character-level gender classification for Indonesian personal names.

A compact recurrent model that reads a name character by character. It matches fully fine-tuned multilingual encoders at a fraction of the serving cost, and it is the analysis code behind the paper A Cross-Architecture Attention Analysis of Character-Level and Word-Level Models for Gender Classification from Indonesian Names.

Install

pip install indonamegender

Use

from indonamegender import GenderPredictor

p = GenderPredictor()
p.predict("SITI AMINAH")
# {'name': 'SITI AMINAH', 'gender': 'Female', 'confidence': 0.9997, 'model': 'CharBiLSTM'}

The bundled model is CharBiLSTM, the one the paper recommends for names from outside the training source. It reaches 0.9375 F1 on an independent benchmark and answers in 0.3952 ms on a single CPU thread. No download is needed for it.

Other models

Seven further checkpoints are fetched once from the GitHub release and cached locally, so any architecture in the grid can be asked for by name.

GenderPredictor("CharBiGRU")
GenderPredictor("WordTransformer")
model test F1 parameters
CharBiGRU 0.9593 86,065
CharBiLSTM 0.9589 114,097
CharBiRNN 0.9574 30,001
CharTransformer 0.9554 605,953

Notes

The label is a binary administrative field, male or female. It reflects a registration record, not how a person identifies, and the model estimates that field rather than a person. Intended for completing missing fields in existing records for aggregate analysis, not for decisions about individuals.

Links

Metadata

Release files for indonamegender 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for indonamegender 1.0.1
File Size Uploaded
indonamegender-1.0.1.tar.gz 768.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for indonamegender 1.0.1
File Interpreter ABI Platform
indonamegender-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / indonamegender-1.0.1.tar.gz

Download URL indonamegender-1.0.1.tar.gz
Size 768.4 kB
Tags Source
SHA-256 checksum
How to use checksums
734124295578e1f7c55b60b6a4283a0f946b7dab75277e96923d2f1be9f5696e
BLAKE2b-256 checksum
How to use checksums
b60d06b1b0a28842de36de6ccfa3c4f2abf2d8699b8f4771bc2f9c4c0797cbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Release files / indonamegender-1.0.1-py3-none-any.whl

Download URL indonamegender-1.0.1-py3-none-any.whl
Size 764.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3996c60b6459a8bea94d11397d02267434c3b9bd0aa20bb91a73e280e75d57a3
BLAKE2b-256 checksum
How to use checksums
cf497970787c93103be941adad8906423305410cee54d15d5003df3d54585f0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Release history Release notifications | RSS feed

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page