Ah ok, there lies the hare in the pepper.
The query you assembled gives you all articles using the certain infobox AND having the property meshid.

For diseases you could use this:
SELECT count(*) WHERE {
?s a <http://dbpedia.org/ontology/Disease>
}
http://mappings.dbpedia.org/index.php/OntologyClass:Disease
http://mappings.dbpedia.org/index.php/Special:WhatLinksHere/OntologyClass:Disease
(you can register to edit the Wiki)


Another way might be to try this tool, we at AKSW created:
http://hanne.aksw.org
it will be released in a few days. We are working on some bugs and will add some features (such as exporting the sparql query) You can try it, if you want, we are creating manual and tutorial and bugfixes, so please have patience, All saved concepts will be lost, because we have to upgrade it.
Cheers,
Sebastian

Am 14.09.2010 21:34, schrieb Christopher Kelly:
Thank you very much indeed for your help Kingsley and Sebastian! Very much appreciated.

The 4600 quote was found at http://wiki.dbpedia.org/Datasets where it states "The DBpedia knowledge base currently describes more than 3.4 million things, ...including 4,600 diseases...". I presume that the majority of this info is from the wikipedia infoboxes, hence thought this would be a good way of filtering? So I was just trying to get a handle on as much of this as possible for a medical education project (for which this kind of data - linking disease names / mesh / emedicine / wikipedia etc is just ideal!).

I wonder if the other 3900 diseases (I'm getting 947 diseases from the "count" query below?) are not from the infoboxes then?

Thanks again,

Best wishes,
Chris




On Tue, Sep 14, 2010 at 4:21 PM, Kingsley Idehen <[email protected] <mailto:[email protected]>> wrote:

    On 9/14/10 1:38 AM, Sebastian Hellmann wrote:
    Hi,
    the queries seem to be identical, what is the difference?
    Using sparql instead of snorql.

    The point was about using sparql endpoint rather than snorql .


    It has a double ?name variable, which doesn't seem to add a lot.
    Maybe typo, since it was cut and paste once the count exceed the
    limits claimed etc..


    Actually this query brings a little bit more:

    SELECT  count(*) WHERE {
         ?name dbpedia2:wikiPageUsesTemplate ?infobox .
         ?name dbpedia2:meshid ?meshid .
         Filter (?infobox IN (
    <http://dbpedia.org/resource/Template:Infobox_Disease> ,
    <http://dbpedia.org/resource/Template:Infobox_disease> ) ).
    }
    Yes, I did the count before sending the sparql endpoint link, as
    per comments above.


    Kingsley


    @Christopher
    The problem is that Template: values are stored as the appear in
    the Wikipedia page, which has good reasons (once you normalize
    them, you can't go back).
    So you might need to find more variants.
    How did you find the info that there are 4600 infoboxes?
    The overview WhatLinksHere also includes all Templates that
    redirects to Infobox_disease .


    Cheers,
    Sebastian


    Am 14.09.2010 03:30, schrieb Kingsley Idehen:
    On 9/13/10 7:01 PM, Christopher Kelly wrote:
    SELECT ?name ?meshid WHERE {
         ?name dbpedia2:wikiPageUsesTemplate
    <http://dbpedia.org/resource/Template:Infobox_Disease> .
         ?name dbpedia2:meshid ?meshid .
    }

    Try:
    
http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=&query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0APREFIX+dbpedia2%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0APREFIX+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2F%3E%0D%0APREFIX+skos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0D%0A%0D%0ASELECT++%3Fname+%3Fname+%3Fmeshid+WHERE+%7B+%0D%0
    
A+++++%3Fname+dbpedia2%3AwikiPageUsesTemplate+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FTemplate%3AInfobox_Disease%3E+.%0D%0A+++++%3Fname+dbpedia2%3Ameshid+%3Fmeshid+.%0D%0A%7D+&format=text%2Fhtml&debug=on&timeout=
    
<http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&should-sponge=&query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0APREFIX+dbpedia2%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E%0D%0APREFIX+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2F%3E%0D%0APREFIX+skos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0D%0A%0D%0ASELECT++%3Fname+%3Fname+%3Fmeshid+WHERE+%7B+%0D%0A+++++%3Fname+dbpedia2%3AwikiPageUsesTemplate+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FTemplat%0Ae%3AInfobox_Disease%3E+.%0D%0%0AA+++++%3Fname+dbpedia2%3Ameshid+%3Fmeshid+.%0D%0A%7D+&format=text%2Fhtml&debug=on&timeout=>



--
    Regards,

    Kingsley Idehen     
    President&  CEO
    OpenLink Software
    Web:http://www.openlinksw.com
    Weblog:http://www.openlinksw.com/blog/~kidehen  
<http://www.openlinksw.com/blog/%7Ekidehen>
    Twitter/Identi.ca: kidehen





    
------------------------------------------------------------------------------
    Start uncovering the many advantages of virtual appliances
    and start using them to simplify application deployment and
    accelerate your shift to cloud computing.
    http://p.sf.net/sfu/novell-sfdev2dev


    _______________________________________________
    Dbpedia-discussion mailing list
    [email protected]  
<mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion


-- Dipl. Inf. Sebastian Hellmann
    Department of Computer Science, University of Leipzig
    Homepage:http://bis.informatik.uni-leipzig.de/SebastianHellmann
    Research Group:http://aksw.org


--
    Regards,

    Kingsley Idehen     
    President&  CEO
    OpenLink Software
    Web:http://www.openlinksw.com
    Weblog:http://www.openlinksw.com/blog/~kidehen  
<http://www.openlinksw.com/blog/%7Ekidehen>
    Twitter/Identi.ca: kidehen







--
Dipl. Inf. Sebastian Hellmann
Department of Computer Science, University of Leipzig
Homepage: http://bis.informatik.uni-leipzig.de/SebastianHellmann
Research Group: http://aksw.org

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to