The Lexicon Engine
How Leylines builds languages for your worlds using real linguistics, not AI.
What it does
The Lexicon Engine lets you create constructed languages (conlangs) for the cultures in your world. It generates names for people, places, artifacts, and factions that all sound like they belong to the same language. Every word follows consistent phonological rules, so your world feels linguistically coherent.
The generation engine runs entirely in your browser. No API calls, no external services, no usage costs. Pure TypeScript, deterministic algorithms. The same inputs always produce the same outputs.
How it works
Phonology
Each language defines its sound inventory: which consonants, vowels, and diphthongs exist. It also defines rules about which sounds can appear together. For example, English allows "str" at the start of a word but not "ngr". These are called phonotactic constraints.
The engine uses the Sonority Sequencing Principle, a real linguistic rule that says sounds in a syllable should rise in "loudness" from the edges to the center. This is what makes generated words sound natural rather than random.
Markov Models
For each of the 31 real-world language families we studied, we built a statistical model of how sounds follow each other. These are trigram Markov chains, which means the engine looks at every group of three characters to learn the patterns of a language.
You can blend multiple models together. Want a language that sounds 60% Finnish and 40% Japanese? The engine interpolates the probabilities and generates words that feel like a natural mix.
Word Generation
The engine supports three generation modes:
- Rule-based: Builds syllables from your phonology rules, then assembles them into words. Predictable and controllable.
- Markov-based: Uses the statistical models to generate words that match the "feel" of real languages. More organic.
- Hybrid: Generates a Markov candidate, then validates it against your phonology rules. The best of both.
Naming Conventions
Each language preset defines how names are formed for different categories: people, places, artifacts, and factions. This includes syllable count ranges, common suffixes (like "-heim" for Norse places or "-ara" for Elvish names), and compound word separators.
When you generate a name, the engine picks the right conventions for the category, builds a root word, then applies the cultural affixes. The result sounds like it belongs.
Living Lexicons
Every language accumulates a dictionary over time. Root words gain meanings, compound words build from established vocabulary, and place names become etymologically rich. When you generate a word, it gets stored in the lexicon, so future generations can reference and build upon it.
8 Aesthetic Starting Points
Each starting point is a curated phonological profile that captures the sound and feel of a cultural archetype. They are starting points, not constraints. You can modify any preset's consonants, vowels, diphthongs, syllable rules, and naming patterns to make it your own.
Elvish / Fae
Flowing, melodic, vowel-heavy
Elves, forest peoples, ancient civilizations, fae courts
Dwarven / Norse
Hard consonants, compact syllables
Dwarves, vikings, warrior cultures, mountain halls
Orcish / Dark
Guttural, harsh, aggressive
Orcs, war clans, dark armies, barbarian hordes
Desert / Semitic
Rich consonant clusters, long vowels
Desert empires, merchant guilds, scholars, nomads
Eastern / Ceremonial
Tonal, balanced, formal
Eastern courts, monks, honor-bound cultures
Classical / Imperial
Structured, precise, dignified
Classical empires, academics, religious orders
Tropical / Oceanic
Open syllables, vowel-rich
Island peoples, seafarers, ocean cultures
Ancient / Primal
Deep, resonant, elemental
Ancient ancestors, primordial peoples, root cultures
Using the Lexicon
Create a Language
Pick an aesthetic starting point or start blank. Adjust the four sliders (harshness, density, warmth, length) to shape the overall feel. Edit individual consonants, vowels, and diphthongs for precise control. Add morpheme roots with meanings.
Generate Names
Generate person names, place names, artifact names, and faction names. Every generated name comes with its etymology breakdown, showing which roots contributed which meaning. Lock names you like and regenerate the rest.
Inline with /gen
Type /gen anywhere while writing in the editor or naming a node. A popup lets you pick a language and category, then insert a generated word directly. The Forge can auto-detect which language to use based on your world's connections.
Build a Lexicon
Save generated words to your world's dictionary. Over time, each language builds a living vocabulary that grows richer as you name more people, places, and things. Future generations can reference and build upon established words.
Built with craft, not AI
The Lexicon Engine uses deterministic algorithms, not language models. Every word can be traced back to specific phonology rules and Markov probabilities. The same inputs always produce the same outputs. No hallucinations, no inconsistencies.
Your world data belongs to you. Everything is encrypted at rest, never used for AI training, and never shared with third parties. You can export your entire world as Markdown and JSON, or delete it from our servers at any time.