Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Ricordisamoa

Il 03/03/2015 21:40, Amir E. Aharoni ha scritto:
Thanks, that's a step forward. Now the question is how to bring this 
all together.


The context that interests me the most is translating an article in 
ContentTranslation. Let's go with an architect.[1] I am translating an 
article about an architect from English to Dutch, and it has {{Infobox 
architect}} at the top. How would ContentTranslation, a MediaWiki 
extension installed on the Wikimedia cluster, know that the name 
parameter is naam in Dutch?


Currently, in theory, it would:
1. Find that there's a corresponding infobox in Dutch using the 
interlanguage link: 
https://nl.wikipedia.org/wiki/Sjabloon:Infobox_architect
2. Go to dbpedia and find the English template: 
http://mappings.dbpedia.org/index.php/Mapping_en:Infobox_architect

3. Find that name is foaf:name
4. Go to dbpedia and find the Dutch template: 
http://mappings.dbpedia.org/index.php/Mapping_nl:Infobox_architect

5. Find that foaf:name is naam

... And then repeat steps 1 to 5 for each parameter.

Is this something that is possible to query now? (I'm not even talking 
about performance.)


That's what Translatemplate https://tools.wmflabs.org/translatemplate/ 
is for! (thanks to you and Daniel for the idea :-)
It uses mwparserfromhell to parse DBpedia mappings and 'translate' 
templates in-place.

I've added you to the service group so you can fiddle with it.
The code got a bit hackish to work around a mwparserfromhell/Labs bug. 
If you're happy with the result we can publish it in Gerrit.




Even if it is possible to query it, is it good to be dependent on an 
external website for this? Maybe it makes sense to import the data 
from dbpedia to Wikidata? It's absolutely not a rhetorical question - 
maybe it is OK to use dbpedia.


[1] {{Infobox cricketer}} exists in the Dutch Wikipedia, but doesn' 
appear in the Dutch mappings in dbpedia.



--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

2015-03-03 20:39 GMT+02:00 Daniel Kinzler daniel.kinz...@wikimedia.de 
mailto:daniel.kinz...@wikimedia.de:


Am 03.03.2015 um 18:48 schrieb Amir E. Aharoni:
 Trying again... It's a really important topic for me.

 How do I go about proposing storing information about templates
parameters
 mapping to the community? I kinda understand how Wikidata works,
and it sounds
 like something that could be implemented using the current
properties, but
 thoughts about moving this forward would be very welcome.

Hi Amir!

We had a call today with the dbPedia folks, about exactly this topic!

The dbPedia mapping wiki[1] has this information, at least to some
extent. Let's
say you are looking at {{Cricketer Infobox}} on en. You can look
out the DBPedia
mappings for the template parameters on their mapping page[2].
There you can see
that the country parameter maps to the country proeprty in the
dbpedia
ontology[2], which in turn uses owl:equivalentProperty to
cross-link P17[4].

I assume this info is also available in machine readable form
somewhere, but I
don't know where offhand.

Today we discussed that this mapping should also be available in
the opposite
direction: on Wikidata, you can use P1628 (equivalent property) to
cross-reference the dbPedia ontology. I just added this info to
the country
property.

let me know if this helps :)
-- daniel

[1] http://mappings.dbpedia.org/index.php/
[2] http://mappings.dbpedia.org/index.php/Mapping_en:Cricketer_Infobox
[3] http://mappings.dbpedia.org/index.php/OntologyProperty:Country
[4] https://www.wikidata.org/wiki/Property:P17

--
Daniel Kinzler
Senior Software Developer

Wikimedia Deutschland
Gesellschaft zur Förderung Freien Wissens e.V.

___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org mailto: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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Daniel Kinzler
Am 04.03.2015 um 18:00 schrieb Ricordisamoa:

 That's what Translatemplate https://tools.wmflabs.org/translatemplate/ is 
 for!
 (thanks to you and Daniel for the idea :-)
 It uses mwparserfromhell to parse DBpedia mappings and 'translate' templates
 in-place.
 I've added you to the service group so you can fiddle with it.
 The code got a bit hackish to work around a mwparserfromhell/Labs bug. If 
 you're
 happy with the result we can publish it in Gerrit.

Aren't the dbpedia template parameter mappings available in machine readable
form somewhere? I mean, dbpedia is *using* them for extracting information
somehow, right?

Dimitris, can you enlighten us?


-- 
Daniel Kinzler
Senior Software Developer

Wikimedia Deutschland
Gesellschaft zur Förderung Freien Wissens e.V.

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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Dimitris Kontokostas
On Wed, Mar 4, 2015 at 7:13 PM, Daniel Kinzler daniel.kinz...@wikimedia.de
wrote:

 Am 04.03.2015 um 18:00 schrieb Ricordisamoa:

  That's what Translatemplate https://tools.wmflabs.org/translatemplate/
 is for!
  (thanks to you and Daniel for the idea :-)
  It uses mwparserfromhell to parse DBpedia mappings and 'translate'
 templates
  in-place.
  I've added you to the service group so you can fiddle with it.
  The code got a bit hackish to work around a mwparserfromhell/Labs bug.
 If you're
  happy with the result we can publish it in Gerrit.

 Aren't the dbpedia template parameter mappings available in machine
 readable
 form somewhere? I mean, dbpedia is *using* them for extracting information
 somehow, right?

 Dimitris, can you enlighten us?


The framework has it's own MW parser and the design choice when the wiki
was implemented (very long time ago  before I got involved) was to use
wiki markup as the native syntax.
To be honest it makes sense. This what the users use to define mappings, we
can easily parse it and there is no need for another intermediate format
However we are working on an RDF representation of the mappings that people
will be able to get from our mapping server api. But this will be like an
export functionality, the native syntax will still be the wiki markup.



 --
 Daniel Kinzler
 Senior Software Developer

 Wikimedia Deutschland
 Gesellschaft zur Förderung Freien Wissens e.V.

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




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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Dimitris Kontokostas
Hi all,

What you can get from DBpedia is
1) template structure (all properties defined in a template)
I am not sure why this was not included in the 2014 release but you can see
an example in 3.9 [1]
Our parser cannot handle very complex templates but it is a good start.
I'll make sure these are included in the next release but it is also easy
to create a service that extracts them on request

2) mappings wiki
We are in the process of exporting our mappings in RDF using the [R2]RML
vocabulary. We have code that does that for simple mappings but it's not
ready to get merged yet.
Hopefully we'll have this soon and will be quite easy to query and join.
Even without that, we could get a partial functionality by translating 
matching properties from #1

3) mappings wiki (ontology)
links from ontology classes/properties to wikidata, at the moment they are
stored in our wiki but could be stored in Wikidata instead as Daniel
suggested.

Using all these and interlanguage links I think we can create a (decent)
service that can work. I can suggest a DBpedia gsoc project for this if
some people are willing to mentor a student [2].

What we would need from the Wikidata/DBpedia community is
1) more ontology links from DBpedia to Wikidata
2) contributions in the infobox mappings to cover more infoboxes for better
coverage

Best,
Dimitris


[1] http://downloads.dbpedia.org/3.9/en/template_parameters_en.ttl.bz2
[2] dbpedia.org/gsoc2015/ideas

On Tue, Mar 3, 2015 at 10:40 PM, Amir E. Aharoni 
amir.ahar...@mail.huji.ac.il wrote:

 Thanks, that's a step forward. Now the question is how to bring this all
 together.

 The context that interests me the most is translating an article in
 ContentTranslation. Let's go with an architect.[1] I am translating an
 article about an architect from English to Dutch, and it has {{Infobox
 architect}} at the top. How would ContentTranslation, a MediaWiki extension
 installed on the Wikimedia cluster, know that the name parameter is
 naam in Dutch?

 Currently, in theory, it would:
 1. Find that there's a corresponding infobox in Dutch using the
 interlanguage link:
 https://nl.wikipedia.org/wiki/Sjabloon:Infobox_architect
 2. Go to dbpedia and find the English template:
 http://mappings.dbpedia.org/index.php/Mapping_en:Infobox_architect
 3. Find that name is foaf:name
 4. Go to dbpedia and find the Dutch template:
 http://mappings.dbpedia.org/index.php/Mapping_nl:Infobox_architect
 5. Find that foaf:name is naam

 ... And then repeat steps 1 to 5 for each parameter.

 Is this something that is possible to query now? (I'm not even talking
 about performance.)

 Even if it is possible to query it, is it good to be dependent on an
 external website for this? Maybe it makes sense to import the data from
 dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe it
 is OK to use dbpedia.

 [1] {{Infobox cricketer}} exists in the Dutch Wikipedia, but doesn' appear
 in the Dutch mappings in dbpedia.


 --
 Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
 http://aharoni.wordpress.com
 ‪“We're living in pieces,
 I want to live in peace.” – T. Moore‬

 2015-03-03 20:39 GMT+02:00 Daniel Kinzler daniel.kinz...@wikimedia.de:

 Am 03.03.2015 um 18:48 schrieb Amir E. Aharoni:
  Trying again... It's a really important topic for me.
 
  How do I go about proposing storing information about templates
 parameters
  mapping to the community? I kinda understand how Wikidata works, and it
 sounds
  like something that could be implemented using the current properties,
 but
  thoughts about moving this forward would be very welcome.

 Hi Amir!

 We had a call today with the dbPedia folks, about exactly this topic!

 The dbPedia mapping wiki[1] has this information, at least to some
 extent. Let's
 say you are looking at {{Cricketer Infobox}} on en. You can look out the
 DBPedia
 mappings for the template parameters on their mapping page[2]. There you
 can see
 that the country parameter maps to the country proeprty in the dbpedia
 ontology[2], which in turn uses owl:equivalentProperty to cross-link
 P17[4].

 I assume this info is also available in machine readable form somewhere,
 but I
 don't know where offhand.

 Today we discussed that this mapping should also be available in the
 opposite
 direction: on Wikidata, you can use P1628 (equivalent property) to
 cross-reference the dbPedia ontology. I just added this info to the
 country
 property.

 let me know if this helps :)
 -- daniel

 [1] http://mappings.dbpedia.org/index.php/
 [2] http://mappings.dbpedia.org/index.php/Mapping_en:Cricketer_Infobox
 [3] http://mappings.dbpedia.org/index.php/OntologyProperty:Country
 [4] https://www.wikidata.org/wiki/Property:P17

 --
 Daniel Kinzler
 Senior Software Developer

 Wikimedia Deutschland
 Gesellschaft zur Förderung Freien Wissens e.V.

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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Stas Malyshev
Hi!

 architect}} at the top. How would ContentTranslation, a MediaWiki
 extension installed on the Wikimedia cluster, know that the name
 parameter is naam in Dutch?

Name would be a bit tricky since I'm not sure if we have property
called name but for something like date of birth wouldn't it be useful
to link it in the template to
https://www.wikidata.org/wiki/Property:P569 somehow? Is there such
possibility?

With identifying properties, however - such as name - I'm not sure if
this could be used.

 Even if it is possible to query it, is it good to be dependent on an
 external website for this? Maybe it makes sense to import the data from
 dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe
 it is OK to use dbpedia.

Well, in dbpedia it says name is foaf:name, but this could only be
appropriate for humans (and maybe only in specific contexts), for other
entities name may have completely different semantics. In Wikidata,
however, properties are generic, so I wonder if it would be possible to
keep context. dbPedia obviously does have context but not sure where it
would be in Wikidata.

-- 
Stas Malyshev
smalys...@wikimedia.org

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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Amir E. Aharoni
 Maybe we should store these internationalised templates here on wikidata?

That's precisely what my opening post is about :)

I need help from people who understand Wikidata (and possible dbpedia)
better than I do to figure out the details of getting it done.


--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

2015-03-04 12:21 GMT+02:00 Joe Filceolaire filceola...@gmail.com:

 If you want to list the properties called by a template then you need a
 property which links to other properties - ie it has a property datatype.
 Property datatype is not available yet but is coming soon.

 You can then use the labels for this property in various languages to
 label the corresponding template parameters

 It seems to me that it would be better to store this info in the template
 itself - use lua to specify the property for each parameter and also to
 specify that the parameter label should be the label of the corresponding
 property in the language of that wiki.

 Maybe we should store these internationalised templates here on wikidata?
 On 4 Mar 2015 09:35, Dimitris Kontokostas jimk...@gmail.com wrote:



 On Wed, Mar 4, 2015 at 11:07 AM, Stas Malyshev smalys...@wikimedia.org
 wrote:

 Hi!

  architect}} at the top. How would ContentTranslation, a MediaWiki
  extension installed on the Wikimedia cluster, know that the name
  parameter is naam in Dutch?

 Name would be a bit tricky since I'm not sure if we have property
 called name but for something like date of birth wouldn't it be useful
 to link it in the template to
 https://www.wikidata.org/wiki/Property:P569 somehow? Is there such
 possibility?


 In DBpedia we have our own properties and the mappings should use these
 instead.
 Some exceptions exist for very popular vocabularies such as foaf:name but
 I am not sure if we should allow direct mappings to a wikidata property if
 an equivalent DBpedia property exists.
 In this case it's
 http://mappings.dbpedia.org/index.php/OntologyProperty:BirthDate
 We already have some mappings in place but more are needed for complete
 coverage

 http://mappings.dbpedia.org/index.php?title=Special%3ASearchsearch=wikidatago=Go


 With identifying properties, however - such as name - I'm not sure if
 this could be used.


 I agree that general properties such as name are difficult to interpret



  Even if it is possible to query it, is it good to be dependent on an
  external website for this? Maybe it makes sense to import the data from
  dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe
  it is OK to use dbpedia.

 Well, in dbpedia it says name is foaf:name, but this could only be
 appropriate for humans (and maybe only in specific contexts), for other
 entities name may have completely different semantics. In Wikidata,
 however, properties are generic, so I wonder if it would be possible to
 keep context. dbPedia obviously does have context but not sure where it
 would be in Wikidata.


 We could keep the context in DBpedia and with proper inter-linking do
 many interesting stuff.

 As we discussed yesterday, we could use DBpedia Live and check for
 updated/stalled/missing values.
 For example, if the previous values were the same in DBpedia/Wikipedia 
 Wikidata and e.g. Wikipedia changes a value we could trigger an update
 alert, or if a new value such as deathDate in introduced that does not
 exist in Wikidata.
 DBpedia would use dbo:deathDate, but using the link to P570 we could
 allow an agent to do the check



 --
 Stas Malyshev
 smalys...@wikimedia.org

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




 --
 Kontokostas Dimitris

 ___
 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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Lydia Pintscher
On Wed, Mar 4, 2015 at 11:21 AM, Joe Filceolaire filceola...@gmail.com wrote:
 If you want to list the properties called by a template then you need a
 property which links to other properties - ie it has a property datatype.
 Property datatype is not available yet but is coming soon.

This datatype is available for a while already.


Cheers
Lydia

-- 
Lydia Pintscher - http://about.me/lydia.pintscher
Product Manager for Wikidata

Wikimedia Deutschland e.V.
Tempelhofer Ufer 23-24
10963 Berlin
www.wikimedia.de

Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.

Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg
unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das
Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985.

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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Dimitris Kontokostas
On Wed, Mar 4, 2015 at 11:07 AM, Stas Malyshev smalys...@wikimedia.org
wrote:

 Hi!

  architect}} at the top. How would ContentTranslation, a MediaWiki
  extension installed on the Wikimedia cluster, know that the name
  parameter is naam in Dutch?

 Name would be a bit tricky since I'm not sure if we have property
 called name but for something like date of birth wouldn't it be useful
 to link it in the template to
 https://www.wikidata.org/wiki/Property:P569 somehow? Is there such
 possibility?


In DBpedia we have our own properties and the mappings should use these
instead.
Some exceptions exist for very popular vocabularies such as foaf:name but I
am not sure if we should allow direct mappings to a wikidata property if an
equivalent DBpedia property exists.
In this case it's
http://mappings.dbpedia.org/index.php/OntologyProperty:BirthDate
We already have some mappings in place but more are needed for complete
coverage
http://mappings.dbpedia.org/index.php?title=Special%3ASearchsearch=wikidatago=Go


 With identifying properties, however - such as name - I'm not sure if
 this could be used.


