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:
- 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.kinzler@wikimedia.de mailto:daniel.kinzler@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