Hi Rocco,
Do either of the following example queries using the Yago classes as input
inference rules deliver the require superclass effect you are seeking ?
##Inference Context
##Yago
DEFINE input:inference "http://dbpedia.org/resource/inference/rules/yago#"
SELECT distinct ?x ?type
WHERE {
?x rdfs:label ?lbl .
?x rdf:type ?type.
filter(bif:contains(?lbl, "Cole")).
filter (!bif:exists ((select (1) where { ?x a dbpedia-owl:Person } )))
}
##
##Inference Context
##Yago
DEFINE input:inference "http://dbpedia.org/resource/inference/rules/yago#"
SELECT distinct ?x ?type
WHERE {
?x rdfs:label ?lbl .
?x rdf:type ?type.
filter(bif:contains(?lbl, "Cole")).
filter (!bif:exists ((select (1) where { ?x a foaf:Person } )))
}
Note the following Tutorial slides also provide additional examples on the use
of the Yago classes as input inference rules in queries against DBpedia:
http://virtuoso.openlinksw.com/presentations/SPARQL_Tutorials/SPARQL_Tutorials_Part_2/SPARQL_Tutorials_Part_2.html#%2842%29
I hope this helps ..
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
Twitter: http://twitter.com/OpenLink
On 22 Nov 2010, at 22:45, Rocco Tripodi wrote:
> The query works well:
>
> SELECT distinct ?x
> WHERE {
> ?x rdfs:label ?lbl .
> filter (!bif:exists ((select (1) where { ?x a dbpedia-owl:Person } )))
> filter(bif:contains(?lbl, "Cole"))
> }
>
> but the SPARQL Explorer retrieves also the redirects... such as
> http://dbpedia.org/resource/Nat_Cole
>
> so
>
> OPTIONAL { ?x dbpedia2:redirect : }
> FILTER (!bound(?w))
>
> Unfortunately, the query returns many other Person with other Properties.
> I don't figure out how to express not-Person in DBpedia. Is there a
> SuperClass?.
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev_______________________________________________
> Dbpedia-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion