Skip to main content

indonamegender

Predict gender labels from Indonesian personal names using character-level or word-level neural models.

The package includes a compact CharBiLSTM checkpoint and supports seven additional models downloaded on first use. It provides an inference interface for the models evaluated in A Cross-Architecture Empirical Study of Character-Level and Word-Level Representations for Gender Classification from Indonesian Names.

Install

pip install indonamegender

Use

from indonamegender import GenderPredictor

predictor = GenderPredictor()
result = predictor.predict("BANOWATI LARASATI")
print(result)

The prediction includes the gender label, confidence score, and model name.

The package includes the seed-42 CharBiLSTM checkpoint, so the default model requires no additional download. Its model file is 0.46 MB. In the reported benchmark, CharBiLSTM achieved a median CPU forward-pass latency of 0.3912 ms per name across seven trials using one thread. This measurement excludes tokenization.

On the external benchmark of 1,464 names, CharBiLSTM achieved a mean F1 of 0.9367 across five training seeds. This score summarizes the five runs rather than the bundled checkpoint alone.

Choose a model

Pass a model name to GenderPredictor to use another checkpoint.

gru = GenderPredictor("CharBiGRU")
transformer = GenderPredictor("WordTransformer")

The package downloads additional checkpoints from the v1.1.0 GitHub release on first use and stores them in ~/.cache/indonamegender/. Subsequent calls reuse the cached files.

All eight models support CPU inference. To select the CPU explicitly:

predictor = GenderPredictor("CharBiLSTM", device="cpu")
Model Input level Temporal-test F1 Parameters
CharBiLSTM Character 0.9675 114,097
CharBiGRU Character 0.9669 86,065
CharBiRNN Character 0.9651 30,001
CharTransformer Character 0.9631 605,953
WordTransformer Word 0.9423 6,126,721
WordBiLSTM Word 0.9401 2,544,289
WordBiGRU Word 0.9393 2,507,041
WordBiRNN Word 0.9386 2,432,545

F1 values are means across five matched training seeds on 18,882 names first registered from 2024 to 2026. The distributed checkpoints use seed 42.

The package supports the eight neural models trained from scratch. Results for the character n-gram classifiers and pretrained encoders evaluated in the paper are available in the repository.

Intended use

The models estimate the male or female labels recorded in the source dataset. They are intended to support aggregate analysis when gender labels are unavailable. Predictions may be incorrect and should not replace self-reported gender information or determine decisions about individuals.

Performance may vary across institutions and naming conventions. Evaluate the model on representative data before using predictions in an analysis.

Research and source code

The repository provides training and analysis code, result tables, and documentation for the associated study.

License

Released under the MIT license.

Metadata

Release files for indonamegender 1.1.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.1.1
File Size Uploaded
indonamegender-1.1.1.tar.gz 768.6 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / indonamegender-1.1.1.tar.gz

Download URL indonamegender-1.1.1.tar.gz
Size 768.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4c0281e57ee7ddcf992e1f5a2424503731c3cb87c3c77ea1896e23bbdb6a9256
BLAKE2b-256 checksum
How to use checksums
de5f7b9638b78a8cdd96da8b13d624dda864ca1aa9e4f89b8ce5ce0a1e1a3eb9
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 Oct 1, 2026.

Transparency log

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

Download URL indonamegender-1.1.1-py3-none-any.whl
Size 762.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d0c493ede7396a68c8d418e352b871e39614264fa515341c41fbc4151f7c147
BLAKE2b-256 checksum
How to use checksums
929bf4ceb664f0cbfbbe9be211d12317776e0f7259584165d5042f0323a62101
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 Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.2

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