Sergey Chernyshev wrote:
> Yes, I needed a query that'll work under assumption that "has friend" 
> is the
> inverse of "has friend".
There are two ways for doing so. The RDF and the OWL way.
In RDF you have to make two relations:
      (A , has friend , B)
      (B , has friend , A)
In OWL you have to define that "has friend" is symmetrical:
      (has friend , rdf:type , owl:SymmetricProperty)
      (A , has friend , B)
But this comes with the problem that when you define:
      (has friend , rdf:type , owl:SymmetricProperty)
      (A , has friend , B)
      (A , has friend , C)
It implies that C and B are friends.
Therefore "has friend" is not symmetrical as you might thought.
Instead "has friend" is just the opposite of "is friend of".
The correct OWL-like relation is therefore:
      (has friend , owl:inverseOf , is friend of)
      (A , has friend , B)
      (B , has friend , A)   // only if so, because it don't need to be

In SMW there is currently only RDF support.
What you are missing is the OWL-DL reasoning.
>
> I wonder if storing all semantic data in some external storage that 
> supports
> sparql would be better for SMW.
Originally it was intended to use the JENA-Framework to do so.
But the problem appears that JENA is written in Java.
According to the rules of Wikimedia Java was not acceptable, because 
Java is not really free.
Its intended to export the propitary database as RDF.
With these RDF you can import the knowledge into a specialised Semantic 
database like JENA.
JENA can provide reasoning and SPARQL.
Later the Export might be done automatically.
>
> I understand that simple queries need to stay simple but complex ones 
> should
> still be possible and there is no reason to invent new query language for
> those.
That's true.
There is no need to hack the parser.
The only thing is that OWL-DL reasoning is not implemented.
This is, because support is currently for RDF only.

I guess it might be a really good thing to implement reasoning into SMW.
It would be cool if the database layout would implement a new row for 
thracking the origin of a statement.
     Origin     |     Subject   |   Relation    |   Object
Then you can store from which article a specific statement comes from.
Using this allows it to find and delete the statements that needs 
updates after editing a article.
After the old statements are deleted you have to do the reasoning for 
the changed article again.

But the biggest problem with reasoning still keeps.
When you ie. define something like:
      (has friend , owl:inverseOf , is friend of)
      (A , has friend , B)
      (A , has friend , C)
then you result in:
      (has friend , owl:inverseOf , is friend of)
      (A , has friend , B)
      (A , has friend , C)
      (B , is friend of , A)
      (C , is friend of , A)
The ammount of information gets nearly doubled with a single line.
Resoning is not scaleable, which can be a bad thing for a really big 
database like Wikipedia.

ys, MovGP0


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to