Note: Version 1.0.0 is an (almost) direct port of mewo2's JavaScript naming-language generator. These initial ideas are his, and I have changed very little of the actual inner-workings (other than basically turn it into a class). I would highly encourage everybody to go and checkout his original repo (link above), read his documentation on how the language generator works, and follow @unchartedatlas
- v1.1.0 - Added import/export functionality! Now you can save your languages for later
- v1.0.3-1.0.5 - gemspec description changes (way to go RDoc Markdown processor, you're nothing like the others. I hope you feel special)
- v1.0.2 - Minor re-factor moving
Glossa::Language
into its own file, removed some debug statements, and fixed a bug that was generating morphemes with a key ofnil
gem install glossa
Glossa
is a module that holds the API for a "naming language generator generator."
You can create a basic language via lang = Glossa::Language.new
, a random language by lang = Glossa::Language.new(true)
, or you can create a language with specific rules by passing in a hash: Glossa::Language.new(false, options)
Additionally, you can create an instance of a new language by importing a JSON language file: lang = Glossa::Language.import(path)
Creating an instance of Language
like this will provide you with a name/word generator that follows the specific rules for syllables, phonemes, morphology, orthography etc. that were defined in initialization.
Generate a new name: lang.make_name([optional type])
. This will create a new name constructed using a mash of typed and un-typed phonemes.
Generate a new word: lang.get_word([optional type])
. Will create a simpler than a name but unique word.
Passing in a type will generate phonemes that have only that type in order to create words that sound unified.
At any time, you can export a JSON file with the state of your language generator (including all the words and names you've already generated) by lang.export(path)
.
lang.make_name("tree")
lang.make_name("city")
lang.make_name
lang.get_word("city")
lang.get_word
I'll go ahead and put the same ideas as mewo2 had for his language tool, and add some of my own too:
- Synchronic sound changes: rules which change some of the sounds depending on context (e.g. German /d/ becomes /t/ at the end of a word, Latin /k/ becomes /ʧ/ before /i/ or /e/)
- Historical sound changes: start with an 'ancestral form' and evolve the word systematically. Do this in multiple ways to produce a family of languages.
- Generated scripts: why should a generated language use the Roman alphabet? How do these people write things among themselves? Invent an alphabet (or similar) and show how the names are really spelled.
- Better grammar: break our morphemes out into roots and modifiers, and come up with some rules about how they're combined