Expand description
§Phyla-Lang: Procedural Language Generation
A Rust library that generates consistent, deterministic constructed languages (conlangs) based on cultural personality traits and geographic influences.
§Core Concepts
Languages emerge from parameterized cultural profiles. The same input parameters always produce the same linguistic output (deterministic generation).
§Quick Start
use phyla_lang::{Language, CulturalProfile, Geography};
// Create a language from cultural parameters
let coastal_culture = CulturalProfile {
agreeableness: 4.0,
openness: 3.0,
conscientiousness: 2.0,
extraversion: 3.0,
honesty_humility: 3.0,
emotionality: 4.0,
};
let language = Language::from_culture(
coastal_culture,
Geography::Coastal,
12345, // seed for deterministic generation
);
// Translate words and phrases
let word = language.translate_word("house");
let phrase = language.translate_phrase("I bring the beer quickly");
// The same input always produces the same output
assert_eq!(word, language.translate_word("house"));
Structs§
- Consonant
- A consonant sound.
- Cultural
Profile - HEXACO personality model scores (1-5 scale). These traits map to linguistic features.
- Language
- A complete language with its genome and optional caching.
- Linguistic
Genome - The complete linguistic genome - all parameters needed to generate consistent output.
- Phoneme
Inventory - The complete inventory of sounds available in a language.
- Vowel
- A vowel sound.
Enums§
- Geography
- Geographic environment that influences phonology.
- Morphology
Type - Morphological type of the language.
- Syllable
Structure - Syllable structure patterns (e.g., CV, CVC, CCVC).
- Word
Order - Word order patterns.