Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-10 Thread Jean Baptiste Pressac

 Hello,
Speaking about horsepower on Linked data, this could be a project to follow
: http://linkeddatafragments.org/
Cheers,

Nicola Vitucci nicola.vitu...@gmail.com a écrit :


Hi all,

sorry for the late answer. First of all, thanks for the encouraging
comments! In order to track suggestions and bugs more easily I've
created a Github repo here:

https://github.com/nvitucci/wikisparql-project

I'll try and write up stuff as things progress, but feel free to start
using the issue tracker.

@Paul:


You can generally run those O.K. on the DBpedia SPARQL endpoint.
It would be nice to see a few more horsepower put behind this.


You're definitely right. Speaking of pure horsepower the machine
hosting WikiSPARQL is not that big right now (32 GB of RAM, 8-thread
CPU, no SSDs), but there are a couple things I'd like to do from the
backend side in order to try and improve this kind of queries.

@Markus:


By the way, if you can control the output UI completely, you may

consider

adding this: instead of a property or item URI, always display its label
(in a selected language), and merely show the URI as a tooltip or
similar.
This could be done after querying with Javascript so that people don't
need
to do many join+filter parts in queries just to retrieve the labels.


Showing a (localized) label in place of a URI is a neat idea, I planned
to do that but my main concern is for when you get a lot of URIs as a
result of your query, because this might add some overhead - to be tried
though.


P.S. Your interface is very nice, but as Paul remarked it seems that

some

of the queries are a little slow. Could you maybe rewire the SPARQL


execution

to our endpoint at http://milenio.dcc.uchile.cl/sparql? It seems to be


faster.

Of course, I understand if you want to use it for your own testing, but
if
your main interest is in the UI and not the backend, this might be a


nice cooperation.

I decided to spend some time on the UI because it makes the use of the
endpoint easier, but my main goal is to try and understand together with
the community what can be done to make the use of an endpoint as
efficient as possible, not only by tuning the right parameters (e.g.
should there be a timeout on the queries? how much RAM should I make
available? etc.) but even by looking at different technologies. It's
great though to have a chance to compare results with other endpoints,
and it might be a good idea to give a chance to decide which endpoint(s)
to use as you suggested, thus I can see many chances for cooperation. By
the way, can I reuse your queries as example queries?

@Kingsley:


SPARQL URLs should work across SPARQL endpoints. Basically, you should
only change the host part of the URL to execute the same query across
different endpoints.


Indeed, that would be pretty easy, provided that SPARQL variants (e.g.
the use of parentheses around aggregate expressions, or magic
properties) are handled correctly.

Cheers,

Nicola

___
Wikidata-l mailing list


Wikidata-l@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata-l
Jean-Baptiste Pressac
Traitement et analyse de bases de données
Centre de Recherche Bretonne et Celtique
20 rue Duquesne
CS 93837
29238 BREST cedex 3
tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-09 Thread Paul Houle
This is a great development!

I managed to run some simple queries,  but I am having trouble with
profiling-type queries such as

select
   ?p (count(*) as ?cnt)
   { ?s ?p ?o}
   group by ?p
   order by desc(?cnt)

You can generally run those O.K. on the DBpedia SPARQL endpoint.  It would
be nice to see a few more horsepower put behind this.

On Wed, Apr 8, 2015 at 7:11 PM, Nicola Vitucci nicola.vitu...@gmail.com
wrote:

 Il 08/04/2015 23:43, Markus Krötzsch ha scritto:
  On 08.04.2015 17:24, Nicola Vitucci wrote:
  Il 08/04/2015 16:36, Markus Krötzsch ha scritto:
  On 08.04.2015 15:07, Nicola Vitucci wrote:
  Hi Markus,
 
  would you recommend to add some sort of patch until the new dumps
 are
  out, either in the data (by adding some triples to a temporary
  graph) or
  just in the Web interface for the external links?
 
  If you need it ASAP, you could actually just implement it in our Java
  code and make a pull request. It should not be too much effort. You can
  use the issue to ask about details if you are not sure what to do.
 
  Otherwise the ETA would be end of April/beginning of May (several other
  RDF extensions are currently being worked on and will happen first,
  e.g., ranks in RDF).
 
 
  I don't need it right now, so given the short ETA I'd wait. Anyway, in
  order to let people use external links more easily, I could just
  manually drop the last letter (or apply any other rule) only in the
  href links for now, while leaving the URIs intact. Do you see any harm
  in this?
 
  Ah, you mean for dispayling links in HTML? No, there is no harm in this
  at all. Most likely, the final life exports will also redirect to the
  property entity exports (which would make most sense for LOD crawlers).

 Indeed. I made this temporary change on WikiSPARQL, so that links like
 in Jean-Baptiste's examples may work properly. If you try this:


 http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E

 and then click on the external link on any property, now you should be
 redirected to the right wiki page.

 Nicola

 ___
 Wikidata-l mailing list
 Wikidata-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikidata-l




-- 
Paul Houle

*Applying Schemas for Natural Language Processing, Distributed Systems,
Classification and Text Mining and Data Lakes*

(607) 539 6254paul.houle on Skype   ontolo...@gmail.com
https://legalentityidentifier.info/lei/lookup
http://legalentityidentifier.info/lei/lookup
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-09 Thread Markus Krötzsch

On 09.04.2015 01:11, Nicola Vitucci wrote:
...


Indeed. I made this temporary change on WikiSPARQL, so that links like
in Jean-Baptiste's examples may work properly. If you try this:

http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E

and then click on the external link on any property, now you should be
redirected to the right wiki page.


Nice, here is a query to make good use of this:

All properties used on Wikidata to connect too humans, ordered by the 
number of times that they are used in this way


http://wikisparql.org/sparql?query=PREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0D%0ASELECT+DISTINCT+%3Fproperty+%28COUNT%28DISTINCT+%3Fperson1%29+as+%3FpersonCount%29%0D%0AWHERE+{%0D%0A+++%3Fperson1+a+%3AQ5+.%0D%0A+++%3Fperson2+a+%3AQ5+.%0D%0A+++%3Fperson1+%3Fproperty+%3Fperson2+%0D%0A}+ORDER+BY+DESC%28%3FpersonCount%29

Most of the properties with less than, say, 5 uses are probably errors 
(one could do other queries to find out which humans have this 
particular connection).


As soon as we have the explicit links to the property entities, it will 
also be possible to create the (more useful) list of property labels.


By the way, if you can control the output UI completely, you may 
consider adding this: instead of a property or item URI, always display 
its label (in a selected language), and merely show the URI as a tooltip 
or similar. This could be done after querying with Javascript so that 
people don't need to do many join+filter parts in queries just to 
retrieve the labels.


Markus


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-09 Thread Markus Krötzsch
P.S. Your interface is very nice, but as Paul remarked it seems that 
some of the queries are a little slow. Could you maybe rewire the SPARQL 
execution to our endpoint at http://milenio.dcc.uchile.cl/sparql? It 
seems to be faster. Of course, I understand if you want to use it for 
your own testing, but if your main interest is in the UI and not the 
backend, this might be a nice cooperation.


Cheers,

Markus

On 09.04.2015 22:16, Markus Krötzsch wrote:

On 09.04.2015 01:11, Nicola Vitucci wrote:
...


Indeed. I made this temporary change on WikiSPARQL, so that links like
in Jean-Baptiste's examples may work properly. If you try this:

http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E


and then click on the external link on any property, now you should be
redirected to the right wiki page.


Nice, here is a query to make good use of this:

All properties used on Wikidata to connect too humans, ordered by the
number of times that they are used in this way

http://wikisparql.org/sparql?query=PREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0D%0ASELECT+DISTINCT+%3Fproperty+%28COUNT%28DISTINCT+%3Fperson1%29+as+%3FpersonCount%29%0D%0AWHERE+{%0D%0A+++%3Fperson1+a+%3AQ5+.%0D%0A+++%3Fperson2+a+%3AQ5+.%0D%0A+++%3Fperson1+%3Fproperty+%3Fperson2+%0D%0A}+ORDER+BY+DESC%28%3FpersonCount%29


Most of the properties with less than, say, 5 uses are probably errors
(one could do other queries to find out which humans have this
particular connection).

As soon as we have the explicit links to the property entities, it will
also be possible to create the (more useful) list of property labels.

By the way, if you can control the output UI completely, you may
consider adding this: instead of a property or item URI, always display
its label (in a selected language), and merely show the URI as a tooltip
or similar. This could be done after querying with Javascript so that
people don't need to do many join+filter parts in queries just to
retrieve the labels.

Markus




___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Markus Krötzsch

On 08.04.2015 17:24, Nicola Vitucci wrote:

Il 08/04/2015 16:36, Markus Krötzsch ha scritto:

On 08.04.2015 15:07, Nicola Vitucci wrote:

Hi Markus,

would you recommend to add some sort of patch until the new dumps are
out, either in the data (by adding some triples to a temporary graph) or
just in the Web interface for the external links?


If you need it ASAP, you could actually just implement it in our Java
code and make a pull request. It should not be too much effort. You can
use the issue to ask about details if you are not sure what to do.

