You might be interested in this StackOverflow question in which
someone trying to enumerate properties ran two queries and got two
sets of results, but then ran the intersection of those queries and
didn't get the intersection of those sets.  No definitive answer was
reached;  the best guess was "timeouts".

http://stackoverflow.com/q/19512255/1281433

//JT

On Wed, Nov 13, 2013 at 11:31 AM, Florian Haag
<florian.h...@vis.uni-stuttgart.de> wrote:
> Hello,
> I am trying to retrieve a list of predicates from DBpedia with a SPARQL 
> query. The full set looks fine:
>
> SELECT DISTINCT ?b
> WHERE {
>   ?a ?b ?c.
> }
> LIMIT 50
>
> On http://dbpedia.org/sparql, this returns 50 URIs (let's call this set A), 
> so there are 50 (or probably more) predicates available.
>
> Now, I just want a subset of this, namely only predicates whose last part in 
> the URI starts with a letter from A to Z:
>
> SELECT DISTINCT ?b
> WHERE {
>   ?a ?b ?c.
>   FILTER(regex(str(?b), "[/#][a-z][^/#]*$", "i")).
> }
> LIMIT 50
>
> This returns a surprisingly small set (let's call this set B) consisting of 
> only one URI (http://www.w3.org/1999/02/22-rdf-syntax-ns#type), which had 
> also been in set A. But if that set is so small, the complementary set should 
> contain at least the 49 items from set (A - B):
>
> SELECT DISTINCT ?b
> WHERE {
>   ?a ?b ?c.
>   FILTER(regex(str(?b), "[/#][^a-z/#][^/#]*$", "i")).
> }
> LIMIT 50
>
> I would expect the result set of this query to contain, for example, 
> http://www.w3.org/2002/07/owl#sameAs, which was contained in set A. Instead, 
> the result set of this last query (set C) is empty.
>
> Why does DBpedia behave like that; is there anything wrong about my queries 
> or my regular expressions? (When trying this on some other endpoints 
> (http://vocabulary.semantic-web.at/PoolParty/sparql/AustrianSkiTeam , 
> http://spatial.ucd.ie/lod/sparql ), the result seems to be as expected.) Note 
> that DBpedia's SPARQL web-frontend does not report any syntax errors, server 
> errors or timeouts.
>
> Thanks in advance
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Dbpedia-discussion mailing list
> Dbpedia-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion



-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to