I agree that general properties such as name are difficult to interpret



  Even if it is possible to query it, is it good to be dependent on an
  external website for this? Maybe it makes sense to import the data from
  dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe
  it is OK to use dbpedia.

 Well, in dbpedia it says name is foaf:name, but this could only be
 appropriate for humans (and maybe only in specific contexts), for other
 entities name may have completely different semantics. In Wikidata,
 however, properties are generic, so I wonder if it would be possible to
 keep context. dbPedia obviously does have context but not sure where it
 would be in Wikidata.


We could keep the context in DBpedia and with proper inter-linking do many
interesting stuff.

As we discussed yesterday, we could use DBpedia Live and check for
updated/stalled/missing values.
For example, if the previous values were the same in DBpedia/Wikipedia 
Wikidata and e.g. Wikipedia changes a value we could trigger an update
alert, or if a new value such as deathDate in introduced that does not
exist in Wikidata.
DBpedia would use dbo:deathDate, but using the link to P570 we could allow
an agent to do the check



 --
 Stas Malyshev
 smalys...@wikimedia.org

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




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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Amir E. Aharoni
 Name would be a bit tricky since I'm not sure if we have property
called name

At this stage it's not actually important for me for the purposes of
ContentTranslation to map it to a Wikidata property. Any mapping between
parameter names in different languages would be enough.

One possibility is to store this mapping as a property at the Wikidata item
page of the template. It would be a complex property, but it's not
impossible.
___
Wikidata-l mailing list
Wikidata-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-l


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Joe Filceolaire
If you want to list the properties called by a template then you need a
property which links to other properties - ie it has a property datatype.
Property datatype is not available yet but is coming soon.

You can then use the labels for this property in various languages to label
the corresponding template parameters

It seems to me that it would be better to store this info in the template
itself - use lua to specify the property for each parameter and also to
specify that the parameter label should be the label of the corresponding
property in the language of that wiki.

Maybe we should store these internationalised templates here on wikidata?
On 4 Mar 2015 09:35, Dimitris Kontokostas jimk...@gmail.com wrote:



 On Wed, Mar 4, 2015 at 11:07 AM, Stas Malyshev smalys...@wikimedia.org
 wrote:

 Hi!

  architect}} at the top. How would ContentTranslation, a MediaWiki
  extension installed on the Wikimedia cluster, know that the name
  parameter is naam in Dutch?

 Name would be a bit tricky since I'm not sure if we have property
 called name but for something like date of birth wouldn't it be useful
 to link it in the template to
 https://www.wikidata.org/wiki/Property:P569 somehow? Is there such
 possibility?


 In DBpedia we have our own properties and the mappings should use these
 instead.
 Some exceptions exist for very popular vocabularies such as foaf:name but
 I am not sure if we should allow direct mappings to a wikidata property if
 an equivalent DBpedia property exists.
 In this case it's
 http://mappings.dbpedia.org/index.php/OntologyProperty:BirthDate
 We already have some mappings in place but more are needed for complete
 coverage

 http://mappings.dbpedia.org/index.php?title=Special%3ASearchsearch=wikidatago=Go


 With identifying properties, however - such as name - I'm not sure if
 this could be used.


 I agree that general properties such as name are difficult to interpret



  Even if it is possible to query it, is it good to be dependent on an
  external website for this? Maybe it makes sense to import the data from
  dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe
  it is OK to use dbpedia.

 Well, in dbpedia it says name is foaf:name, but this could only be
 appropriate for humans (and maybe only in specific contexts), for other
 entities name may have completely different semantics. In Wikidata,
 however, properties are generic, so I wonder if it would be possible to
 keep context. dbPedia obviously does have context but not sure where it
 would be in Wikidata.


 We could keep the context in DBpedia and with proper inter-linking do many
 interesting stuff.

 As we discussed yesterday, we could use DBpedia Live and check for
 updated/stalled/missing values.
 For example, if the previous values were the same in DBpedia/Wikipedia 
 Wikidata and e.g. Wikipedia changes a value we could trigger an update
 alert, or if a new value such as deathDate in introduced that does not
 exist in Wikidata.
 DBpedia would use dbo:deathDate, but using the link to P570 we could allow
 an agent to do the check



 --
 Stas Malyshev
 smalys...@wikimedia.org

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




 --
 Kontokostas Dimitris

 ___
 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] mapping template parameters using Wikidata?

2015-03-04 Thread Amir E. Aharoni
 Using all these and interlanguage links I think we can create a (decent)
service that can work. I can suggest a DBpedia gsoc project for this if
some people are willing to mentor a student [2].

I know very little about dbpedia, but if it helps, I'm willing to support
it from the Wikipedia / ContentTranslation side.


--
Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
http://aharoni.wordpress.com
‪“We're living in pieces,
I want to live in peace.” – T. Moore‬

2015-03-04 10:08 GMT+02:00 Dimitris Kontokostas jimk...@gmail.com:

 Hi all,

 What you can get from DBpedia is
 1) template structure (all properties defined in a template)
 I am not sure why this was not included in the 2014 release but you can
 see an example in 3.9 [1]
 Our parser cannot handle very complex templates but it is a good start.
 I'll make sure these are included in the next release but it is also easy
 to create a service that extracts them on request

 2) mappings wiki
 We are in the process of exporting our mappings in RDF using the [R2]RML
 vocabulary. We have code that does that for simple mappings but it's not
 ready to get merged yet.
 Hopefully we'll have this soon and will be quite easy to query and join.
 Even without that, we could get a partial functionality by translating 
 matching properties from #1

 3) mappings wiki (ontology)
 links from ontology classes/properties to wikidata, at the moment they are
 stored in our wiki but could be stored in Wikidata instead as Daniel
 suggested.

 Using all these and interlanguage links I think we can create a (decent)
 service that can work. I can suggest a DBpedia gsoc project for this if
 some people are willing to mentor a student [2].

 What we would need from the Wikidata/DBpedia community is
 1) more ontology links from DBpedia to Wikidata
 2) contributions in the infobox mappings to cover more infoboxes for
 better coverage

 Best,
 Dimitris


 [1] http://downloads.dbpedia.org/3.9/en/template_parameters_en.ttl.bz2
 [2] dbpedia.org/gsoc2015/ideas

 On Tue, Mar 3, 2015 at 10:40 PM, Amir E. Aharoni 
 amir.ahar...@mail.huji.ac.il wrote:

 Thanks, that's a step forward. Now the question is how to bring this all
 together.

 The context that interests me the most is translating an article in
 ContentTranslation. Let's go with an architect.[1] I am translating an
 article about an architect from English to Dutch, and it has {{Infobox
 architect}} at the top. How would ContentTranslation, a MediaWiki extension
 installed on the Wikimedia cluster, know that the name parameter is
 naam in Dutch?

 Currently, in theory, it would:
 1. Find that there's a corresponding infobox in Dutch using the
 interlanguage link:
 https://nl.wikipedia.org/wiki/Sjabloon:Infobox_architect
 2. Go to dbpedia and find the English template:
 http://mappings.dbpedia.org/index.php/Mapping_en:Infobox_architect
 3. Find that name is foaf:name
 4. Go to dbpedia and find the Dutch template:
 http://mappings.dbpedia.org/index.php/Mapping_nl:Infobox_architect
 5. Find that foaf:name is naam

 ... And then repeat steps 1 to 5 for each parameter.

 Is this something that is possible to query now? (I'm not even talking
 about performance.)

 Even if it is possible to query it, is it good to be dependent on an
 external website for this? Maybe it makes sense to import the data from
 dbpedia to Wikidata? It's absolutely not a rhetorical question - maybe it
 is OK to use dbpedia.

 [1] {{Infobox cricketer}} exists in the Dutch Wikipedia, but doesn'
 appear in the Dutch mappings in dbpedia.


 --
 Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
 http://aharoni.wordpress.com
 ‪“We're living in pieces,
 I want to live in peace.” – T. Moore‬

 2015-03-03 20:39 GMT+02:00 Daniel Kinzler daniel.kinz...@wikimedia.de:

 Am 03.03.2015 um 18:48 schrieb Amir E. Aharoni:
  Trying again... It's a really important topic for me.
 
  How do I go about proposing storing information about templates
 parameters
  mapping to the community? I kinda understand how Wikidata works, and
 it sounds
  like something that could be implemented using the current properties,
 but
  thoughts about moving this forward would be very welcome.

 Hi Amir!

 We had a call today with the dbPedia folks, about exactly this topic!

 The dbPedia mapping wiki[1] has this information, at least to some
 extent. Let's
 say you are looking at {{Cricketer Infobox}} on en. You can look out the
 DBPedia
 mappings for the template parameters on their mapping page[2]. There you
 can see
 that the country parameter maps to the country proeprty in the
 dbpedia
 ontology[2], which in turn uses owl:equivalentProperty to cross-link
 P17[4].

 I assume this info is also available in machine readable form somewhere,
 but I
 don't know where offhand.

 Today we discussed that this mapping should also be available in the
 opposite
 direction: on Wikidata, you can use P1628 (equivalent property) to
 cross-reference the dbPedia ontology. I just added this info to the
 country
 

Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Andy Mabbett
On 3 March 2015 at 18:39, Daniel Kinzler daniel.kinz...@wikimedia.de wrote:

 The dbPedia mapping wiki[1] has this information, at least to some extent. 
 Let's
 say you are looking at {{Cricketer Infobox}} on en. You can look out the 
 DBPedia
 mappings for the template parameters on their mapping page[2]. There you can 
 see
 that the country parameter maps to the country proeprty in the dbpedia
 ontology[2], which in turn uses owl:equivalentProperty to cross-link P17[4].

