On Tue, Jul 19, 2011 at 19:22, Olivier Grisel <[email protected]> wrote: > Since last time it is now possible to improve the mappings using > http://mappings.dbpedia.org . However I could not find how SKOS > category information is extracted from there. Maybe the SKOS mapping > logic is hardcoded in the extractor?
Correct. Article categories and the category hierarchy both have their own extractors. > To recap, the piece of data I am looking for is the link between a > SKOS topic such as http://dbpedia.org/resource/Category:Arts and the > DBpedia resource that is matching the primary Wikipedia article of the > category, in that case http://dbpedia.org/resource/The_arts . > > The Wikipedia makes this information explicitly available by the use > of the template "Cat_main". For instance, the source of > http:/en.wikipedia.org/wiki/Category:Arts includes the following > snippet (generally at the beginning): > > {{Cat main|The arts}} > > It seems to be widely used for any category that has a real world > semantic interpretation (not just for the sake of Wikipedia > housekeeping): > > http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Cat_main&limit=500 > > So my question is: is it possible to write a mapping for this using > http://mappings.dbpedia.org ? If so which directive should I use and > which target property should I map the relation too? The choice of relation name is completely up to the mapper. At the moment, it is not possible to extract an object property for this, because "The arts" does not have a wiki link to its page, i.e. the "[[" and "]]" are missing. You can, however, write a mapping for the template Cat_main that extracts a string that contains this PropertyMapping: {{ PropertyMapping | templateProperty = 1 | ontologyProperty = wikiCategoryMainResource }} The result would be suboptimal: http://dbpedia.org/resource/Category:Arts http://dbpedia.org/ontology/wikiCategoryMainResource "The Arts" In order to be able to extract the better triple (as an object property) http://dbpedia.org/resource/Category:Arts http://dbpedia.org/ontology/wikiCategoryMainResource http://dbpedia.org/resource/The_Arts you would have to extend the mapping language. A flag that tells the extraction to always treat everything like a URI suffix would work. Or the more general solution, suggested by Pablo, to include something like a URI pattern that lets you specify a URI with a place holder in which found string is inserted. Links to external datasets could also benefit from this solution. Of course, you can also write separate extractor for this. Cheers, Max ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
