Lexivoid
A computational linguistics engine that finds or synthesizes words for feelings that have no name — drawing from 14 language families and 7,000+ languages.
The Problem
Every language has gaps — feelings that exist but have no word. The German "Waldeinsamkeit" (the solitude of being alone in a forest), the Portuguese "saudade" (longing for something you've lost), the Japanese "mono no aware" (the bittersweet awareness of impermanence). These words exist scattered across thousands of languages, but there's no tool that searches all of them at once — or creates new ones when nothing exists.
I wanted to build something that sits at the intersection of linguistics, AI, and emotional intelligence: describe a feeling in plain language, and the engine either finds a real word from another language that captures it, or synthesizes an entirely new word using the phonemic rules of the language families most suited to that emotional texture.
How the Phoneme Engine Works
The core of Lexivoid is a custom-built phonemic synthesis engine written in pure JavaScript. No NLP libraries, no pre-trained models for the word generation — just raw phonological data and algorithmic construction.
Step 1: Common Word Filtering
Before anything else, the engine checks if the input describes a common emotion that already has well-known names. A database of 20+ emotion categories with 200+ trigger phrases catches inputs like "I feel lonely" or "I'm anxious" and redirects them with a curated response explaining the existing words across languages — rather than inventing a redundant neologism. Pattern matching handles variations like "I feel so X", "feeling of X", "I'm really X", and short-form inputs.
Step 2: Emotional Tone Analysis
The input text is analyzed across 8 emotional dimensions: soft, deep, sharp, warm, light, dark, bittersweet, and restless. Each dimension has a curated keyword set (~15-20 words) that maps to phonemic qualities. Phrase-level bonuses boost scores — "but also" and "and yet" boost bittersweet, "can't explain" boosts deep, "used to" boosts bittersweet + warm. Text length itself is a signal: short inputs skew sharp, long inputs skew deep. The system outputs a primary and secondary emotional register that drives phoneme selection.
Step 3: Language Family Selection
14 language families are mapped with full phoneme inventories — onset consonants, vowel nuclei, and coda consonants — each with a distinctive "flavor": Romance (flowing), Germanic (grounded), Slavic (resonant), Japonic (delicate), Semitic (ancient), Celtic (mystical), Indo-Aryan (transcendent), Greek (philosophical), Austronesian (gentle), Finno-Ugric (stark), Turkic (harmonic), Koreanic (balanced), Bantu (rhythmic). The engine selects 2-3 families based on emotional keyword matching, then alternates between their phoneme sets during syllable construction.
Step 4: Syllable Construction
Each syllable follows the onset-nucleus-coda model. The emotional profile biases phoneme selection — "soft" emotions favor nasal/liquid onsets (m, n, l, w) and front vowels (i, e), while "deep" emotions favor voiced stops (d, b, g) and back vowels (o, u, a). A weighted picker gives 65% priority to phonemes that overlap between the emotional profile and the language family's inventory, creating words that "sound like" they belong to that language while carrying the emotional weight of the input.
Step 5: Post-Processing
Raw syllable concatenation produces unpronounceable consonant clusters. A cleanup pass inserts epenthetic vowels when consonant runs exceed 2 characters. A soft-ending pass probabilistically appends terminal vowels for euphony. Length bounds (4-11 characters) are enforced with natural syllable-boundary cutting. A ban-list prevents the engine from accidentally generating common English words. Finally, IPA pronunciation is auto-generated using a custom digraph-to-IPA mapper that handles diphthongs, geminate vowels, and aspirated consonants.
The Hard Part: Determinism
Every word generation uses a seeded PRNG (multiplicative hash of the input string). This means the same input always produces the same word — "the feeling of reading a book someone you lost used to love" will always generate the exact same neologism with the exact same pronunciation, etymology, and language family attribution. This was a deliberate design decision: the words feel "discovered" rather than randomly generated, which is psychologically important for the user experience.
The seed function uses Math.imul with XOR-shift mixing (h ^ (h >>> 16), multiplied by 0x45d9f3b) to produce well-distributed pseudorandom values from string inputs. This avoids the bias problems of simple hash-to-mod approaches.
What I'd Do Differently
The emotional analysis is currently keyword-based, which means it misses metaphorical language and contextual nuance. A transformer-based sentiment model (even a small one like DistilBERT) would dramatically improve the emotional tone detection. I'd also expand the untranslatable word database beyond the current curated set — there are academic datasets of lexical gaps that could be integrated. The phoneme engine could benefit from vowel harmony rules (which Turkic and Finno-Ugric languages enforce strictly) to make generated words sound more linguistically authentic.