Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[genlanguage] https://github.com/jdkato/prose #16

Open
Flokey82 opened this issue Mar 30, 2023 · 12 comments
Open

Comments

@Flokey82
Copy link
Owner

https://github.com/jdkato/prose seems really interesting! For language tagging etc.

@voidshard
Copy link
Collaborator

Nice! I think I'll need that in the faction segment soonish, I'd like to have names for factions / orgs .. and it'll help on the religion front too; we probably will want names for doctrines, heresies and similar

@Flokey82
Copy link
Owner Author

This will definitely help with generating templates for flavor text since we can just feed it whatever source material for building associations and whatnot. This is already in the ML/AI area, so that's uncharted territory for me :D

@voidshard
Copy link
Collaborator

I tried out building gpt2 yesterday (https://github.com/openai/gpt-2) it requires a few fixes to run these days but the text it output was terrible 🤔 Probably it needs extensive training (more training?) to be useful 😬

@Flokey82
Copy link
Owner Author

Well there are the various Llama offshoots that seem promising... did you try any of those yet? (I haven't but it looks interesting!)

https://github.com/go-skynet/llama-cli
https://github.com/antimatter15/alpaca.cpp

@voidshard
Copy link
Collaborator

Llama and alpaca 😆 no I haven't tried those yet!

@Flokey82
Copy link
Owner Author

I just managed to get this working:
https://github.com/antimatter15/alpaca.cpp

Here is the data that you need to run it:
https://huggingface.co/Sosaka/Alpaca-native-4bit-ggml/blob/main/ggml-alpaca-7b-q4.bin

It works really well(-ish) :)

@voidshard
Copy link
Collaborator

voidshard commented Mar 30, 2023

> in the fantasy genre describe the assassination attempt on the life of a wealth merchant in his villa

The sun was setting, casting an orange hue across the sky as the wealthy merchant made his way through the gates to his grand villa. He had become quite successful over the years and now he enjoyed all that came with it; luxury goods, fine foods, beautiful women - but most of all respect from those around him in this affluent city by the sea. As soon as he stepped inside however, a group of cloaked figures appeared out of thin air before him. He recognised their faces and knew that they had come to assassinate him; his life's work was too great an achievement for them to bear it any longer! But what followed next surprised even himself - the mercenaries were no match against a man so dedicated, as he fought off each of those who dared try and take away all he held dear. In that moment however, one figure remained hidden in their hood; watching from afar with admiration for this brave merchant's courageous stand - the mysterious leader of these assassins had been impressed by his tenacity!

> write a creation myth

Once upon a time there was nothing but an endless void of darkness. Then one day the gods decided that it should be filled with light and life, so they created the world from their minds eye. First came sky and earth then plants, animals, fire and water. Finally mankind emerged to take care of this new home. Thus began a never ending cycle of creation and destruction as men strove for balance in an ever changing universe.

I mean, I think it could do to get us started

@Flokey82
Copy link
Owner Author

https://medium.com/swlh/fine-tuning-gpt-2-for-magic-the-gathering-flavour-text-generation-3bafd0f9bb93 seems also useful! :D

@voidshard
Copy link
Collaborator

There was someone on reddit in r/worldbuilding who designed his own language runes. Then wrote epic poems / sagas of the people. Sorted words into how often they came up and assigned words to them .. building the language up via it's "usage." I thought it was a super cool way of going about it. I wonder what is required to have something build it's own custom fonts 😃

@voidshard
Copy link
Collaborator

Oh I found https://www.youtube.com/watch?v=bjFvRnCYzN4 https://www.internationalphoneticalphabet.org/ipa-sounds/ipa-chart-with-sounds/ on language creation.

Basic steps;

  1. decide which sounds are in the language "phonological inventory" (there are only so many sounds we can produce, so this is probably not too bad to code? .. technically the page has pronunciations for each sound, so we could string these together to create actual voice for generated languages which would be cool!)
  2. decide how syllables are structured (consonants + vowels, probably syllables will always include a vowel, with varying numbers of required/optional consonants at the start/end)
  3. decide on sentence structure with respect to subject-verb-object + adjectives etc
  4. decide a root lexicon for nouns / verbs to get us started - in theory we can now write sentences that are phonetically accurate (at least)

The evolution of the language and it's written form are somewhat extensions to this I guess, with the written language being either based on sound or ideas (I guess?) and it's evolution being related to maybe merging with other languages & changing / adopting / dropping some sounds, adding, removing & shortening existing words etc.

@Flokey82
Copy link
Owner Author

Very interesting! :D I'd really like to write a language generator from scratch... That would make it easier to lay the ground work for cross-language influences, words "going out of fashion", proper dictionaries, and all that. I am not sure if I am smart enough for it though. I might try to write a very, very, very, veeeeeeeerrryyyyyyy simple generator with the most basic basics :)
Then there is the connection between a spoken and a written language. How information is stored in writing is also a curious and diverse field of work. :) Between pictograms, and Chinese or Japanese characters (which are also little pictograms at time), phonetic writing and all that. It could even be based on a decision tree for looking up and refining words using some form of encoding by general idea or category. Like... Plant->Tree->Wood->Wooden Manmade->Tool->Eat->Fork
_
|<- Plant
_
/| <-tree
_
X| <-Wood
_
X|_ <-Wooden

_
|<- Plant
_
/| <-tree
_
/X <-Branch
_
/X_ <-Branching

Or some insanity like that :D

@voidshard
Copy link
Collaborator

I think the ultimate would be having the generator output it's own font of crafted characters .. but then in order to display the fonts people would have to install them somehow .. which I imagine to be non trivial (not that I've tried ever doing so to be honest). But having it generate a language from pictograms in ascii would still be badass 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants