Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 11

Author Topic: DFLang: generate realistic language raws, every time.  (Read 75476 times)

Igfig

  • Bay Watcher
    • View Profile
DFLang: generate realistic language raws, every time.
« on: January 03, 2010, 10:12:11 am »

DFLang is a tool for creating unique modded languages.

It takes a collection of words from one or more existing languages and randomly generates a number of additional words that sound like they could belong to that language. It takes these generated words and uses them to construct a well-formatted raw file of the language_###.txt variety.

(For instance, if you give DFLang a bunch of hebrew words, it might generate words like "oshebah" and "anayyim"; if you give it some chinese words you'll get things like "yinxiu" and "conguan"; if you give it both you might get "nefenguo" or "baochol".)

But wait, there's more! You know how in DF most words are associated with symbols like FLOWERY or UNTOWARD? DFLang gives you the option of generating a root for each of these symbols. Words associated with a symbol will be very likely to include the corresponding root.

(For instance, if the root for FLOWERY is ''fol", then BERRY might be assigned the word "efolab" and BLOSSOM might get "desafolu".)


To install, just extract DFLang.rar into your Dwarf Fortress directory (or wherever else you like).

If you're on a Windows machine, you can run DFLang with the DFLangWin.exe file, which provides a nice GUI. Everything you need will be supplied to you; just start the program, browse for one or more language files (use CTRL+click to select multiple files), and hit Generate Language! The new raw file will be in the same folder as your words file (probably the DFLang folder).

If you're on Linux or a Mac, you'll have to go to the DFLang Folder and use the command "python DFLang [options] langfile1 [langfile2...]". Use the --help option for more details. Oh, and you'll need Python installed on your computer; you may also have to add the DFLang folder to your PATH variable.


As well as the program itself, I've supplied a few language files in DFLang/languages. These include a few real-world languages, and also the standard languages already existing in DF.

Enjoy!


Download from DFFD
Zip version, if you don't like rars.

Taritus

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #1 on: January 03, 2010, 10:21:11 am »

I'm not too sure why, but I can't get it to load a language file.  I'm on Windows Vista if it matters.
EDIT:  Okay...  Now it's loading them.  I guess I just had to mess with the defaults file.
« Last Edit: January 03, 2010, 10:24:26 am by Taritus »
Logged



Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #2 on: January 03, 2010, 10:26:40 am »

The default probably points to somewhere that doesn't exist.  There's an address preloaded in the program, but you'll probably have to find it yourself instead.

I generated a language file based on Olde English.  Got [T_WORD:AWE-INSPIRING:what].  What indeed, yuk yuk.  (Woo, first download.)  However-

But wait, there's more!  You know how in DF most words are associated with symbols like FLOWERY or UNTOWARD?  DFLang gives you the option of generating a root for each of these symbols.  Words associated with a symbol will be very likely to include the corresponding root.

(For instance, if the root for FLOWERY is ''fol", then BERRY might be assigned the word "efolab" and BLOSSOM might get "desafolu".)

I don't understand how to do this.  I see a symbol file option yes, but not a way to tell the program what to associate with what, if it's doing that at all.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Cruxador

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #3 on: January 03, 2010, 10:47:34 am »

(For instance, if the root for FLOWERY is ''fol", then BERRY might be assigned the word "efolab" and BLOSSOM might get "desafolu".)
Um... "flowery" doesn't pertain to actual flowers. It means that the word in question is fancy-talk.
Logged

Igfig

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #4 on: January 03, 2010, 10:56:57 am »

I see a symbol file option yes, but not a way to tell the program what to associate with what, if it's doing that at all.

DFLang generates a random root for each symbol, and assigns roots to words based on which symbols a given word is associated with in the symbol file.  Specifically, it randomly chooses one of the word's associated symbols and tries to generate a translation that includes that symbol's root.  In other words, it's not something you'd really notice unless you were looking for it specifically.

It doesn't say what a given root means, although you can probably figure that out by comparing words with related symbols.  Alternately, I could rig it to return a list of what the roots are (either in the console or in a file) if you'd really like that.

In other words, you can't really tell DFLang what to associate with what unless you want to start mucking around with language_SYM.txt.


Um... "flowery" doesn't pertain to actual flowers. It means that the word in question is fancy-talk.

Hey, don't blame me for that.  Toady's the one who made the symbol files.

Astramancer

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #5 on: January 03, 2010, 12:30:04 pm »

Flowery also means having to do with flowers.  And I'm pretty sure the origin of "flower language" comes from the fact that it's pretty, and useless - like decorative flowers.
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #6 on: January 03, 2010, 01:22:43 pm »

Oh wow, this is really cool.

Flowery also means having to do with flowers.  And I'm pretty sure the origin of "flower language" comes from the fact that it's pretty, and useless - like decorative flowers.

Let's please not crap up this thread arguing about it, it hardly matters.
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #7 on: January 03, 2010, 01:38:08 pm »

Works quite well from what I've tried.   Plugged in what I got off of some random source on the intertubes for D&D Draconic and it generated something believable. Sure as hell beats putting the language together by hand.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Fieari

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #8 on: January 03, 2010, 02:12:51 pm »

I can't download this right now since I'm at work... is there any chance you could seed it not only with a source dictionary, but also with word construction rules?  Also, could you seed the symbol root list with your own choices and have it generate from there?

D&D Draconic just has a smattering of vocabulary published, but if you could put that vocabulary in the symbols, you could evolve a descendant language from that, I think.
Logged

Stormrage

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #9 on: January 03, 2010, 02:15:46 pm »

lol i did english with symbolism and i got the root "fec" in ugly! it got many feces (anus: fecen) and it had amfecate (very close to defecate) on crotch!
Logged

Rafal99

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #10 on: January 03, 2010, 02:34:42 pm »

Hmm i have a problem. I am using Windows version.
I click 'Browse', select some language file, then click 'Open', but nothing heppens. 'Language files' field stays blank, and when i try to generate it says 'No language file found'.
Logged
The spinning Tantrum Spiral strikes The Fortress in the meeting hall!
It explodes in gore!
The Fortress has been struck down.

Igfig

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #11 on: January 03, 2010, 03:11:47 pm »

Could you seed the symbol root list with your own choices and have it generate from there?
That would be a bit of work, but as you're the second person to ask about it I'll see what I can do. 

Part of the problem there is that if the user specifies roots that wouldn't appear naturally in the language, those roots will never show up, which would be disappointing.  Maybe I'll have a thing where you can generate a roots file from a language, modify it if you like, and then optionally use the file in symbol-style generation.

Quote
Also, is there any chance you could seed it not only with a source dictionary, but also with word construction rules?
Not easily.  The guts of the program would need a pretty major rewrite to go from linear generation to tree-based.  I'm also not entirely sure how I'd reconcile the two methods if somebody wanted to use both a dictionary and a grammar.

Not that I'm saying I won't; I'd definitely like to do something like that.  I'm just going to need to think about it a lot and play around with some language toolkits.  Check back in a few versions.

Quote
D&D Draconic just has a smattering of vocabulary published, but if you could put that vocabulary in the symbols, you could evolve a descendant language from that, I think.
In a language file, you mean?  Yeah, totally.  Just make sure it's got at least a hundred words in it, or DFLang might freeze up due to lack of data.

Igfig

  • Bay Watcher
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #12 on: January 03, 2010, 03:21:18 pm »

Hmm i have a problem. I am using Windows version.
I click 'Browse', select some language file, then click 'Open', but nothing happens. 'Language files' field stays blank, and when i try to generate it says 'No language file found'.

That's weird.  What version of Windows are you on?  Does the problem occur repeatedly, or does it work normally sometimes?  Where did you install DF and DFLang?  Have you done anything with defaults.txt?

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: DFLang: generate realistic language raws, every time.
« Reply #13 on: January 03, 2010, 03:28:38 pm »

Part of the problem there is that if the user specifies roots that wouldn't appear naturally in the language, those roots will never show up, which would be disappointing.  Maybe I'll have a thing where you can generate a roots file from a language, modify it if you like, and then optionally use the file in symbol-style generation.
I imagine you could list them by frequency of occurrence. I don't know how your algorithm is working, but if you make a big stack of the different chunks that appear (or even the top 'n', where n is definable by the user) and populate a list with them based on ranking, that might be one solution. In any case, if the user wants to have a root that doesn't appear in the language at all, that's an issue with the user and not the program :P Just pop a notification telling them that.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: DFLang: generate realistic language raws, every time.
« Reply #14 on: January 03, 2010, 03:58:12 pm »

Hmm i have a problem. I am using Windows version.
I click 'Browse', select some language file, then click 'Open', but nothing happens. 'Language files' field stays blank, and when i try to generate it says 'No language file found'.

That's weird.  What version of Windows are you on?  Does the problem occur repeatedly, or does it work normally sometimes?  Where did you install DF and DFLang?  Have you done anything with defaults.txt?

I'm also having this problem. I'm on Windows Vista, and this problem always happens. My DF folders are in a folder on my User folder (i.e. C:\Users\nameofuser\), and I extracted DFLang to one of my DF folders. I changed defaults.txt so the paths were correct.
Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.
Pages: [1] 2 3 ... 11