Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Language files in SQLite database  (Read 1290 times)

clball

  • Escaped Lunatic
    • View Profile
    • Twitter
Language files in SQLite database
« on: October 07, 2014, 10:36:55 pm »

Just what it says on the tin! I parsed the DF language files into a little SQLite database. I tried to keep the structure at least sorta similar to what was present in the flat files. It also dumps a SQL file so you can create the tables on whatever other database software you wanna use. Tables included are nouns, verbs, adjectives, prefixes, symbols(good, flowery, evil, etc categories for words), and a table for each in-game language.

The database, SQL file, and the parsing script are available to download here. The example_output.zip file is all you need unless you want to parse from custom language files or an older version of DF. The source repository is here if you want to fork it or whatever.

Let me know if you have any suggestions for changes to database structure, the parser, or anything else. I know this is a pretty simple contribution, but I hope it helps save time for some other programmers out there or motivates someone to do something cool.

Now go have fun! I'm thinking I'm gonna make a web translator for the DF languages, then maybe just construct dumb sentences with the tables of nouns and everything. Remember the symbols categorize words by theme! That can be helpful depending on what you want to do.
« Last Edit: October 08, 2014, 05:11:34 am by clball »
Logged

Poonyen

  • Bay Watcher
  • Yarg!
    • View Profile
    • My YouTube page
Re: Language files in SQLite database
« Reply #1 on: October 08, 2014, 04:31:59 am »

 :-\ but... look at my signature (not the music part).

It's still a little buggy, but I do use my TLU for song writing, translation and adding words and concepts etc. like you propose.

I might be the only one still using it, though.
Logged
I like to make music especially for Dwarf Fortress and Soundsense in my spare time (https://www.youtube.com/simonswerwer, http://soundcloud.com/simonswerwer). Also check out Toadese Language Utility to read and write DF dwarven texts (http://www.bay12forums.com/smf/index.php?topic=136098). Bang the tankards!

clball

  • Escaped Lunatic
    • View Profile
    • Twitter
Re: Language files in SQLite database
« Reply #2 on: October 08, 2014, 05:05:08 am »

:-\ but... look at my signature (not the music part).

It's still a little buggy, but I do use my TLU for song writing, translation and adding words and concepts etc. like you propose.

I might be the only one still using it, though.

Oh dang! I guess I didn't search thoroughly enough for if a translator had already been done. Yours looks very fully-featured! No point in me re-inventing the wheel, so I'll probably skip straight to using the part of speech tables to generate silly sentences and maybe dumb titles and item names. ;)

And of course, the database is available so anyone can use it for whatever they can imagine!
« Last Edit: October 08, 2014, 05:18:23 am by clball »
Logged

Poonyen

  • Bay Watcher
  • Yarg!
    • View Profile
    • My YouTube page
Re: Language files in SQLite database
« Reply #3 on: October 08, 2014, 05:18:51 am »

I'd throw it on github and open source it if I had enough confidence in my programming abilities, but I think it would cause some deaths in the community.

Perhaps I can clean it up one day and add decent comments. At the moment it's just a mess under the hood.

I cleaned it up a little and added some features the other day to help with poetry/song writing, but I stopped publishing because of lack of interest. I can get off my ass and take a swing at it again if you push me a little ;) There's a whole subsystem dedicated to easily replaceable fan-based language rules and extensions or "propositions" (more details in the thread). It might be useful if you want your sentences to have pronouns and stuff.
Logged
I like to make music especially for Dwarf Fortress and Soundsense in my spare time (https://www.youtube.com/simonswerwer, http://soundcloud.com/simonswerwer). Also check out Toadese Language Utility to read and write DF dwarven texts (http://www.bay12forums.com/smf/index.php?topic=136098). Bang the tankards!