Otherwise the ETA would be end of April/beginning of May (several other
RDF extensions are currently being worked on and will happen first,
e.g., ranks in RDF).



I don't need it right now, so given the short ETA I'd wait. Anyway, in
order to let people use external links more easily, I could just
manually drop the last letter (or apply any other rule) only in the
href links for now, while leaving the URIs intact. Do you see any harm
in this?


Ah, you mean for dispayling links in HTML? No, there is no harm in this 
at all. Most likely, the final life exports will also redirect to the 
property entity exports (which would make most sense for LOD crawlers).


Markus


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Nicola Vitucci
Il 08/04/2015 23:43, Markus Krötzsch ha scritto:
 On 08.04.2015 17:24, Nicola Vitucci wrote:
 Il 08/04/2015 16:36, Markus Krötzsch ha scritto:
 On 08.04.2015 15:07, Nicola Vitucci wrote:
 Hi Markus,

 would you recommend to add some sort of patch until the new dumps are
 out, either in the data (by adding some triples to a temporary
 graph) or
 just in the Web interface for the external links?

 If you need it ASAP, you could actually just implement it in our Java
 code and make a pull request. It should not be too much effort. You can
 use the issue to ask about details if you are not sure what to do.

 Otherwise the ETA would be end of April/beginning of May (several other
 RDF extensions are currently being worked on and will happen first,
 e.g., ranks in RDF).


 I don't need it right now, so given the short ETA I'd wait. Anyway, in
 order to let people use external links more easily, I could just
 manually drop the last letter (or apply any other rule) only in the
 href links for now, while leaving the URIs intact. Do you see any harm
 in this?
 
 Ah, you mean for dispayling links in HTML? No, there is no harm in this
 at all. Most likely, the final life exports will also redirect to the
 property entity exports (which would make most sense for LOD crawlers).

Indeed. I made this temporary change on WikiSPARQL, so that links like
in Jean-Baptiste's examples may work properly. If you try this:

http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E

and then click on the external link on any property, now you should be
redirected to the right wiki page.

Nicola

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Jean-Baptiste Pressac

Hello,
Thank you for this initiative.

However, there is a little problem with the Properties on the result 
pages. For instance on the result page of this query 
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E 
all Wikidata properties have an extra letter after the property ID, for 
instance P463 https://www.wikidata.org/wiki/Property:P463 has an extra 
s (P463s) so that the link to this property (on the arrow icon) leads 
to a bad request page.


A click on this link : http://www.wikidata.org/entity/P463s


Brings you on this page rather than http://www.wikidata.org/entity/P463.



There is also a problem with the link to the wikidata ontology on this 
page 
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E. 
For instance time precision has a link to 
http://www.wikidata.org/ontology#timePrecision which does not exists.





Cheers,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 23/03/2015 12:51, Marco Fossati a écrit :

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL 
endpoint [1], kindly provided by the folks at SpazioDati [2].


It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent 
queries.


Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .




attachment: Jean-Baptiste_Pressac.vcf___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Cristian Consonni
2015-03-23 16:37 GMT+01:00 Markus Krötzsch mar...@semantic-mediawiki.org:
 Brilliant, we should set up a page with a list of SPARQL endpoits for
 Wikidata! For production usage, it is great to have a variety to chose from.

strong +1

Also, would you mind if the examples you shared on this list are
reused on the other projects? I specifically have in mind to use them
to provide example queries on Wikidata-LDF?[1]

Thank you,

Cristian

[1] http://wikidataldf.com/

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Kingsley Idehen

On 4/8/15 6:14 AM, Cristian Consonni wrote:

2015-03-23 16:37 GMT+01:00 Markus Krötzschmar...@semantic-mediawiki.org:

Brilliant, we should set up a page with a list of SPARQL endpoits for
Wikidata! For production usage, it is great to have a variety to chose from.

strong +1

Also, would you mind if the examples you shared on this list are
reused on the other projects? I specifically have in mind to use them
to provide example queries on Wikidata-LDF?[1]

Thank you,

Cristian

[1]http://wikidataldf.com/



See: http://www.wikidata.org/wiki/Wikidata:Data_access re., current 
SPARQL Endpoint list.


--
Regards,

Kingsley Idehen 
Founder  CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog 1: http://kidehen.blogspot.com
Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen
Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this




smime.p7s
Description: S/MIME Cryptographic Signature
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Markus Krötzsch

Hi Jean-Baptiste,

Your observation is correct. This is because a single Wikidata statement 
(with one Wikidata property) does not translate into a single triple 
(with one RDF property) in RDF. Rather, several RDF triples are used, 
they need to use more than one property, and these properties have 
different declarations (e.g., some are DatatypeProperties and some are 
ObjectProperties). Therefore, we create property variants, currently by 
appending letters like s.


