Re: Proposal for use of labels in Manchester Syntax ISSUE-146, ACTION-247

> Here is how I propose handling labels in Manchester Syntax.
> 
> Assume we augment the syntax with:
> 
> labels :: 'Labels:' labelAnnotationProperties [ '@' labelLangPattern ]
> labelAnnotationProperties ::= { labelAnnotationPropertyIRI }
> labelAnnotationPropertyIRI ::= annotationPropertyIRI
> labelLangPattern ::= a valid value for the facet langPattern
> 
> quotedlabel := 'a finite sequence of characters in which ' (U+27) and
> \ (U+5C) occur only in pairs of the form \' (U+27, U+5C) and \\ (U+22,
> U+22), enclosed in a pair of ' (U+27) characters'
> 
> Then the frame productions are modified like this one:
> 
> individual ::= individualIRI | nodeID | quotedLabel
> 
> That there is a choice of labels is due to a request by Alan Rector.
> The motivation for a choice of language should be clear.
> 
> Potential associations between labels and IRIs (the association
> LabelToIRI) are found in annotations of frames whose
> annotationProperty are from the list of
> labelAnnotationProperties and whose identifier is an IRI(i.e. not a
> quotedLabel). Associations for each document are found in that
> document as well as in any ontology it imports, based on the "Labels:"
> statement the given document. Thus there is a distinct LabelToIRI
> association used for parsing each document.
>
> Labels with highest precedence are associated with IRIs by being added
> to LabelToIRI. The order of precedence is:
> 
> Associations made within the ontology document have precedence over
> associations made in the imports closure.
> 
> Among associations selected by the above, associations of labels that
> are targets of annotation properties earlier in the
> labelAnnotationProperties list take precedence over later ones.
> 
> Among associations selected by the above, If labelLangPattern is
> present, associations of language tagged literals to IRIs take
> precedence over association of plain literals.
> 
> A new production, quotedLabel is introduced, a string surrounded by
> single quotes. quotedLabel becomes an alternative to IRI and (in the
> case of individuals) nodeID.
> 
> In the transformation from Manchester to Functional Syntax,
> quotedLabels are replaced by their mapped-to IRIs. In the case that
> LabelToIRI doesn't have an association for a quotedLabel, or has 2
> different ones, the document is rejected as having a syntax error.

I'm not sure I understand this.  (It's hard for me to read stuff that
goes straight into a spec, without examples or anything.)  To see if I
get it, let me paraphrase, removing some details and using more
RDF-centric language.

     1.  Input documents may contain a "label" declaration, which
         selects some RDF property as the labeling property.  

     2.  If such a property is declared, then all the RDF triples using
         that property (in all the imports and as gathering from the
         input document during processing) jointly form a LabelToIRI
         map.

     3.  During input processing, wherever an IRI could normally occur,
         a label can be used instead (indicated with some special
         syntax).  A macro-style substitution occurs at that point, with
         the label being replaced by the associated IRI in the
         LabelToIRI map.  If there is not exactly one such IRI, input
         processing fails.

Is that the idea, more or less?

I have three thoughts about this:

1.  As a user, this label thing could be really nice.  I don't know how
    else folks are supposed to work in plaintext with ontologies that
    chose their IRIs without thought to how they appear as qnames (or in
    a different natural language).  Maybe one can make bridge ontologies
    which equate all the elements of the "real" ontology with usable
    names for them?

2.  There is a very bad failure mode here, where my document imports two
    ontologies and they both change over the course of the time my
    document is in use.  If one of them stops using some label, and the
    other starts using that label, then the meaning of my document will
    have changed, even though everyone behaved perfectly reasonably.  No
    one would even detect something was amiss, unless they were keeping
    old copies and looking for this specific kind of change (which would
    be an odd and difficult thing to do).

    To be clear, it's true I can find myself in all sorts of other
    trouble if I do something as foolhardy as to import an ontology :-) ,
    but I think asking ontology maintainers to be as careful about
    changing their labels as they are about changing their ontology
    axioms, well, ... that's something new.

3.  I believe this could be done in a macro-pre-processor (processing
    Manchester Syntax documents but knowing almost nothing about the
    Manchester Syntax) or in a post-processor (operating on RDF graphs).
    (It has already been noted this can be done in UIs, like Protege.)
    This orthogonality is nice, but it means users can get this feature
    without us putting it in the Manchester Syntax.

Taken together, my sense right now is that it's better to leave this out
of the Manchester Syntax.

     - Sandro

Received on Tuesday, 17 March 2009 19:14:02 UTC