Skip to main content

Name Analysis & Prediction Engine

Project description

EthniData: Name Diversity & Analysis Engine

EthniData is a powerful library for analyzing names to predict cultural origin, ethnicity, and gender usage useful for diversity analytics and demographic studies.

Installation

pip install ethnidata

Example Usage & Verification

Basic Usage

from ethnidata import EthniData

ed = EthniData()

names = ["Yılmaz", "Tanaka", "Schmidt", "O'Connor"]
results = [ed.predict_nationality(name, name_type="last") for name in names]

for r in results:
    print(f"Name: {r['name']:10} -> Predicted: {r['predicted_country']}")

Verified Output

Name: Yılmaz     -> Predicted: TR
Name: Tanaka     -> Predicted: JP
Name: Schmidt    -> Predicted: DE
Name: O'Connor   -> Predicted: IE

Advanced Usage: Batch Context Analysis (Verified)

from ethnidata import EthniData

ed = EthniData()
full_names = ["Hiroshi Yamamoto", "Fatma Demir"]

print(f"Analyzing {len(full_names)} names:")
for name in full_names:
    last = name.split()[-1] 
    res = ed.predict_nationality(last, name_type="last")
    print(f"  {name:16} -> Origin: {res['country_name']} (Conf: {res['confidence']:.2f})")

Verified Output:

Analyzing 2 names:
  Hiroshi Yamamoto -> Origin: Japan (Conf: 0.75)
  Fatma Demir      -> Origin: United Arab Emirates (Conf: 0.15)

Features

  • Nationality Prediction: Predict likely country of origin for surnames.
  • Gender Inference: Probabilistic gender detection.
  • Report Generation: Create diversity reports from user lists.
  • Visualizations: Built-in plotting for demographic breakdowns.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ethnidata-4.1.4.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ethnidata-4.1.4-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

Details for the file ethnidata-4.1.4.tar.gz.

File metadata

  • Download URL: ethnidata-4.1.4.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ethnidata-4.1.4.tar.gz
Algorithm Hash digest
SHA256 6fd15fa5135292dd519fa9ee31eb1c4324eff6ce3f9effb6972d0b5b99dbf1fe
MD5 6a6bf0595a5500144b043088c3aab7e6
BLAKE2b-256 b6c96daeac1cb5b33762c68a6946b9115f7547eab543902e9ea3cc89b7743b74

See more details on using hashes here.

File details

Details for the file ethnidata-4.1.4-py3-none-any.whl.

File metadata

  • Download URL: ethnidata-4.1.4-py3-none-any.whl
  • Upload date:
  • Size: 55.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for ethnidata-4.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9cbea1f43e7a83459c303aa5638a2cd888845ec1794d03cef7471959c1105e18
MD5 8870879125e8064fdebefce383465aef
BLAKE2b-256 c15a824abde90847d983296d68925f4628b477b85077495e6e0dfd5f5923bb36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page