The current RDF encoding is documented in our ISWC 2014 paper: 
https://ddll.inf.tu-dresden.de/web/Inproceedings4005/en


You are still right that there is a problem here in that you cannot get 
from P123s to P123 in the current RDF. This is being worked on: 
https://github.com/Wikidata/Wikidata-Toolkit/issues/84

The dumps will hopefully have this soon.

Regards,

Markus

On 08.04.2015 12:05, Jean-Baptiste Pressac wrote:

Hello,
Thank you for this initiative.

However, there is a little problem with the Properties on the result
pages. For instance on the result page of this query
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E
all Wikidata properties have an extra letter after the property ID, for
instance P463 https://www.wikidata.org/wiki/Property:P463 has an extra
s (P463s) so that the link to this property (on the arrow icon) leads
to a bad request page.

A click on this link : http://www.wikidata.org/entity/P463s


Brings you on this page rather than http://www.wikidata.org/entity/P463.



There is also a problem with the link to the wikidata ontology on this
page
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E.
For instance time precision has a link to
http://www.wikidata.org/ontology#timePrecision which does not exists.




Cheers,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 23/03/2015 12:51, Marco Fossati a écrit :

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL
endpoint [1], kindly provided by the folks at SpazioDati [2].

It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent
queries.

Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .






___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l




___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Jean-Baptiste Pressac
Thank you, I will have a look to your publication to have a better 
understanding of the mecanism of RDFisation.


Are you also going to solve the problem with the links to the wikidata 
ontology ? For instance on this page 
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E 
time precision has a link to 
http://www.wikidata.org/ontology#timePrecision which does not exists.


Regards,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 08/04/2015 15:07, Nicola Vitucci a écrit :

Hi Markus,

would you recommend to add some sort of patch until the new dumps are
out, either in the data (by adding some triples to a temporary graph) or
just in the Web interface for the external links?

Cheers,

Nicola
(wikisparql.org)

Il 08/04/2015 14:49, Markus Krötzsch ha scritto:

Hi Jean-Baptiste,

Your observation is correct. This is because a single Wikidata statement
(with one Wikidata property) does not translate into a single triple
(with one RDF property) in RDF. Rather, several RDF triples are used,
they need to use more than one property, and these properties have
different declarations (e.g., some are DatatypeProperties and some are
ObjectProperties). Therefore, we create property variants, currently by
appending letters like s.

The current RDF encoding is documented in our ISWC 2014 paper:
https://ddll.inf.tu-dresden.de/web/Inproceedings4005/en

You are still right that there is a problem here in that you cannot get
from P123s to P123 in the current RDF. This is being worked on:
https://github.com/Wikidata/Wikidata-Toolkit/issues/84
The dumps will hopefully have this soon.

Regards,

Markus

On 08.04.2015 12:05, Jean-Baptiste Pressac wrote:

Hello,
Thank you for this initiative.

However, there is a little problem with the Properties on the result
pages. For instance on the result page of this query
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E

all Wikidata properties have an extra letter after the property ID, for
instance P463 https://www.wikidata.org/wiki/Property:P463 has an extra
s (P463s) so that the link to this property (on the arrow icon) leads
to a bad request page.

A click on this link : http://www.wikidata.org/entity/P463s


Brings you on this page rather than http://www.wikidata.org/entity/P463.



There is also a problem with the link to the wikidata ontology on this
page
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E.

For instance time precision has a link to
http://www.wikidata.org/ontology#timePrecision which does not exists.




Cheers,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 23/03/2015 12:51, Marco Fossati a écrit :

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL
endpoint [1], kindly provided by the folks at SpazioDati [2].

It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent
queries.

Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I
emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data
Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .



___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l



___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org

Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Nicola Vitucci
Il 08/04/2015 16:36, Markus Krötzsch ha scritto:
 On 08.04.2015 15:07, Nicola Vitucci wrote:
 Hi Markus,

 would you recommend to add some sort of patch until the new dumps are
 out, either in the data (by adding some triples to a temporary graph) or
 just in the Web interface for the external links?
 
 If you need it ASAP, you could actually just implement it in our Java
 code and make a pull request. It should not be too much effort. You can
 use the issue to ask about details if you are not sure what to do.
 
 Otherwise the ETA would be end of April/beginning of May (several other
 RDF extensions are currently being worked on and will happen first,
 e.g., ranks in RDF).
 

I don't need it right now, so given the short ETA I'd wait. Anyway, in
order to let people use external links more easily, I could just
manually drop the last letter (or apply any other rule) only in the
href links for now, while leaving the URIs intact. Do you see any harm
in this?

