Skip to main content

A package for generating synthetic names based on Indian states.

Project description

IndiGen: A Python-Based Synthetic Name Generator for Indian States

This package is a dynamic state-based Indian name generator. It allows users to generate names (either first names or full names) for specific states or for all states of India at once. The system dynamically imports state-specific modules and their corresponding name generation functions.

Need for an Indian Name Generator

India is a diverse country with a rich tapestry of cultures, languages, and traditions. Each state has unique naming conventions that reflect its cultural and linguistic identity. An Indian name generator addresses this diversity and caters to various applications requiring culturally specific names.

This project caters to various applications, including:

  • Diversity Representation: Ensuring names reflect India's unique cultural tapestry.
  • Localization: Supporting region-specific datasets for marketing, content creation, and more.
  • Research: Facilitating analysis of naming trends across Indian states.

Features

  • Dynamically loads state-specific modules for name generation.
  • Generates first names or full names for specific states or all Indian states.
  • Customizable output: specify the number of names to generate.
  • Implements random seed for reproducible results.
  • Comprehensive error handling for invalid inputs or module issues.

Installation

# Clone the repository
git clone https://github.com/ghatesudi/Indigen.git

# Navigate to the project directory
cd Indigen

# Install dependencies
pip install -r requirements.txt

# Install the package directly from source (optional)
pip install .

Usage

To run the main program:

python indigen.py

Contribution

Contributions are welcome! If you find bugs or have suggestions for improvements, feel free to open an issue or submit a pull request.

Directory Structure

project_root/
├── Indigen/
│   ├── __init__.py
│   ├── main_script.py  # Main entry script for name generation
│   ├── utils/
│   │   ├── __init__.py
│   │   ├── state_utils.py  # Contains `get_state_modules` for listing state modules
│   │   ├── common.py  # Contains helper functions like `save_names_to_csv`, `format_name_data`
│   └── state_modules/
│       ├── __init__.py
│       ├── Assam_File.py  # Example state module
│       ├── Bihar_File.py  # Example state module
│       └── ...  # More state modules
├── scripts/
│   ├── __init__.py
│   ├── indigen.py  # Running script for the package
├── License  # License for the project
├── requirements.txt  # List of dependencies
└── README.md  # Documentation for the project

Random Seed Implementation

To ensure reproducibility of the generated names, a random seed is implemented. Users can set a specific seed value to guarantee the same sequence of names across runs. This feature is particularly useful for testing and debugging purposes.

Example usage with a random seed:

from Indigen.main_script import generate_names

# Set random seed
import random
random.seed(42)

# Generate names
names = generate_names(state="Assam", num_names=5)
print(names)

Running Tests

To run tests, use the following command:

python indigen.py

Authors

License

MIT

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Special thanks to all contributors and users who provided feedback and helped improve the project. Their input has been invaluable in making this tool robust and user-friendly.

We also acknowledge the inspiration drawn from the work: Sharma, R. S. (2005). Panorama of Indian Anthroponomy: An Historical, Socio-cultural & Linguistic Analysis of Indian Personal Names. Mittal Publications.

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

indigen-0.1.3.tar.gz (120.2 kB view details)

Uploaded Source

Built Distribution

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

indigen-0.1.3-py3-none-any.whl (148.8 kB view details)

Uploaded Python 3

File details

Details for the file indigen-0.1.3.tar.gz.

File metadata

  • Download URL: indigen-0.1.3.tar.gz
  • Upload date:
  • Size: 120.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for indigen-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7b695fa8ef42f98e574f14c329d2df7b21aaebfb47d119b2d8d22f86b31308aa
MD5 1dbe5cefff85aa2dc2184571bdef31e8
BLAKE2b-256 54c44618c782e5ba1e427e3d17da84dc37844d7c89d121e642ec8bdd4f1d393a

See more details on using hashes here.

File details

Details for the file indigen-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: indigen-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 148.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for indigen-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 72d0b6ded6865ed66884613cd531d680b175e0a0c55932653393a1a5d3701e61
MD5 3cae59c67c136372ebb3d4fc41ffea20
BLAKE2b-256 bca6b79cb150f036dce9c83c48508577c991276cc1baf9695686a946301f7979

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