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 beyond the training data. 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 of the eight architectures in the grid can be asked for by name.

GenderPredictor("CharBiGRU")
GenderPredictor("WordTransformer")
model level test F1 parameters
CharBiGRU character 0.9593 86,065
CharBiLSTM character 0.9589 114,097
CharBiRNN character 0.9574 30,001
CharTransformer character 0.9554 605,953
WordTransformer word 0.9365 6,126,721
WordBiLSTM word 0.9344 2,544,289
WordBiGRU word 0.9335 2,507,041
WordBiRNN word 0.9323 2,432,545

Test F1 is the mean over five seeds on the 2024 to 2025 partition. CharBiLSTM is bundled, the other seven download on first use. The three pretrained encoders from the paper, IndoBERT, mBERT and XLM-R, are not distributed through this package because their base weights come from Hugging Face. The scripts that fine-tune them are in the repository under experiments/.

Notes

The label is a binary administrative field, male or female. It reflects a recorded administrative label, 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.2

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.2
File Size Uploaded
indonamegender-1.0.2.tar.gz 766.6 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / indonamegender-1.0.2.tar.gz

Download URL indonamegender-1.0.2.tar.gz
Size 766.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c6de3fc63e69d68f5a8edbdfdfc876f643db26de8bc941e6d11e61c29e5b681
BLAKE2b-256 checksum
How to use checksums
8c4ca22c3b5531c75dced8f9aaac80de0e3225d467afcdf670a7cb04c095316f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

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

Download URL indonamegender-1.0.2-py3-none-any.whl
Size 762.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a5165aa3f011fa4d5dcd383a22853adceac8a9ba491b8227598409ebd9aa3ed
BLAKE2b-256 checksum
How to use checksums
7c2c08df8defbd9a741431391db0337ed840c2192b9b7a1b31afe9cbacdaf9be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.2 This release

2 release files

1.0.1

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