Nicola

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Markus Krötzsch

On 08.04.2015 15:07, Nicola Vitucci wrote:

Hi Markus,

would you recommend to add some sort of patch until the new dumps are
out, either in the data (by adding some triples to a temporary graph) or
just in the Web interface for the external links?


If you need it ASAP, you could actually just implement it in our Java 
code and make a pull request. It should not be too much effort. You can 
use the issue to ask about details if you are not sure what to do.


Otherwise the ETA would be end of April/beginning of May (several other 
RDF extensions are currently being worked on and will happen first, 
e.g., ranks in RDF).


Cheers

Markus



Cheers,

Nicola
(wikisparql.org)

Il 08/04/2015 14:49, Markus Krötzsch ha scritto:

Hi Jean-Baptiste,

Your observation is correct. This is because a single Wikidata statement
(with one Wikidata property) does not translate into a single triple
(with one RDF property) in RDF. Rather, several RDF triples are used,
they need to use more than one property, and these properties have
different declarations (e.g., some are DatatypeProperties and some are
ObjectProperties). Therefore, we create property variants, currently by
appending letters like s.

The current RDF encoding is documented in our ISWC 2014 paper:
https://ddll.inf.tu-dresden.de/web/Inproceedings4005/en

You are still right that there is a problem here in that you cannot get
from P123s to P123 in the current RDF. This is being worked on:
https://github.com/Wikidata/Wikidata-Toolkit/issues/84
The dumps will hopefully have this soon.

Regards,

Markus

On 08.04.2015 12:05, Jean-Baptiste Pressac wrote:

Hello,
Thank you for this initiative.

However, there is a little problem with the Properties on the result
pages. For instance on the result page of this query
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/Q18335803%3E

all Wikidata properties have an extra letter after the property ID, for
instance P463 https://www.wikidata.org/wiki/Property:P463 has an extra
s (P463s) so that the link to this property (on the arrow icon) leads
to a bad request page.

A click on this link : http://www.wikidata.org/entity/P463s


Brings you on this page rather than http://www.wikidata.org/entity/P463.



There is also a problem with the link to the wikidata ontology on this
page
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E.

For instance time precision has a link to
http://www.wikidata.org/ontology#timePrecision which does not exists.




Cheers,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 23/03/2015 12:51, Marco Fossati a écrit :

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL
endpoint [1], kindly provided by the folks at SpazioDati [2].

It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent
queries.

Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I
emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data
Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .






___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l




___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l




___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org

Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Markus Krötzsch

On 08.04.2015 16:02, Jean-Baptiste Pressac wrote:

Thank you, I will have a look to your publication to have a better
understanding of the mecanism of RDFisation.

Are you also going to solve the problem with the links to the wikidata
ontology ? For instance on this page
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E
time precision has a link to
http://www.wikidata.org/ontology#timePrecision which does not exists.


Yes, all URIs should eventually be resolvable. We could not make this 
work with our RDF dumps but the ongoing official RDF dump discussions 
will certainly result in resolvable URIs. There will also be some 
changes in the URI schemes as part of this process. Stay tuned. ;-)


Markus



Regards,

Jean-Baptiste Pressac



___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-04-08 Thread Jean-Baptiste Pressac

Thanks,

Jean-Baptiste Pressac

Traitement et analyse de bases de données
Production et diffusion de corpus numériques

Centre de Recherche Bretonne et Celtique
Unité mixte de service (UMS) 3554
20 rue Duquesne
CS 93837
29238 Brest cedex 3

tel : +33 (0)2 98 01 68 95
fax : +33 (0)2 98 01 63 93

Le 08/04/2015 16:33, Markus Krötzsch a écrit :

On 08.04.2015 16:02, Jean-Baptiste Pressac wrote:

Thank you, I will have a look to your publication to have a better
understanding of the mecanism of RDFisation.

Are you also going to solve the problem with the links to the wikidata
ontology ? For instance on this page
http://wikisparql.org/sparql?query=DESCRIBE+%3Chttp%3A//www.wikidata.org/entity/VTe085defe2fad71c9445145ec538e724c%3E 


time precision has a link to
http://www.wikidata.org/ontology#timePrecision which does not exists.


Yes, all URIs should eventually be resolvable. We could not make this 
work with our RDF dumps but the ongoing official RDF dump discussions 
will certainly result in resolvable URIs. There will also be some 
changes in the URI schemes as part of this process. Stay tuned. ;-)


Markus



Regards,

Jean-Baptiste Pressac



___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


attachment: Jean-Baptiste_Pressac.vcf___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-23 Thread Marco Fossati

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL endpoint 
[1], kindly provided by the folks at SpazioDati [2].


