[Pellet-Users] + SameIndividual consequents in SWRL, - SameIndividuals bindings in queries

Ron Alford ronwalf at umd.edu
Sat Feb 18 11:35:37 EST 2006


Alan Ruttenberg wrote:
> It would be nice to be able to say - give me a single representative  -
> I don't care which. I thought that the sparql FILTER !?this=?that  sort
> of thing might work, but this seems to check literal equality of  the
> uris, not sameness in the OWL sense [ and also seems to return  more
> results than without it - that looks like a bug ]
> 
> As usual, any insight/suggestions welcome.

What do you know, I was working on that this week!
We're using the pellet servlet included with pellet to prototype the
replacement site for http://www.mindswap.org/
One of the big problems has been the old data with the nasty foaf
convention of using a bnode to represent each person.  This led to a
proliferation of identifiers for individuals - often 50 or 60 for more
active users of the site.

Simple queries that should have been returning 200-300 results were
returning around 13,000, and this made a real mess out of performance
(and resulting code to deal with multiple ids, too).  Our solution was
to implement a filter function "isCanonical(?s)" that sorted all the
identifiers (URI, Bnode, Literal, in order), and only returns true if
it's the first one.

You can find the code for it in
src/org/mindswap/servlet/functions/IsCanonical.java, and where it is
registered at src/org/mindswap/servlet/Spas.java
The prefix for it is <http://www.mindswap.org/2005/sparql/reasoning#>

So far, it's the only function in there.  We (Amy and I) plan to
implement a few more - direct(s,p,o) for transitive properties
(including rdfs:sub*Of), and directType(s,o).

If outside people are going to start using these functions, though, I
better get my act together and get them to a neutral namespace where
other stores might be tempted to implement them.

-Ron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.mindswap.org/pipermail/pellet-users/attachments/20060218/61d0ff9d/signature.bin


More information about the Pellet-Users mailing list