Clone wiki

SuperSimpleSemantics / A super simple guide to creating or contributing data

A super simple guide to contributing SuperSimpleSemantic data

The whole point of the Green Fruit Engine, and its “Super Simple Semantic” format, is to allow anyone to contribute their knowledge to it.

The idea is that is everyone contributes their own expertise or knowledge into this “mesh” of data, and the database gets increasingly more useful because of it.

To contribute data to the mesh

In order to contribute data to the mesh, you do need the following:

- A web-server you can add a text file too, preferably at your own domain name.

- The ability to make and upload a text file ;)

The basic steps to contribute data

1. Think of a list of things that belong to a group.

It might be a list of every fruit you can think of. Or a list of albums by a certain band, or films by a certain director.

Anything that all goes in one category, and that your fairly confident is true.

2. Make a text file containing nothing but this list.

eg. you could make a text file called isfruit.txt containing;

``` #!

Apple
Orange
Tomato
Pear
Lemon
```

3. Upload this file to a directory on your server.

For example darkflame.co.uk/Semantics/isFruit.txt

You can stick it anywhere, but I recommend making a sub-directory for it called something like “Semantics” or “Ontology”.

4. You now also need to make a index file, so that the GreenFruitEngine can easily see all the SSS lists on your server.

This is a little more complex then the list file, but still fairly simple.

Heres a index file linking to the isFruit.txt file above.

``` #!

prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>;

isFruit.txt rdfs:subClassOf Fruit.

```

The first two lines, [at]prefix, should always be there. They define shorthand ways to write w3c standard semantic uris.

All that means is

“rdfs:” becomes “http://www.w3.org/2000/01/rdf-schema#”;

and thus

“rdfs:subClassOf” becomes “http://www.w3.org/2000/01/rdf-schema#subClassOf”;

Think of it as shorthand for urls.

If you don’t understand fully the rdfs buisness, don’t worry, just include those two lines at the start of the file.
You can, however, add additional prefixs as well, which might be useful
if you have big locations to specify.

After the prefix lines, we start to specify the locations for the information your contributing, as well as what that information means.

In this example, we are just contributing 1 file listing fruits.

You can have lots of txt files listing different types of things, just by having more lines like this.

``` #!

isFruit.txt rdfs:subClassOf Fruit.
```

First is the file name. Then a space. Then rdfs:subClassOf which means everyone in that file is a “a type of”
So, in this case, it means “its a type of fruit”
So the last bit simply is “Fruit”.

Finally the line has a dot, which tells the engine theres no more information about this file here.

To give another example, if you had a file listing different types of apple, you would use the line

``` #!

isApple.txt rdfs:subClassOf Apple.
```

If all you are specifying is a list of things are are all “a type of”, thats pretty much all you need to do.

If, however, the file you made lists things are all have a certain property…for example, things are are green, you have to do it this way instead;

``` #!

isColor_Green.txt http://dbpedia.org/ontology/Colour Green.
```

You notice we arnt using rdfs:subClassOf, because the file does not contain types of green, but rather things which are colored green.

So, instead, we have http://dbpedia.org/ontology/Colour, which is a way to refer to color so that the database can understand it.

This middle word is called a predicate. If you were listing films by a certain director, you might use

``` #!

isDirectedBy_EdWood.txt DirectedBy EdWood.
```

Or, better,

``` #!

isDirectedBy_EdWood.txt http://dbpedia.org/ontology/director EdWood.
```

If possible use dbpedia definition of the predicate, as this tells the database your using the standard meaning of that word.

(To find a DBPedia definition try googleing “dbpedia” followed by the word your looking for. Look for the result thats “http://dbpedia.org/ontology/”; followed by that something.
This is a crude method, but will work for a lot of things)

I will cover the details of this, along with more examples and options in the dedicated section on

[https://code.google.com/p/green-fruit-engine/wiki/ntlist_example_file index files].

For now, just write your equivalent of

``` #!

prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>;

isFruit.txt rdfs:subClassOf Fruit.
```

and save it to a file.

5. Give that file an extension that ends in “.ntlist”

eg. myStuff.ntlist

6. Upload to the same location of your list file(s). So, that might be

darkflame.co.uk/Semantics/myStuff.ntlist

7. Send me a link to that file so I can add it to the database!

——

Any comments, clarifications or suggestions please write below :)

Updated