Crate phyla_lang

Crate phyla_lang 

Source
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.
CulturalProfile
HEXACO personality model scores (1-5 scale). These traits map to linguistic features.
Language
A complete language with its genome and optional caching.
LinguisticGenome
The complete linguistic genome - all parameters needed to generate consistent output.
PhonemeInventory
The complete inventory of sounds available in a language.
Vowel
A vowel sound.

Enums§

Geography
Geographic environment that influences phonology.
MorphologyType
Morphological type of the language.
SyllableStructure
Syllable structure patterns (e.g., CV, CVC, CCVC).
WordOrder
Word order patterns.