Sounds good. We also have a problem on en.Wikipedia (and presumably
elsewhere) of inconsistency in template parameter naming (latitude,
lat and latd all mean the same thing, for example). Some templates
even have to support multiple versions, for backwards compatibility.

If as part of this exercise we could resolve that, it would be a
bonus. Though I expect some resistance form those allergic to
change...

-- 
Andy Mabbett
@pigsonthewing
http://pigsonthewing.org.uk

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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Dimitris Kontokostas
On Wed, Mar 4, 2015 at 1:31 PM, Andy Mabbett a...@pigsonthewing.org.uk
wrote:

 On 3 March 2015 at 18:39, Daniel Kinzler daniel.kinz...@wikimedia.de
 wrote:

  The dbPedia mapping wiki[1] has this information, at least to some
 extent. Let's
  say you are looking at {{Cricketer Infobox}} on en. You can look out the
 DBPedia
  mappings for the template parameters on their mapping page[2]. There you
 can see
  that the country parameter maps to the country proeprty in the
 dbpedia
  ontology[2], which in turn uses owl:equivalentProperty to cross-link
 P17[4].

 Sounds good. We also have a problem on en.Wikipedia (and presumably
 elsewhere) of inconsistency in template parameter naming (latitude,
 lat and latd all mean the same thing, for example). Some templates
 even have to support multiple versions, for backwards compatibility.

 If as part of this exercise we could resolve that, it would be a
 bonus. Though I expect some resistance form those allergic to
 change...


If it helps, DBpedia can provide counts of property names per template.
we already use that to generate some mapping stats e.g.
http://mappings.dbpedia.org/server/statistics/en/


 --
 Andy Mabbett
 @pigsonthewing
 http://pigsonthewing.org.uk

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




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


Re: [Wikidata-l] mapping template parameters using Wikidata?

2015-03-04 Thread Andy Mabbett
On 24 September 2014 at 12:18, Amir E. Aharoni
amir.ahar...@mail.huji.ac.il wrote:

 TL;DR: Did anybody consider using Wikidata items of Wikipedia templates to
 store multilingual template parameters mapping?

If this lets us get rid of the awful TemplateData implementation,
which duplicates but does not integrate with pre-existing prose
template documentation, I'm all for it.

-- 
Andy Mabbett
@pigsonthewing
http://pigsonthewing.org.uk

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