The labels are contained in the DBpedia ontology.

Lorenz
On 07/31/2014 12:27 PM, Jaana Takis wrote:
Hi Hugh,
this does not work unfortunately, I get the exact same issue running your query on my local Virtuoso sparql endpoint:
p       label
http://purl.org/dc/terms/subject        "Subject"@en
http://dbpedia.org/ontology/PopulatedPlace/areaTotal    "Subject"@en
http://dbpedia.org/ontology/abstract    "Subject"@en
http://dbpedia.org/ontology/areaCode    "Subject"@en


In fact, that is the reason why I ended downloading the mapping-based properties DBpedia data set http://wiki.dbpedia.org/Downloads39#h283-1 hoping that it would solve things but there are no property labels there. Maybe there are other data sets I could download that would solve this issue but I haven't been able to identify one.

I really don't get it why I have this issue. It is very puzzling :/ Any ideas?
Thanks!
Jaana
------------------------------------------------------------------------
Subject: Re: [Virtuoso-users] DBpedia SERVICE queries acting unexpectedly
From: hwilli...@openlinksw.com
Date: Thu, 31 Jul 2014 02:52:39 +0100
CC: virtuoso-users@lists.sourceforge.net
To: jaana...@hotmail.com

Hi Janna,

What datasets are loaded in your local Virtuoso instance as I see you reference the <http://dbpedia.org> graph in it , so do you already have some DBpedia datasets loaded ?

Note the query you are running locally is not the same as what you are running against the canonical dbpedia endpoint ie http://dbpedia.org/sparql, which should be:

SELECT distinct ?p ?label
WHERE
{
SERVICE <http://dbpedia.org/sparql> {<http://dbpedia.org/resource/Tallinn> ?p ?o . ?p rdfs:label ?label . FILTER (lang(?label) = 'en') }
}
limit 10

ie all triple patterns should be in the "SERVICE" part for remote execution, unless you have local DBpedia data load in which case I would suggest it does not contain the expected data possibly ?

See following live example from our LOD Server that works:

http://lod.openlinksw.com/sparql/?default-graph-uri=&qtxt=SELECT+distinct+%3Fp+%3Flabel+%0D%0AWHERE%0D%0A%7B%0D%0A++++%0D%0A++++SERVICE+%3Chttp%3A%2F%2Fdbpedia.org%2Fsparql%3E+%7B%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FTallinn%3E+%3Fp+%3Fo+.+%3Fp+rdfs%3Alabel+%3Flabel+.+FILTER+%28lang%28%3Flabel%29+%3D+%27en%27%29+%7D%0D%0A%7D%0D%0Alimit+10&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on <http://lod.openlinksw.com/sparql/?default-graph-uri=&qtxt=SELECT+distinct+?p+?label+%0d%0aWHERE%0d%0a%7b%0d%0a++++%0d%0a++++SERVICE+%3chttp://dbpedia.org/sparql%3e+%7b%3chttp://dbpedia.org/resource/Tallinn%3e+?p+?o+.+?p+rdfs:label+?label+.+FILTER+%28lang%28?label%29+%3D+%27en%27%29+%7d%0d%0a%7d%0d%0alimit+10&format=text/html&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on>

Short URL: http://bit.ly/XhuK2o

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.      // http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers

On 30 Jul 2014, at 17:30, Jaana Takis <jaana...@hotmail.com <mailto:jaana...@hotmail.com>> wrote:

    Hi!

    For a few days now I have tried to make the following query work
    on my local Open Source Virtuoso and it does not produce the
    expected results, I am at loss as what to do!

    SELECT distinct ?p ?label FROM <http://dbpedia.org
    <http://dbpedia.org/>>
    WHERE
    {
        <http://dbpedia.org/resource/Tallinn> ?p ?o .
        SERVICE <http://DBpedia.org/sparql
    <http://dbpedia.org/sparql>> { ?p rdfs:label ?label . FILTER
    (lang(?label) = 'en') }
    }
    limit 10

    When I execute this then I get repetitive labels and I don't
    understand why:
    p   label
    http://dbpedia.org/ontology/areaCode        "area code"@en
    http://dbpedia.org/ontology/elevation       "area code"@en
    http://dbpedia.org/ontology/isPartOf        "area code"@en
    http://dbpedia.org/ontology/leaderParty     "area code"@en


    Yet, when I run asimilar kind of query on DBpedia
    
<http://dbpedia.org/snorql/?query=SELECT+distinct+?p+?label%0d%0aWHERE%0d%0a%7b%0d%0a++++%3chttp://dbpedia.org/resource/Tallinn%3e+?p+?o+.%0d%0a++++?p+rdfs:label+?label+.%0d%0a++++FILTER+%28lang%28?label%29+%3D+%27en%27%29%0d%0a%7d>,
    the output is as expected:
    p   label
    dbpedia:ontology/PopulatedPlace/areaTotal
    
<http://dbpedia.org/snorql/?describe=http://dbpedia.org/ontology/PopulatedPlace/areaTotal>
    [http] <http://dbpedia.org/ontology/PopulatedPlace/areaTotal>
    "area total (km2)"@en
    dbpedia:ontology/abstract
    <http://dbpedia.org/snorql/?describe=http://dbpedia.org/ontology/abstract>
    [http] <http://dbpedia.org/ontology/abstract>         "has abstract"@en
    dbpedia:ontology/areaCode
    <http://dbpedia.org/snorql/?describe=http://dbpedia.org/ontology/areaCode>
    [http] <http://dbpedia.org/ontology/areaCode>         "area code"@en
    dbpedia:ontology/areaTotal
    <http://dbpedia.org/snorql/?describe=http://dbpedia.org/ontology/areaTotal>
    [http] <http://dbpedia.org/ontology/areaTotal>        "area total (m2)"@en


    The local graph I have here is a DBpedia dump of mappings but it
    really does not seem to matter in this case, I could run both the
    queries remotely and I still get repetitive labels.

    What am I missing here?
    Any help much appreciated!
    Jaana
    
------------------------------------------------------------------------------
    Infragistics Professional
    Build stunning WinForms apps today!
    Reboot your WinForms applications with our WinForms controls.
    Build a bridge from your legacy apps to the future.
    
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk_______________________________________________
    Virtuoso-users mailing list
    Virtuoso-users@lists.sourceforge.net
    <mailto:Virtuoso-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/virtuoso-users




------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk


_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to