morphonym - an RFC 1178 compliant implementation to generate pronounceable, memorable names. Offers both RFC 1178 compliant real-word themes and advanced linguistic syllable generation. Inspired by petname.
- Real Word Themes: Nature, colors, mythology, scientific terms, animals
- Theme-Based Naming: Follows RFC 1178 guidance for meaningful names
- Non-Conflicting: Avoids common technical terms and personal names
- Memorable: Uses actual words that are easy to remember and spell
- Classic Pattern: adjective + adverb + animal names
- Original petname Style: Replicates the famous petname library approach
- Flexible Word Count: 1-3 words with different patterns
- RFC 1178 Compliant: Uses animal names as suggested in the RFC
- Phonetic Accuracy: Uses real phonotactic constraints and sonority sequencing
- Billions of Combinations: Generates unique, pronounceable names following natural language patterns
- Gender-Aware: Supports masculine, feminine, and neutral naming styles
- Customizable: Configurable word count, separators, and linguistic parameters
- Phonetic Inventory: Complete consonant and vowel sets with articulatory features
- Sonority Sequencing: Ensures natural sound flow (consonants rise to vowels, then fall)
- Phonotactic Constraints: Only allows consonant clusters that exist in real languages
- Stress Patterns: Natural rhythmic patterns (trochaic, iambic, dactylic)
- Word-Final Rules: Applies phonological rules like devoicing
words: number of words in the name (default: 2)separator: string used to separate name words (default: '-')gender: gender style for name generation -masculine,feminine,neutral(default: neutral)mode: generation mode -linguistic(syllable-based),rfc1178(real words), orpetnametheme: theme for RFC 1178 mode -nature,color,mythological,scientific,petname
git clone https://github.com/locch/morphonym.git
cd morphonym
# Using uv (recommended)
uv pip install -e .
# Or using pip
python3 -m pip install -e .# RFC 1178 compliant (default mode)
morphonym -m rfc1178 -t nature
# Output: "mississippi-cedar"
# Different themes
morphonym -m rfc1178 -t color
# Output: "cobalt-amber"
morphonym -m rfc1178 -t mythological
# Output: "hercules-athena"
morphonym -m rfc1178 -t scientific
# Output: "quantum-photon"
# Petname mode (classic style)
morphonym -m petname -w 1
# Output: "spider"
morphonym -m petname -w 2
# Output: "square-porpoise"
morphonym -m petname -w 3
# Output: "seriously-positive-moth"
# Advanced linguistic mode
morphonym -m linguistic
# Output: "kraidon-shoulei"
# Custom parameters
morphonym -w 3 -s "_" -m rfc1178 -t nature
# Output: "fox_baobab_elk"
# Gender-specific (linguistic mode only)
morphonym -g masculine -m linguistic
# Output: "kronan-thegor"import morphonym
# RFC 1178 compliant (real words)
name = morphonym.generate(mode="rfc1178", theme="nature")
# Output: "mississippi-cedar"
# Different themes
color_name = morphonym.generate(mode="rfc1178", theme="color")
# Output: "cobalt-amber"
myth_name = morphonym.generate(mode="rfc1178", theme="mythological")
# Output: "hercules-athena"
sci_name = morphonym.generate(mode="rfc1178", theme="scientific")
# Output: "quantum-photon"
# Petname mode (classic style)
single_animal = morphonym.generate(1, mode="petname")
# Output: "spider"
adj_animal = morphonym.generate(2, mode="petname")
# Output: "square-porpoise"
adv_adj_animal = morphonym.generate(3, mode="petname")
# Output: "seriously-positive-moth"
# Advanced linguistic mode
name = morphonym.generate(mode="linguistic")
# Output: "kraidon-shoulei"
# Custom parameters
name = morphonym.generate(words=3, separator="_", mode="rfc1178", theme="nature")
# Output: "fox_baobab_elk"
# Gender-specific (linguistic mode)
feminine_name = morphonym.generate(mode="linguistic", gender="feminine")
# Output: "aelia-zorei"
masculine_name = morphonym.generate(mode="linguistic", gender="masculine")
# Output: "kronan-thegor"# Container names
container_name = morphonym.generate(1, gender="neutral")
# "zhothai"
# Hostnames
hostname = morphonym.generate(2, separator=".", gender="masculine")
# "kronan.thegor"
# Project names
project_name = morphonym.generate(3, separator="_", gender="feminine")
# "aelia_zorei_mirei"
# Unique identifiers
unique_id = morphonym.generate(4, separator="")
# "zhothai kronanthegoraelia"Morphonym uses principles from:
- Phonology: Study of sound systems in languages
- Phonotactics: Rules about which sounds can combine
- Sonority Theory: Hierarchical organization of sounds by loudness
- Morphology: Study of word formation patterns
The system ensures all generated names follow natural linguistic constraints, making them truly pronounceable and memorable.
python3 -m pytest test.py -v# Type checking
python3 -m mypy morphonym/
# Linting
python3 -m ruff check morphonym/
# Formatting
python3 -m ruff format morphonym/Apache License 2.0 - see LICENSE file for details.
Contributions welcome! Please ensure all tests pass and follow the linguistic accuracy principles when making changes.
Generate billions of unique, pronounceable names with real linguistic accuracy.