> For example, on the Amterdam page, one could say: > > [[capital of::Netherlands]] > > And likewise, on the Netherlands page, one could state: > > [[has capital::Amsterdam]] > > The information content of the two links is identical. SMW should > ideally find such alternatives in inline queries, thus showing users > that a particular piece of information is already present in the wiki > (though on a different page than they might have envisioned it).
Speaking strictly as a potential user, I very much like the idea of having the system automatically recognize and work with inverse relationships. This may be the best possible reason even to use the relationship "has inverse." If searching out inverse relationships is not automatically handled, then I suspect "has inverse" is strictly informative to the user about the wiki's structure. > The basic idea would be, for example, to declare on the page > {{Relation:capital of}} that it [[has inverse:has capital]]. This > then should automatically lead to broaden the search of an inline > query like: > > <ask>[[has capital::{{PAGENAME}}]]</ask> > > to also do the inverse question: > > <ask>{{PAGENAME}} [[capital of::*]]</ask> > > and merge the results into one table. I'm not sure this is the notation you intend. Let's substitute "Amsterdam" for {{PAGENAME}}. As I understand it, the first query will find any country whose capital is named Amsterdam --> the Netherlands. The second query, though, will find any article that mentions Amsterdam and is the capital of some country. It finds at least one capital city (Amsterdam); it might find others (they just have to be capital cities and mention Amsterdam in some way); and it will not find the Netherlands. (On Wikipedia, for instance, such a search would return Athens, capital of Greece, and Algiers, capital of Algeria, both of which link to Amsterdam. It might even return Aarhus, unofficial "capital of Jutland.") It seems to me that what you're hoping to find isn't covered by an existing query structure, nor indeed should it be. That's a distraction from the point. If you're looking for the country whose capital is Amsterdam, you should use the first query structure. The semantic system should look for the relationship "has capital" as it does now, and it should also follow a very short trail of breadcrumbs to process the inverse: * Examine the relationship itself for an inverse, * If it exists, examine the page "Amsterdam" (from the query) for that inverse relationship, and * If it exists, return the object of the inverse relationship: the Netherlands. Thus even if the Netherlands article doesn't yet have the relationship [[has capital:Amsterdam]] yet, the correct result may be returned because Amsterdam has been given the relationship [[capital of:the Netherlands]]. Wes ------------------------------------------------------------------------- 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-user mailing list Semediawiki-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-user