wyrdbound-rng


Namewyrdbound-rng JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA comprehensive random name generator library for tabletop RPGs
upload_time2025-07-29 03:42:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords names generator random tabletop rpg ttrpg fantasy procedural
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Wyrdbound Random Name Generator

A comprehensive random name generator library for tabletop RPGs, designed to create authentic-sounding names by analyzing and recombining syllables from existing name corpora.

This library is designed for use in [wyrdbound](https://github.com/wyrdbound), a text-based RPG system that emphasizes narrative and player choice.

[![CI](https://github.com/wyrdbound/wyrdbound-rng/actions/workflows/ci.yml/badge.svg)](https://github.com/wyrdbound/wyrdbound-rng/actions/workflows/ci.yml)
[![Python 3.8+](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

> 📣 This library is experimental and was built with much ❤️ and [vibe coding](https://en.wikipedia.org/wiki/Vibe_coding). Perfect for your tabletop RPG adventures, but maybe not for launching :rocket: or performing :brain: surgery! Enjoy!

## Features

### Simplified Interface

- **Built-in Name Lists**: Reference name corpora using simple identifiers
- **Auto-Discovery**: Automatically finds built-in name lists without specifying file paths
- **Flexible Input**: Supports both built-in identifiers and custom file paths
- **Help Integration**: CLI tools show available built-in name lists in help text

### Multiple Generation Algorithms

- **Very Simple**: Quick and random syllable combination
- **Simple**: Basic syllable recombination with weighted selection
- **Bayesian**: Advanced probabilistic analysis for more realistic names

### Flexible Segmentation

- **Fantasy Names**: Optimized for Western fantasy naming conventions
- **Japanese Names**: Specialized for Japanese name syllable patterns
- **Extensible**: Easy to add new segmentation strategies

### YAML Input Format

- **Built-in Name Lists**: Use simple identifiers for included corpora
- **Custom YAML Files**: Support for user-provided YAML files with metadata
- **Mixed Sources**: Combine multiple input files and built-in lists

### Advanced Analysis

- **Syllable Statistics**: Detailed breakdown of syllable patterns
- **Probability Analysis**: Bayesian probability calculations
- **Corpus Validation**: Check if generated names exist in source data
- **Source Tracking**: Track which names influenced generation

## Installation

```bash
pip install wyrdbound-rng
```

## Quick Start

```python
from wyrdbound_rng import Generator, FantasyNameSegmenter

# Create generator with built-in name list (simple identifier)
generator = Generator("generic-fantasy", segmenter=FantasyNameSegmenter())

# Generate a name using the simple algorithm
name = generator.generate_name(max_len=12, algorithm='simple')
print(name.name)  # "Aldric"

# Generate using Bayesian algorithm for more realistic results
name = generator.generate_name(max_len=12, algorithm='bayesian')
print(name.name)  # "Theron"
print(f"Probability: {name.probability:.2e}")

# You can also use custom YAML files
custom_generator = Generator("./my-custom-names.yaml")
```

## Command Line Usage

```bash
# Generate 5 names using built-in name list identifier
wyrdbound-rng --list generic-fantasy

# Generate 10 names with Bayesian algorithm
wyrdbound-rng --list japanese-sengoku -n 10 -a bayesian --segmenter japanese

# Show syllable breakdown and sources
wyrdbound-rng --list generic-fantasy --syllables --show-sources

# Show analysis info: corpus existence for all algorithms, plus probability for Bayesian
wyrdbound-rng --list generic-fantasy --show-analysis

# Bayesian algorithm with full analysis (probability + corpus existence)
wyrdbound-rng --list generic-fantasy --show-analysis -a bayesian

# Analyze probability for specific syllables
wyrdbound-rng --list generic-fantasy --probabilities "ar" -a bayesian

# You can also use custom YAML files
wyrdbound-rng --list /path/to/your/custom-names.yaml
wyrdbound-rng --list ./my-names.yaml
```

## Supported Name Corpora

The library comes with several built-in name corpora. You can reference them using simple identifiers:

### Built-in Name Lists

- `generic-fantasy` - Traditional Western fantasy names (mixed)
- `generic-fantasy-male` - Traditional Western fantasy male names
- `generic-fantasy-female` - Traditional Western fantasy female names
- `japanese-sengoku` - Historical Japanese names from the Sengoku period (mixed)
- `japanese-sengoku-clan` - Japanese Sengoku clan names
- `japanese-sengoku-daimyo` - Japanese Sengoku daimyo names
- `japanese-sengoku-religious` - Japanese Sengoku religious names
- `japanese-sengoku-rogue` - Japanese Sengoku rogue names
- `japanese-sengoku-samurai` - Japanese Sengoku samurai names
- `japanese-sengoku-women` - Japanese Sengoku women names
- `japanese-swordsmen` - Japanese swordsmen names
- `warhammer40k-space-marine-names` - Warhammer 40k Space Marine names

### Custom Files

You can also provide your own YAML files using relative or absolute paths:

- `./my-names.yaml` - Relative path
- `/absolute/path/to/names.yaml` - Absolute path

## API Reference

### Main Classes

#### `Generator`

The main entry point for name generation.

```python
Generator(name_source, segmenter=None)
```

- `name_source`: Built-in name list identifier (e.g., "generic-fantasy") or path to YAML file
- `segmenter`: Syllable segmentation strategy (optional, auto-detected from YAML metadata)

**Methods:**

- `generate_name(max_len, algorithm='simple', min_probability_threshold=1e-8)`: Generate a single name
- `generate(n, max_chars=15, algorithm='simple', min_probability_threshold=1e-8)`: Generate multiple names
- `name_exists_in_corpus(name)`: Check if a name exists in the source corpus

#### `GeneratedName`

Represents a generated name with metadata.

**Properties:**

- `name` (str): The generated name
- `syllables` (list): List of syllables used
- `source_names` (list): Names that influenced generation
- `probability` (float): Bayesian probability (if applicable)
- `exists_in_corpus` (bool): Whether name exists in source data

### Segmenters

#### `FantasyNameSegmenter`

Optimized for Western fantasy names.

#### `JapaneseNameSegmenter`

Specialized for Japanese name patterns.

### Data Format

#### YAML Format

The YAML format is used to define name corpora with metadata. Below is an example structure:

```yaml
metadata:
  description: Fantasy names from Middle-earth
  segmenter: fantasy
  sources:
    - The Lord of the Rings by J.R.R. Tolkien
  version: "1.0"
names:
  - Aragorn
  - Arwen
  - Bilbo
  - Boromir
  - Frodo
  - Gandalf
  - Gimli
  - Legolas
  - Samwise
```

Each entry in the `names` list represents a name. The `metadata` section provides additional information about the corpus, including its description, segmentation strategy, sources, and version.

## Command Line Tools

### Generate Names

```bash
wyrdbound-rng --list <name_source> [options]

Options:
  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)
  -n, --number N        Number of names to generate (default: 5)
  --length N            Maximum name length (default: 12)
  -a, --algorithm ALG   Algorithm: simple, bayesian, very_simple (default: simple)
  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)
  --show-sources        Show source names used in generation
  --show-analysis       Show analysis info: corpus existence for all algorithms, plus probability for bayesian
  --min-probability N   Minimum probability threshold (default: 1e-8)
  --syllables           Show syllable breakdown
  --probabilities SYL   Analyze probability for specific syllable(s) (comma-separated)
```

### Advanced Tools

The `tools/` directory contains additional command-line utilities for advanced analysis and generation.

#### Corpus Analysis Tool

```bash
python tools/analyze.py --list <name_source> [options]

Options:
  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)
  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)
  -v, --verbose         Show detailed analysis including name/syllable length statistics
  --top-syllables N     Number of top syllables to show (default: 20)
  --json                Output results as JSON
```

**Example:**

```bash
# Basic analysis
python tools/analyze.py --list generic-fantasy

# Detailed analysis with top 30 syllables
python tools/analyze.py --list japanese-sengoku -v --top-syllables 30 -s japanese

# JSON output for data processing
python tools/analyze.py --list generic-fantasy --json > analysis.json

# Analyze custom file
python tools/analyze.py --list ./my-names.yaml
```

#### Advanced Generation Tool

```bash
python tools/generate.py --list <name_source> [options]

Options:
  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)
  -n, --count N         Number of names to generate (default: 1)
  -a, --algorithm ALG   Algorithm: simple, bayesian, very_simple (default: simple)
  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)
  --json                Output results as JSON
  -v, --verbose         Show detailed breakdown (syllables, sources, probability)
  --min-probability N   Minimum probability threshold for bayesian generation
  --max-length N        Maximum name length (default: 12)
```

**Example:**

```bash
# Generate single name with detailed info
python tools/generate.py --list generic-fantasy -v -a bayesian

# Generate 5 names as JSON for data processing
python tools/generate.py --list japanese-sengoku -n 5 --json -s japanese

# Batch generation with custom parameters
python tools/generate.py --list generic-fantasy -n 100 -a bayesian --min-probability 1e-6

# Use custom file
python tools/generate.py --list ./my-names.yaml -n 5
```

## Examples

### Basic Usage

```python
from wyrdbound_rng import Generator, FantasyNameSegmenter

# Create generator using built-in name list
generator = Generator("generic-fantasy", segmenter=FantasyNameSegmenter())

# Generate names
for i in range(5):
    name = generator.generate_name(max_len=12, algorithm='simple')
    print(f"{i+1}. {name.name}")

# You can also use custom files
custom_generator = Generator("./my-names.yaml")
```

### Advanced Analysis

```python
# Generate with probability analysis
name = generator.generate_name(max_len=12, algorithm='bayesian', min_probability_threshold=1e-6)
print(f"Name: {name.name}")
print(f"Probability: {name.probability:.2e}")
print(f"Exists in corpus: {generator.name_exists_in_corpus(name.name)}")
if hasattr(name, 'source_names') and name.source_names:
    print(f"Source names: {[n.name for n in name.source_names]}")
```

### Multiple Corpora

```python
# Load from multiple built-in sources by creating separate generators
generator1 = Generator("generic-fantasy-male")
generator2 = Generator("generic-fantasy-female")

# Generate names from each corpus
male_names = [generator1.generate_name(max_len=12) for _ in range(5)]
female_names = [generator2.generate_name(max_len=12) for _ in range(5)]

# Mix built-in and custom sources
japanese_gen = Generator("japanese-sengoku")
custom_gen = Generator("./my-custom-names.yaml")
```

## Development

### Setting Up Development Environment

```bash
# Clone the repository
git clone https://github.com/wyrdbound/wyrdbound-rng.git
cd wyrdbound-rng

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install with development dependencies
pip install -e ".[dev]"
```

### Running Tests

```bash
# Run all tests (ensure .venv is activated)
python -m pytest tests/

# Run with coverage
python -m pytest tests/ --cov=wyrdbound_rng

# Run with coverage and generate HTML report
python -m pytest tests/ --cov=wyrdbound_rng --cov-report=html
```

### Code Quality

```bash
# Lint and format with Ruff (ensure .venv is activated)
ruff check src/ tests/ tools/
ruff format src/ tests/ tools/

# Or run both together
ruff check --fix src/ tests/ tools/
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

### Areas for Contribution

- New segmentation strategies for different cultures/languages
- Additional name corpora
- Performance optimizations
- Enhanced probability models
- Documentation improvements

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Inspired by the original Ruby RNG gem
- Built for the diverse naming needs of tabletop RPG systems
- Thanks to the RPG community for feedback and name corpus contributions

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wyrdbound-rng",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "The Wyrd One <wyrdbound@proton.me>",
    "keywords": "names, generator, random, tabletop, rpg, ttrpg, fantasy, procedural",
    "author": null,
    "author_email": "The Wyrd One <wyrdbound@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/12/e0/ab64d520098745a58950cefae0f0783660153a05f71b933cc6b7273bc6a9/wyrdbound_rng-0.0.1.tar.gz",
    "platform": null,
    "description": "# Wyrdbound Random Name Generator\n\nA comprehensive random name generator library for tabletop RPGs, designed to create authentic-sounding names by analyzing and recombining syllables from existing name corpora.\n\nThis library is designed for use in [wyrdbound](https://github.com/wyrdbound), a text-based RPG system that emphasizes narrative and player choice.\n\n[![CI](https://github.com/wyrdbound/wyrdbound-rng/actions/workflows/ci.yml/badge.svg)](https://github.com/wyrdbound/wyrdbound-rng/actions/workflows/ci.yml)\n[![Python 3.8+](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n> \ud83d\udce3 This library is experimental and was built with much \u2764\ufe0f and [vibe coding](https://en.wikipedia.org/wiki/Vibe_coding). Perfect for your tabletop RPG adventures, but maybe not for launching :rocket: or performing :brain: surgery! Enjoy!\n\n## Features\n\n### Simplified Interface\n\n- **Built-in Name Lists**: Reference name corpora using simple identifiers\n- **Auto-Discovery**: Automatically finds built-in name lists without specifying file paths\n- **Flexible Input**: Supports both built-in identifiers and custom file paths\n- **Help Integration**: CLI tools show available built-in name lists in help text\n\n### Multiple Generation Algorithms\n\n- **Very Simple**: Quick and random syllable combination\n- **Simple**: Basic syllable recombination with weighted selection\n- **Bayesian**: Advanced probabilistic analysis for more realistic names\n\n### Flexible Segmentation\n\n- **Fantasy Names**: Optimized for Western fantasy naming conventions\n- **Japanese Names**: Specialized for Japanese name syllable patterns\n- **Extensible**: Easy to add new segmentation strategies\n\n### YAML Input Format\n\n- **Built-in Name Lists**: Use simple identifiers for included corpora\n- **Custom YAML Files**: Support for user-provided YAML files with metadata\n- **Mixed Sources**: Combine multiple input files and built-in lists\n\n### Advanced Analysis\n\n- **Syllable Statistics**: Detailed breakdown of syllable patterns\n- **Probability Analysis**: Bayesian probability calculations\n- **Corpus Validation**: Check if generated names exist in source data\n- **Source Tracking**: Track which names influenced generation\n\n## Installation\n\n```bash\npip install wyrdbound-rng\n```\n\n## Quick Start\n\n```python\nfrom wyrdbound_rng import Generator, FantasyNameSegmenter\n\n# Create generator with built-in name list (simple identifier)\ngenerator = Generator(\"generic-fantasy\", segmenter=FantasyNameSegmenter())\n\n# Generate a name using the simple algorithm\nname = generator.generate_name(max_len=12, algorithm='simple')\nprint(name.name)  # \"Aldric\"\n\n# Generate using Bayesian algorithm for more realistic results\nname = generator.generate_name(max_len=12, algorithm='bayesian')\nprint(name.name)  # \"Theron\"\nprint(f\"Probability: {name.probability:.2e}\")\n\n# You can also use custom YAML files\ncustom_generator = Generator(\"./my-custom-names.yaml\")\n```\n\n## Command Line Usage\n\n```bash\n# Generate 5 names using built-in name list identifier\nwyrdbound-rng --list generic-fantasy\n\n# Generate 10 names with Bayesian algorithm\nwyrdbound-rng --list japanese-sengoku -n 10 -a bayesian --segmenter japanese\n\n# Show syllable breakdown and sources\nwyrdbound-rng --list generic-fantasy --syllables --show-sources\n\n# Show analysis info: corpus existence for all algorithms, plus probability for Bayesian\nwyrdbound-rng --list generic-fantasy --show-analysis\n\n# Bayesian algorithm with full analysis (probability + corpus existence)\nwyrdbound-rng --list generic-fantasy --show-analysis -a bayesian\n\n# Analyze probability for specific syllables\nwyrdbound-rng --list generic-fantasy --probabilities \"ar\" -a bayesian\n\n# You can also use custom YAML files\nwyrdbound-rng --list /path/to/your/custom-names.yaml\nwyrdbound-rng --list ./my-names.yaml\n```\n\n## Supported Name Corpora\n\nThe library comes with several built-in name corpora. You can reference them using simple identifiers:\n\n### Built-in Name Lists\n\n- `generic-fantasy` - Traditional Western fantasy names (mixed)\n- `generic-fantasy-male` - Traditional Western fantasy male names\n- `generic-fantasy-female` - Traditional Western fantasy female names\n- `japanese-sengoku` - Historical Japanese names from the Sengoku period (mixed)\n- `japanese-sengoku-clan` - Japanese Sengoku clan names\n- `japanese-sengoku-daimyo` - Japanese Sengoku daimyo names\n- `japanese-sengoku-religious` - Japanese Sengoku religious names\n- `japanese-sengoku-rogue` - Japanese Sengoku rogue names\n- `japanese-sengoku-samurai` - Japanese Sengoku samurai names\n- `japanese-sengoku-women` - Japanese Sengoku women names\n- `japanese-swordsmen` - Japanese swordsmen names\n- `warhammer40k-space-marine-names` - Warhammer 40k Space Marine names\n\n### Custom Files\n\nYou can also provide your own YAML files using relative or absolute paths:\n\n- `./my-names.yaml` - Relative path\n- `/absolute/path/to/names.yaml` - Absolute path\n\n## API Reference\n\n### Main Classes\n\n#### `Generator`\n\nThe main entry point for name generation.\n\n```python\nGenerator(name_source, segmenter=None)\n```\n\n- `name_source`: Built-in name list identifier (e.g., \"generic-fantasy\") or path to YAML file\n- `segmenter`: Syllable segmentation strategy (optional, auto-detected from YAML metadata)\n\n**Methods:**\n\n- `generate_name(max_len, algorithm='simple', min_probability_threshold=1e-8)`: Generate a single name\n- `generate(n, max_chars=15, algorithm='simple', min_probability_threshold=1e-8)`: Generate multiple names\n- `name_exists_in_corpus(name)`: Check if a name exists in the source corpus\n\n#### `GeneratedName`\n\nRepresents a generated name with metadata.\n\n**Properties:**\n\n- `name` (str): The generated name\n- `syllables` (list): List of syllables used\n- `source_names` (list): Names that influenced generation\n- `probability` (float): Bayesian probability (if applicable)\n- `exists_in_corpus` (bool): Whether name exists in source data\n\n### Segmenters\n\n#### `FantasyNameSegmenter`\n\nOptimized for Western fantasy names.\n\n#### `JapaneseNameSegmenter`\n\nSpecialized for Japanese name patterns.\n\n### Data Format\n\n#### YAML Format\n\nThe YAML format is used to define name corpora with metadata. Below is an example structure:\n\n```yaml\nmetadata:\n  description: Fantasy names from Middle-earth\n  segmenter: fantasy\n  sources:\n    - The Lord of the Rings by J.R.R. Tolkien\n  version: \"1.0\"\nnames:\n  - Aragorn\n  - Arwen\n  - Bilbo\n  - Boromir\n  - Frodo\n  - Gandalf\n  - Gimli\n  - Legolas\n  - Samwise\n```\n\nEach entry in the `names` list represents a name. The `metadata` section provides additional information about the corpus, including its description, segmentation strategy, sources, and version.\n\n## Command Line Tools\n\n### Generate Names\n\n```bash\nwyrdbound-rng --list <name_source> [options]\n\nOptions:\n  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)\n  -n, --number N        Number of names to generate (default: 5)\n  --length N            Maximum name length (default: 12)\n  -a, --algorithm ALG   Algorithm: simple, bayesian, very_simple (default: simple)\n  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)\n  --show-sources        Show source names used in generation\n  --show-analysis       Show analysis info: corpus existence for all algorithms, plus probability for bayesian\n  --min-probability N   Minimum probability threshold (default: 1e-8)\n  --syllables           Show syllable breakdown\n  --probabilities SYL   Analyze probability for specific syllable(s) (comma-separated)\n```\n\n### Advanced Tools\n\nThe `tools/` directory contains additional command-line utilities for advanced analysis and generation.\n\n#### Corpus Analysis Tool\n\n```bash\npython tools/analyze.py --list <name_source> [options]\n\nOptions:\n  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)\n  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)\n  -v, --verbose         Show detailed analysis including name/syllable length statistics\n  --top-syllables N     Number of top syllables to show (default: 20)\n  --json                Output results as JSON\n```\n\n**Example:**\n\n```bash\n# Basic analysis\npython tools/analyze.py --list generic-fantasy\n\n# Detailed analysis with top 30 syllables\npython tools/analyze.py --list japanese-sengoku -v --top-syllables 30 -s japanese\n\n# JSON output for data processing\npython tools/analyze.py --list generic-fantasy --json > analysis.json\n\n# Analyze custom file\npython tools/analyze.py --list ./my-names.yaml\n```\n\n#### Advanced Generation Tool\n\n```bash\npython tools/generate.py --list <name_source> [options]\n\nOptions:\n  -l, --list SOURCE     Built-in name list identifier or path to YAML file (required)\n  -n, --count N         Number of names to generate (default: 1)\n  -a, --algorithm ALG   Algorithm: simple, bayesian, very_simple (default: simple)\n  -s, --segmenter SEG   Segmenter: fantasy, japanese (default: fantasy)\n  --json                Output results as JSON\n  -v, --verbose         Show detailed breakdown (syllables, sources, probability)\n  --min-probability N   Minimum probability threshold for bayesian generation\n  --max-length N        Maximum name length (default: 12)\n```\n\n**Example:**\n\n```bash\n# Generate single name with detailed info\npython tools/generate.py --list generic-fantasy -v -a bayesian\n\n# Generate 5 names as JSON for data processing\npython tools/generate.py --list japanese-sengoku -n 5 --json -s japanese\n\n# Batch generation with custom parameters\npython tools/generate.py --list generic-fantasy -n 100 -a bayesian --min-probability 1e-6\n\n# Use custom file\npython tools/generate.py --list ./my-names.yaml -n 5\n```\n\n## Examples\n\n### Basic Usage\n\n```python\nfrom wyrdbound_rng import Generator, FantasyNameSegmenter\n\n# Create generator using built-in name list\ngenerator = Generator(\"generic-fantasy\", segmenter=FantasyNameSegmenter())\n\n# Generate names\nfor i in range(5):\n    name = generator.generate_name(max_len=12, algorithm='simple')\n    print(f\"{i+1}. {name.name}\")\n\n# You can also use custom files\ncustom_generator = Generator(\"./my-names.yaml\")\n```\n\n### Advanced Analysis\n\n```python\n# Generate with probability analysis\nname = generator.generate_name(max_len=12, algorithm='bayesian', min_probability_threshold=1e-6)\nprint(f\"Name: {name.name}\")\nprint(f\"Probability: {name.probability:.2e}\")\nprint(f\"Exists in corpus: {generator.name_exists_in_corpus(name.name)}\")\nif hasattr(name, 'source_names') and name.source_names:\n    print(f\"Source names: {[n.name for n in name.source_names]}\")\n```\n\n### Multiple Corpora\n\n```python\n# Load from multiple built-in sources by creating separate generators\ngenerator1 = Generator(\"generic-fantasy-male\")\ngenerator2 = Generator(\"generic-fantasy-female\")\n\n# Generate names from each corpus\nmale_names = [generator1.generate_name(max_len=12) for _ in range(5)]\nfemale_names = [generator2.generate_name(max_len=12) for _ in range(5)]\n\n# Mix built-in and custom sources\njapanese_gen = Generator(\"japanese-sengoku\")\ncustom_gen = Generator(\"./my-custom-names.yaml\")\n```\n\n## Development\n\n### Setting Up Development Environment\n\n```bash\n# Clone the repository\ngit clone https://github.com/wyrdbound/wyrdbound-rng.git\ncd wyrdbound-rng\n\n# Create and activate virtual environment\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\n\n# Install with development dependencies\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\n# Run all tests (ensure .venv is activated)\npython -m pytest tests/\n\n# Run with coverage\npython -m pytest tests/ --cov=wyrdbound_rng\n\n# Run with coverage and generate HTML report\npython -m pytest tests/ --cov=wyrdbound_rng --cov-report=html\n```\n\n### Code Quality\n\n```bash\n# Lint and format with Ruff (ensure .venv is activated)\nruff check src/ tests/ tools/\nruff format src/ tests/ tools/\n\n# Or run both together\nruff check --fix src/ tests/ tools/\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### Areas for Contribution\n\n- New segmentation strategies for different cultures/languages\n- Additional name corpora\n- Performance optimizations\n- Enhanced probability models\n- Documentation improvements\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Inspired by the original Ruby RNG gem\n- Built for the diverse naming needs of tabletop RPG systems\n- Thanks to the RPG community for feedback and name corpus contributions\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive random name generator library for tabletop RPGs",
    "version": "0.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/wyrdbound/wyrdbound-rng/issues",
        "Documentation": "https://github.com/wyrdbound/wyrdbound-rng#readme",
        "Homepage": "https://github.com/wyrdbound/wyrdbound-rng",
        "Repository": "https://github.com/wyrdbound/wyrdbound-rng"
    },
    "split_keywords": [
        "names",
        " generator",
        " random",
        " tabletop",
        " rpg",
        " ttrpg",
        " fantasy",
        " procedural"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e0aba9f2603935313b8a569fa13e984d1f663e4c6b3234cee1c8ed6162b5f045",
                "md5": "a17d741de73cb08a4c2e737c801b1339",
                "sha256": "fbc451511813868f1004a6415dbe69f386c640be27708db34454264de6c3184a"
            },
            "downloads": -1,
            "filename": "wyrdbound_rng-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a17d741de73cb08a4c2e737c801b1339",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 43178,
            "upload_time": "2025-07-29T03:42:22",
            "upload_time_iso_8601": "2025-07-29T03:42:22.536567Z",
            "url": "https://files.pythonhosted.org/packages/e0/ab/a9f2603935313b8a569fa13e984d1f663e4c6b3234cee1c8ed6162b5f045/wyrdbound_rng-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "12e0ab64d520098745a58950cefae0f0783660153a05f71b933cc6b7273bc6a9",
                "md5": "2ce87449c3d75f3d3d2b05e7449e2714",
                "sha256": "1f031a584adebfd2e8443da62aa68e8eb3e58d8abc243f96d85de0b7ede2fc4a"
            },
            "downloads": -1,
            "filename": "wyrdbound_rng-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2ce87449c3d75f3d3d2b05e7449e2714",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 49425,
            "upload_time": "2025-07-29T03:42:24",
            "upload_time_iso_8601": "2025-07-29T03:42:24.168732Z",
            "url": "https://files.pythonhosted.org/packages/12/e0/ab64d520098745a58950cefae0f0783660153a05f71b933cc6b7273bc6a9/wyrdbound_rng-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 03:42:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wyrdbound",
    "github_project": "wyrdbound-rng",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "wyrdbound-rng"
}
        
Elapsed time: 2.10070s