Align with Wikidata
I've started to align CBO with Wikidata properties and items. Mappings can directly be stored in Wikidata and queried like this at https://query.wikidata.org/:
# Ontology mapping between Comic Book Ontology and Wikidata
SELECT ?uri ?relation ?pLabel ?p WHERE {
{ ?p wdt:P2236 ?uri . BIND ("⊂" AS ?relation) } UNION # sub-property
{ ?p wdt:P2235 ?uri . BIND ("⊃" AS ?relation) } UNION # super-property
{ ?p wdt:P1628 ?uri . BIND ("=" AS ?relation) } UNION # equivalent property
{ ?p wdt:P1709 ?uri . BIND ("=" AS ?relation) } UNION # equivalent class
{ ?p wdt:P2888 ?uri . BIND ("=" AS ?relation) } # exact match
FILTER(STRSTARTS(STR(?uri), "http://comicmeta.org/"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
It is some manual work to complete a mapping and some properties/classes have no counterpart but once the mapping exists, we can extract Comic Book Data from Wikidata in CBO format. By now there are around 25.000 comics and comic series in Wikidata.
Help in extending the mapping is welcome! I can then code the wrapper to extract CBO data from Wikidata.
This is great, thank you! Yes, let me know how I can help to extend the mapping. I'm also happy to improve the alignment in CBO where necessary.
You could create a Wikidata account (or any existing Wikimedia wiki account such as Wikipedia) and have a look at the list of Wikidata properties for matching properties of CBO. Then add statements with "equivalent property" (if CBO and Wikidata property have roughly the same semantics), "external subproperty" (if CBO property is more specific) or "external superproperty" (if CBO property is more general).
To map CBO classes with Wikidata classes you can use the normal Wikidata search and add statement with "equivalent class" (if both classes cover roughly the same). There is no "external broader class" or "external narrower class" yet - if needed, I can try to get them created in Wikidata.
I have created 31 mappings so far (~10%). Some CBO classes and properties will remain as difficult cases but maybe you can add some easy mappings? A current list of mappings can be retrieved from here
Sounds great. Looks like you have made some great progress! I will take a closer look soon, and add some mappings.
Somehow I locked myself out of Wikidata last night, but I was able to add statements today (distributedBy). Very cool, thanks for the help. Too bad about the external classes though...
could you give some examples where CBO and Wikidata cannot be mapped via "equivalent class"? I think most cases could be handled by adding new classes to Wikidata if needed.
When mapping the cbo:distributedBy property, my initial thought was that cbo:Distributor is narrower than Wikidata's Distributor class (wd:Q13405617). But I see where "equivalent class" is sufficient, and where "exact match" can also be used (wd:P2888, wd:Q1004).