It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent queries.

Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .


--
Marco Fossati
http://about.me/marco.fossati
Twitter: @hjfocs
Skype: hell_j

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-23 Thread Markus Krötzsch
Brilliant, we should set up a page with a list of SPARQL endpoits for 
Wikidata! For production usage, it is great to have a variety to chose from.


==WARNING==

The RDF format is currently in flux. The purpose of the Chilean endpoint 
http://milenio.dcc.uchile.cl/sparql is to gather feedback that helps us 
how to possibly the RDF structure for greater utility/simplicity. There 
will be several updates to the format in the net few weeks. Please help 
us to find out what is needed by also testing at 
http://milenio.dcc.uchile.cl/sparql. We gather query logs and are happy 
to share them. This said, please also tell us if other endpoints work 
better/differently/worse for you. Any feedback is welcome.


Cheers,

Markus


On 23.03.2015 12:51, Marco Fossati wrote:

Hi everyone,

I'd just like to announce another experimental Wikidata SPARQL endpoint
[1], kindly provided by the folks at SpazioDati [2].

It contains both the simplified and the complete dumps, as per [3].
Each dump file is stored under a different named graph.
We are collecting the query logs, and will share the most frequent queries.

Cheers!

[1] http://wikisparql.org/
[2] http://spaziodati.eu/en/
[3] http://tools.wmflabs.org/wikidata-exports/rdf/exports/20150223/

On 3/21/15 1:00 PM, wikidata-l-requ...@lists.wikimedia.org wrote:

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile
[1], we have a very first public SPARQL endpoint for Wikidata running.
This is very preliminary, so do not rely on it in applications and
expect things to fail, but you may still enjoy some things.

http://milenio.dcc.uchile.cl/sparql

You have a SPARQL that provides access to Wikidata dumps loaded into an
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I emphasis
a because the first isn't accurate.

There are other endpoints that provide access to Wikidata dumps:

[1]http://lod.openlinksw.com/sparql  -- 61 Billion+ RDF triples culled
from across the LOD Cloud (if you lookup Wikidata URIs that are objects
of owl:sameAs relations you'll end up in Wikidata own Linked Data Space)

[2]http://wikidata.metaphacts.com/sparql  -- another endpoint I
discovered yesterday .





___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-20 Thread Kingsley Idehen

On 3/20/15 4:09 PM, Markus Kroetzsch wrote:

Hi Dmitriy,

Yes, you are right. There are some countries that have a value for 
dissolved or abolished (P576) but no end date for instance of 
sovereign state. This includes the United Kingdom of the 
Netherlands. Probably these should get an end date for their P31, or 
we should use P576 in the query.


A list of all states that have no end date to their P31 sovereign 
state but that do have a P576 date:


PREFIX : http://www.wikidata.org/entity/
SELECT ?country ?countryName
WHERE {
  ?country :P576c ?disolutionDate .
  ?country :P31s ?statement .
  ?statement :P31v :Q3624078 .
 FILTER NOT EXISTS { ?statement :P582q ?endDate }
  ?country rdfs:label ?countryName FILTER(lang(?countryName)=en)
}



See:

[1] 
http://milenio.dcc.uchile.cl/sparql?default-graph-uri=query=%0D%0APREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0D%0ASELECT+%3Fcountry+%3FcountryName%0D%0AWHERE+%7B%0D%0A++%3Fcountry+%3AP576c+%3FdisolutionDate+.%0D%0A++%3Fcountry+%3AP31s+%3Fstatement+.%0D%0A++%3Fstatement+%3AP31v+%3AQ3624078+.%0D%0A+FILTER+NOT+EXISTS+%7B+%3Fstatement+%3AP582q+%3FendDate+%7D%0D%0A++%3Fcountry+rdfs%3Alabel+%3FcountryName+FILTER%28lang%28%3FcountryName%29%3D%22en%22%29%0D%0A%7D+format=text%2Fhtmltimeout=0debug=on



A list of all states that have an end date to their P31 sovereign 
state but that do not have a P576 date:


PREFIX : http://www.wikidata.org/entity/
SELECT ?country ?countryName
WHERE {
  ?country :P31s ?statement .
  ?statement :P31v :Q3624078 .
  ?statement :P582q ?endDate .
 FILTER NOT EXISTS { ?country :P576c ?disolutionDate }
  ?country rdfs:label ?countryName FILTER(lang(?countryName)=en)
}


See:

http://milenio.dcc.uchile.cl/sparql?default-graph-uri=query=%0D%0APREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0D%0ASELECT+%3Fcountry+%3FcountryName%0D%0AWHERE+%7B%0D%0A++%3Fcountry+%3AP31s+%3Fstatement+.%0D%0A++%3Fstatement+%3AP31v+%3AQ3624078+.%0D%0A++%3Fstatement+%3AP582q+%3FendDate+.%0D%0A+FILTER+NOT+EXISTS+%7B+%3Fcountry+%3AP576c+%3FdisolutionDate+%7D%0D%0A++%3Fcountry+rdfs%3Alabel+%3FcountryName+FILTER%28lang%28%3FcountryName%29%3D%22en%22%29%0D%0A%7D+format=text%2Fhtmltimeout=0debug=on

--
Regards,

Kingsley Idehen 
Founder  CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog 1: http://kidehen.blogspot.com
Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen
Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this




smime.p7s
Description: S/MIME Cryptographic Signature
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-20 Thread Dmitriy Sintsov
Hi Markus,
Is  ?statement :P31v :Q3624078 .
 FILTER NOT EXISTS { ?statement :P582q ?endDate }
really enough to filter off currently non-existing countries?
Because I have such code in my Python bot:
http://paste.debian.net/162319/
And even with so many filters, there is a bit strange Kingdom of
Netherlands which duplicates Netherlands but having only few cities.
Dmitriy

On Fri, Mar 20, 2015 at 9:08 PM, Markus Kroetzsch 
markus.kroetz...@tu-dresden.de wrote:

 Dear all,

 Thanks to the people at the Center of Semantic Web Research in Chile [1],
 we have a very first public SPARQL endpoint for Wikidata running. This is
 very preliminary, so do not rely on it in applications and expect things to
 fail, but you may still enjoy some things.

 http://milenio.dcc.uchile.cl/sparql

 The endpoint has all the data from our current RDF exports in one big
 database [2]. Below this email are some example queries to get you started
 (this is a bit of a learning-by-doing crash course in SPARQL too, but you
 may want to consult a tutorial if you don't know it ;-).

 There are some known bugs in the RDF that we will hopefully fix soon [3].
 Also, the service uses a dump that is already a few weeks old now. We are
 more interested in testing functions right now before going production.
 Also, this is a raw API interface, not a proposal for a nice UI.

 Feedback (and other interesting queries) are welcome :-)

 Cheers,

 Markus


 [1] http://ciws.cl/ -- a joint team from University of Chile and
 Pontificia Universidad Catolica de Chile
 [2] http://tools.wmflabs.org/wikidata-exports/rdf/
 [3] https://github.com/Wikidata/Wikidata-Toolkit/issues?q=is%
 3Aopen+is%3Aissue+label%3A%22RDF+export%22


 ==Lighthouses (Q39715) with their English label (LIMIT 100 for demo)==

 PREFIX : http://www.wikidata.org/entity/
 SELECT *
 WHERE {
  ?lighthouse a :Q39715 .
  ?lighthouse rdfs:label ?label FILTER(LANG(?label) = en)
 } LIMIT 100

 (Just paste the query into the box at http://milenio.dcc.uchile.cl/sparql)

 The actual query condition is in the WHERE {...} part. Things starting
 with ? are variables. Basic conditions take the form of triples: subject
 property value. For example, ?lighthouse a :Q39715 looks for things that
 are a lighthouse (a is short for rdf:type which we use to encode P31
 statements without qualifiers). The dot . is used as a separator between
 triples.

 Note that the label output is a bit cumbersome because you want to filter
 by language (without the FILTER you get all labels in all languages). A
 future UI would better fetch the labels after the query, similar to WDQ, to
 get smaller  faster queries.


 ==People born in the same place that they died in==

 PREFIX : http://www.wikidata.org/entity/
 SELECT ?person ?personname ?placename
 WHERE {
  ?person a :Q5 .
  ?person :P19c ?place .
  ?person :P20c ?place .
  ?person rdfs:label ?personname FILTER(LANG(?personname) = en) .
  ?place rdfs:label ?placename FILTER(LANG(?placename) = en)
 }  LIMIT 100

 Here we use a few actual Wikidata properties. Properties in their simple
 form (Entity-Value) use ids with a c in the end, like :P19c here. Only
 qualifier-free statements will be available in this form right now. Note
 that we use the variable ?place in two places as a value. This is how we
 query for things that have the same place in both cases.


 ==People who have Wikipedia (Q52) accounts==

 PREFIX : http://www.wikidata.org/entity/
 SELECT ?person ?personname ?username
 WHERE {
   ?person :P553s ?statement .
   ?statement :P553v :Q52 .
   ?statement :P554q ?username .
   ?person rdfs:label ?personname FILTER(LANG(?personname) = en) .
 } LIMIT 100

 This query needs to access qualifiers of a statement for website account
 on (P553). To do this in RDF (and SPARQL), we access the statement object
 instead of using simple property :P553c (which would only give us the
 value). The statement is found through an ...s property; its value is
 found through a ...v property; its qualifiers are found through ...q
 properties. Check out the graph in our paper to get the picture (
 http://korrekt.org/page/Introducing_Wikidata_to_the_Linked_Data_Web).
 There you can also find how references are accessed.


 ==Currently existing countries==

 PREFIX : http://www.wikidata.org/entity/
 SELECT ?country ?countryName
 WHERE {
   ?country :P31s ?statement .
   ?statement :P31v :Q3624078 .
  FILTER NOT EXISTS { ?statement :P582q ?endDate }
   ?country rdfs:label ?countryName FILTER(lang(?countryName)=en)
 }

 Similar pattern as with the Wikipedia accounts, but now we check that a
 certain qualifier (end time) does not exist. You could also find currently
 married people in this way, etc.


 ==Descendants of Queen Victoria (Q9439) ==

 PREFIX : http://www.wikidata.org/entity/
 SELECT DISTINCT *
 WHERE {
  :Q9439 ((^:P25c|^:P22c)+) ?person .
  ?person rdfs:label ?label
  FILTER(LANG(?label) = en)
 } LIMIT 1000

 Here, ((^:P25c|^:P22c)+) is a regular expression; ^ is for 

Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-20 Thread Kingsley Idehen

On 3/20/15 2:08 PM, Markus Kroetzsch wrote:

Dear all,

Thanks to the people at the Center of Semantic Web Research in Chile 
[1], we have a very first public SPARQL endpoint for Wikidata running. 
This is very preliminary, so do not rely on it in applications and 
expect things to fail, but you may still enjoy some things.


http://milenio.dcc.uchile.cl/sparql 


You have a SPARQL that provides access to Wikidata dumps loaded into an 
RDF compliant RDBMS (in this case a Virtuoso RDBMS instance). I emphasis 
a because the first isn't accurate.


There are other endpoints that provide access to Wikidata dumps:

[1] http://lod.openlinksw.com/sparql -- 61 Billion+ RDF triples culled 
from across the LOD Cloud (if you lookup Wikidata URIs that are objects 
of owl:sameAs relations you'll end up in Wikidata own Linked Data Space)


[2] http://wikidata.metaphacts.com/sparql -- another endpoint I 
discovered yesterday .



#1 was actually loaded a long time ago :)

Links:

1. 
http://lod.openlinksw.com/sparql?default-graph-uri=query=PREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E+SELECT+%3Fcountry+WHERE+%7B+%3Fcountry+%3AP31s%2F%3AP31v+%3AQ3624078+.+%7Dformat=text%2Fhtmltimeout=0debug=on 
-- LOD Cloud SPARQL Query Results URL


2. 
http://milenio.dcc.uchile.cl/sparql?default-graph-uri=query=PREFIX+%3A+%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E+SELECT+%3Fcountry+WHERE+%7B+%3Fcountry+%3AP31s%2F%3AP31v+%3AQ3624078+.+%7Dformat=text%2FhtmlCXML_redir_for_subjs=121CXML_redir_for_hrefs=timeout=0debug=on 
-- Center of Semantic Web Research in Chile SPARQL Query Results URL .



--
Regards,

Kingsley Idehen 
Founder  CEO
OpenLink Software
Company Web: http://www.openlinksw.com
Personal Weblog 1: http://kidehen.blogspot.com
Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen
Twitter Profile: https://twitter.com/kidehen
Google+ Profile: https://plus.google.com/+KingsleyIdehen/about
LinkedIn Profile: http://www.linkedin.com/in/kidehen
Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this




smime.p7s
Description: S/MIME Cryptographic Signature
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] Preliminary SPARQL endpoint for Wikidata

2015-03-20 Thread Markus Kroetzsch

On 20.03.2015 19:08, Markus Kroetzsch wrote:
...


Feedback (and other interesting queries) are welcome :-)


Here's another nice query:

Find all astronomical bodies on which Wikidata has some coordinates, 
ordered by the number of coordinates that refer to them:


PREFIX : http://www.wikidata.org/entity/
SELECT ?globe (COUNT(DISTINCT ?coordinatesValue) AS ?globeCount)
WHERE {
  ?coordinatesValue http://www.wikidata.org/ontology#globe ?globe
} ORDER BY DESC(?globeCount)

This is a bit more costly, so don't try to add labels in the query ;-)

Cheers,

Markus

--
Markus Kroetzsch
Faculty of Computer Science
Technische Universität Dresden
+49 351 463 38486
http://korrekt.org/

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l