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 Empirical Study of Character-Level and Word-Level Representations 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.9393 F1 on an independent benchmark and answers in 0.3912 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
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

Test F1 is the mean over five seeds on the 2024 to 2026 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.

Metadata

Release files for indonamegender 1.1.0

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.0
File Size Uploaded
indonamegender-1.1.0.tar.gz 768.0 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / indonamegender-1.1.0.tar.gz

Download URL indonamegender-1.1.0.tar.gz
Size 768.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c9ded5fb6a189764f1a7c7ceae988847a18ada5cc0bb44a1d7b05cc606961a1c
BLAKE2b-256 checksum
How to use checksums
a6e3fc54c041cf4975fe62c974e00245031ac1090a89f33fa6d9022af1d53c2d
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.0-py3-none-any.whl

Download URL indonamegender-1.1.0-py3-none-any.whl
Size 762.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c8a46982759c2512fa5a200479030314e53fa28ca18d3103bbcb78e88cfdf73
BLAKE2b-256 checksum
How to use checksums
da13086552243c789e6cbacf33864af56190d4606c32559b3c9742f887ec29c5
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

1.1.1

2 release files

This release

1.1.0 This release

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