Page MenuHomePhabricator

cleanup of ontology definition file
Closed, ResolvedPublic

Description

Problem:
Our ontology definition file at http://wikiba.se/ontology is not up-to-date. We know at least about the following problems:

  • Senses are missing
  • Lexemes having languages is missing
  • Lexemes having spelling variant is missing
  • Musical notation data type is missing (T264537)

Acceptance criteria:

  • resolved the known issues above
  • checked for anything else that might be missing

Open questions:

  • Should mediainfo be added?

Event Timeline

Note that as far as I know there is currently no process for propagating changes to this file. Due to historical decisions the ontology file is now managed by those who manage wikiba.se (COM and the external agency MOR).

See related tickets: T266226 , T308530

Change 835103 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Add lexeme language to ontology.owl

https://gerrit.wikimedia.org/r/835103

Change 835104 had a related patch set uploaded (by Hasan Akgün (WMDE); author: Hasan Akgün (WMDE)):

[mediawiki/extensions/Wikibase@master] Add MusicalNotation to ontology file

https://gerrit.wikimedia.org/r/835104

We have talked about "Lexemes having spelling variant" with @Lucas_Werkmeister_WMDE and I suppose forms have spelling variants instead of lexemes and I'm not sure if it's relatable anymore. Other than that, it should be ready for review.

I have added the final form of ontology file as attachment, I don't know where to add it tbh :)

As discussed on gerrit, there is an uncertainty about lexemes having languages and the way we define them, or should we define them at all.

It'd be great if we have more comments on this issue :) @Lydia_Pintscher

To elaborate a bit: I’m not convinced we should include the dct:language predicate (property) in our ontology file, and it might be intentional that it’s not included yet – for the same reason that we don’t include e.g. rdfs:label or prov:wasDerivedFrom in our ontology file: they’re not “our” predicates. But I’m not very familiar with OWL, so I’m not sure if this reasoning makes sense or not.

To elaborate a bit: I’m not convinced we should include the dct:language predicate (property) in our ontology file, and it might be intentional that it’s not included yet – for the same reason that we don’t include e.g. rdfs:label or prov:wasDerivedFrom in our ontology file: they’re not “our” predicates. But I’m not very familiar with OWL, so I’m not sure if this reasoning makes sense or not.

Ok that makes sense to me. Then let's leave it out.

I have added the final form of ontology file as attachment, I don't know where to add it tbh :)

{F35535024}

@danshick-wmde might know how we can get this updated in the Wikibase website.

You may want to check https://oops.linkeddata.es. It won't tell you about all the possible issues, but it will give you an idea of some (so-called) common pitfalls that still need to be resolved. By doing so you may also be solving T210337. 0:-)

You can visualize the result at https://service.tib.eu/webvowl/#iri=http://wikiba.se/ontology-1.0.owl or http://vowl.visualdataweb.org/webvowl-old/webvowl-old.html#iri=http://wikiba.se/ontology-1.0.owl.

You may want to check https://oops.linkeddata.es. It won't tell you about all the possible issues, but it will give you an idea of some (so-called) common pitfalls that still need to be resolved. By doing so you may also be solving T210337. 0:-)

You can visualize the result at https://service.tib.eu/webvowl/#iri=http://wikiba.se/ontology-1.0.owl or http://vowl.visualdataweb.org/webvowl-old/webvowl-old.html#iri=http://wikiba.se/ontology-1.0.owl.

I tried to check oops but site seems down, at least for now. I think we can consider this task as the first step for T210337 and leave it with this minor fixes and we can dive into the ontology file and make bigger changes in T210337.

Copying here for the near or distant future:

From OOPS! (OntOlogy Pitfall Scanner!)

P40 (critical): Namespace hijacking. It refers to reusing or referring to terms from another namespace that are not defined in such namespace. This is an undesirable situation as no information can be retrieved when looking up those undefined terms. See TripleChecker.

P11 (important): Missing domain or range in properties. Object and/or datatype properties without domain or range (or none of them) are included in the ontology.

P04 (minor): Creating unconnected ontology elements. Ontology elements (classes, object properties and datatype properties) are created isolated, with no relation to the rest of the ontology. Solving this pitfall may lead to new results for other pitfalls and suggestions.

File:

Change 835104 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add MusicalNotation to ontology file

https://gerrit.wikimedia.org/r/835104

Here is the final form of the merged ontology file @Lydia_Pintscher @danshick-wmde, I don't know how to update current one that's why I'm adding it to here.

LGTM; here’s the diff if anyone is curious:

diff --git a/ontology-wikibase.owl b/ontology-hasan.owl
index c0b784aa70..436afcaa4e 100644
--- a/ontology-wikibase.owl
+++ b/ontology-hasan.owl
@@ -226,6 +226,12 @@
       <rdf:type rdf:resource="&wikibase;PropertyType"/>
   </owl:NamedIndividual>
 
+  <owl:NamedIndividual rdf:about="&wikibase;MusicalNotation">
+      <rdfs:label>MusicalNotation</rdfs:label>
+      <rdfs:comment>Type for storing musical scores written in LilyPond notation as supported by the Score extension.</rdfs:comment>
+      <rdf:type rdf:resource="&wikibase;PropertyType"/>
+  </owl:NamedIndividual>
+
   <!--
   ///////////////////////////////////////////////////////////////////////////////////////
   //
@@ -449,6 +455,12 @@
       <rdfs:subClassOf rdf:resource="&wikibase;Entity"/>
   </owl:Class>
 
+  <owl:Class rdf:about="&wikibase;Sense">
+      <rdfs:label>Sense</rdfs:label>
+      <rdfs:comment>Wikibase sense.</rdfs:comment>
+      <rdfs:subClassOf rdf:resource="&wikibase;Entity"/>
+  </owl:Class>
+
   <owl:ObjectProperty rdf:about="&wikibase;lexicalCategory">
       <rdfs:label>lexicalCategory</rdfs:label>
       <rdfs:comment>Lexeme lexical category.</rdfs:comment>

I can’t think of any other Wikibase predicate that we’re missing; the non-Wikibase predicates, especially the dct: ones for lexemes, should be left out of our OWL file, we decided above.

As noted above, so long as the ontology file is linked via the domain wikiba.se, updates to the file need to be given to those who manage that site, currently MOR working for KOM.

Related tickets again: T266226 T308530

Cc: @Kris_Litson_WMDE

@Kris_Litson_WMDE Any chance we can get a working and documented process for this?

@Kris_Litson_WMDE or someone with similar powers will need to hand this off to the team that admins wikiba.se .

I've sent this off to MOR to update. I've also asked them if we they know how we can do it ourselves in future. Process discussions are in progress.

Change 835103 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/WikibaseLexeme@master] Add lexeme language to ontology.owl

Reason:

https://gerrit.wikimedia.org/r/835103

Moving this to done for the dev team but keeping it open so we can sort out the process.