Jump to content
Sign in to follow this  

Disecting a database... Help with syntax, please (P.S. this is a bit long and boring)

Recommended Posts

I need an offline dictionary.

I did some searches and some e-mails, and found this one... Wordnet.



License Info (just the important bit):

"Permission to use, copy, modify and distribute this software and database and its documentation for any purpose and without fee or royalty is hereby granted"

Perfect candidate for my offline dictionary.

Now the hard part... I have database files.

I downloaded "WordNet 3.1 DATABASE FILES ONLY"

I dove in, started looking at the files and decided that it was probably best to use


Unfortunately, the syntax inside these files is a bit more complicated than I can figure out just by looking at the files alone.

So... the program I'm working on goes in alphabetical order.

First is, "adj.all"

Let's look at the first line.

[{ [ ABLE, noun.cognition:ability,+ noun.attribute:ability,+ UNABLE,!] noun.attribute:ability,= noun.cognition:ability,= ((usually followed by `to') having the necessary means or skill or know-how or authority to do something; "able to swim"; "she was able to program her computer"; "we were at last able to buy a car"; "able to get a grant for the project") }

What I can figure out:

The type marker is to the right of the text.

Main word is followed by ,

Antonym is followed by ,!

The definition is enclosed is parenthesis

The definition and example sentences are separated by ;

I'm not sure what ,+ is

I'm not sure what ,= is

If you look at more lines, it appears comma plus is some type of grouping component.

Special group names seem to be followed by ,;c or ,;u

,^ appears to be for similes

Moving on to the next file in the list... adj.pert

They have added , for another grouping

and now they also have alternate forms of the word

It appears that the words and their alternate forms are enclosed in square brackets.

Blah blah blah, I'm listing off tons of unorganized details about tedious files.

Essentially... I need help figuring out how to turn this database into something readable.

Mainly, I'm trying to figure out the grouping system that they're using.

The program that I'm working on will go through every file and create a single text document for each word. Inside the document will be the information such as, "noun, verb, adjective, etc" definition, antonym, synonym... the works.

I can code all the stuff myself, I just need help deciphering the raw data.

Thank you, and sorry for the huge post.

If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post

Link to post
Share on other sites

Well, to understand how stuff works, it can be helpful to look at the final output.
Download and install WordNet 2.1 and manually replace the database files with the 3.1 ones.

Search for 'able' both normally and with all options on (Options -> Set Advanced Search Options)

Clicking on 'Adjective' will bring up additional display options including synonyms, antonyms, value of, derivative forms, and familiarity.

Things I've figured out so far:

,+ and .=    Mark derivatives / values of, although I don't know which is which.


P.S. This should be in Chat but I'm not sure you have access to that.

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects
Cisco FinesseGithubIRC UDFWindowEx UDF


Share this post

Link to post
Share on other sites

Thank you for the suggestion. I also noticed that with the download, they offer the source code. I will have to look inside there on how they did the actual search function as well. It will take a bit of time, but I will be able to figure out exactly how all the words are connected that way. Thank you.

If you need help with your stuff, feel free to get me on my Skype.

I often get bored and enjoy helping with projects.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...