Skip to content

Instantly share code, notes, and snippets.

@benchristel
Created September 8, 2019 16:15
Show Gist options
  • Save benchristel/e584b930d2f6c9a849dd9e36c7d48c0f to your computer and use it in GitHub Desktop.
Save benchristel/e584b930d2f6c9a849dd9e36c7d48c0f to your computer and use it in GitHub Desktop.
Phrasebook generator spec

Panglossia

Goals

The purpose of this project is to produce phrasebooks in computer-generated languages to add flavor to role-playing games or other media.

Anti-goals

This project does not aim to produce comprehensive grammars, dictionaries, or other resources for learning or using the generated languages. The goal is to generate just enough of the language for it to be plausible and feel like it has some historical depth.

User persona

A dungeon master (henceforth, "the DM") who is preparing an encounter with NPCs from a culture different from the PCs' culture, and wants the NPCs to have their own language.

Proposed approach

  • In order to provide a feeling of verisimilitude and make the language immediately usable by the DM, the output of pangloss is a phrasebook. A set of stock phrases in English are translated into the target language. Since each English phrase can be parsed and tagged by hand, this approach obviates the need for the program to parse or interpret English text.

Constructing the Phrasebook

  • generate a phonology.
    • How many vowels are there? A/I/U or A/E/I/O/U?
    • Are there diphthongs?
    • Does length distinguish vowels?
    • What contrasts between consonants are there? How many points of articulation? Is there a voicing distiction? Aspiration? Glottalization? Palatalization?
    • What is the syllable structure like?
    • What sounds are most frequent?
  • generate basic grammar rules
    • What's the word order among verb, subject, and object?
    • What's the word order among noun, adjective, numeral, quantifier, article, prepositional phrase, and relative clause?
    • Is there grammatical gender? Masc/Fem, M/F/Neuter, Animate/Inan., or something else?
    • Is there grammatical number? Singular/Dual/Trial/Plural/Paucal?
    • What constituents of the sentence must agree? Is agreement by gender, number, or both?
    • How are cases marked? Subject/Object, Ergative/Absolutive, Trigger, some kind of exotic theta-role marking?
    • Where are cases marked? IIRC, Swahili marks them on the verb, by adding affixes that agree in gender with the noun constituents of the sentence.
    • Are there prepositions, postpositions, or case affixes for marking oblique roles?
    • What tenses/aspects/moods are distinguished?
  • generate root words in an ancient form of the language
    • More or fewer syllables may be required per root depending on the number of possible syllables in the language.
  • For each sentence in the phrasebook, choose a phrasing. I.e. how does the language translate this abstract conceptual structure into words?
    • For example, in English we say "I like my pet axolotl". Spanish using a different phrasing: "My pet axolotl pleases me." Irish uses yet another: "My pet axolotl is good for me."
    • Having a variety of phrasings in the language model makes it less likely that the resulting language will look like a word-for-word translation of English.
  • Build the sentences from the ancient roots, inflecting them appropriately with grammatical affixes.
  • Apply sound changes to the ancient sentences to modernize them.
  • Write the resulting sentences in a quasi-phonetic transcription.

Priorities

MVP: generate a phonology and some roots; do a morpheme-by-morpheme translation of the English text. The phonology can just be letter frequencies + syllable structure.

Toponyms

...

Greetings

Hello. Greetings. Many greetings. I greet you. Welcome. You are welcome.

Introductions

I am a warrior/priest/musician/poet/wizard/traveler/alchemist And you? Who are you? Are you a warrior/priest/musician/poet/wizard/traveler/alchemist What is your business with us? Why do you seek us? Why do you seek me? Whence do you come? Whither are you going?

Lost

What is this place? Where does this road lead? We are lost. Which way to ____?

In Battle

Hold positions! Wait for my command! Attack! Help us! Save us! Someone hear me! Can anyone hear me? Where are the soldiers? Fall back! Kill them!

Gratitude

Thanks. Thank you. Many thanks. You have my thanks. The bards will sing your praises!

Party

I like this song. That was a good poem. This is a good drink. Bring us drinks! Bring us more meat! Come eat with us! Come drink with us! This tastes like blood. How do you eat this? Are you supposed to swallow them whole? I have a headache. Where is the bathroom?

Emo

Forever. They are gone. I am sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment