This is an archive of an inactive wiki and cannot be modified.

ISSUE-33 Grouping Constructs, Proposal One: "Minimal Fix"

This page contains a proposal for resolution of [http://www.w3.org/2006/07/SWD/track/issues/33 ISSUE-33: GroupingConstructs]. See SkosDesign/ProposalForm for more information about the form used to structure this proposal.

0. Summary

This proposal intends to resolve ISSUE-33, whilst making the minimum number of changes to the current SKOS vocabulary and specifications.

This proposal retains the current vocabulary in SKOS used to describe grouping constructs, and also retains the semantics given for this vocabulary in the formal RDF specification of SKOS.

A single axiomatic triple is added to the semantics, to state that skos:Collection is disjoint with skos:Concept. This is currently implied informally in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS: "This section describes the features of SKOS Core that allow you to define meaningful groupings ('collections') of concepts. ... In thesaurus terminology, these collections are known as 'arrays', and the term 'milk by source animal' is a 'node label' [Willpower Glossary]. There is consensus that a 'node label' does not represent a label for a concept in its own right, and therefore correctly modelling this kind of structure in RDF requires careful consideration.".

The major change proposed here regards the use of skos:narrower in conjunction with grouping vocabulary, in order to present the label of a group as part of a hierarchy. Several examples given in the SKOS Core Guide are deprecated, and an alternative mechanism is proposed for situating group labels within a hierarchical display.

1. Vocabulary

The following vocabulary is retained by this proposal:

skos:Collection skos:OrderedCollection skos:member skos:memberList

No URIs are deprecated by this proposal.

2. Axiomatic Triples

The following triples are axiomatic for this proposal.

skos:OrderedCollection rdfs:subClassOf skos:Collection.BRskos:member rdfs:domain skos:Collection.BRskos:memberList rdfs:domain skos:OrderedCollection.BRskos:memberList rdfs:range rdf:List.BRskos:Collection owl:disjointWith skos:Concept.

3. Semantic Conditions

There are no further semantic conditions.

4. Consistent Examples

The following is an example of a labelled grouping of concepts, for which no ordering is specified (this is the same as the first example given in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS):

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:Collection>
    <rdfs:label>milk by source animal</rdfs:label>
    <skos:member rdf:resource="http://www.example.com/concepts#buffalomilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#cowmilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#goatmilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#sheepmilk"/>
  </skos:Collection>

  <skos:Concept rdf:about="http://www.example.com/concepts#buffalomilk">
    <skos:prefLabel>buffalo milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#cowmilk">
    <skos:prefLabel>cow milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#goatmilk">
    <skos:prefLabel>goat milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#sheepmilk">
    <skos:prefLabel>sheep milk</skos:prefLabel>
  </skos:Concept>

</rdf:RDF>

The following is an example of a labelled grouping of concepts, for which an ordering is given (this is the same as the fourth example given in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS):

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:OrderedCollection>
    <rdfs:label>people by age</rdfs:label>
    <skos:memberList rdf:parseType="Collection">
      <skos:Concept rdf:about="http://www.example.com/concepts#infants"/>
      <skos:Concept rdf:about="http://www.example.com/concepts#children"/>
      <skos:Concept rdf:about="http://www.example.com/concepts#adults"/>
    </skos:memberList>
  </skos:OrderedCollection>
  
  <skos:Concept rdf:about="http://www.example.com/concepts#infants">
    <skos:prefLabel>infants</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#children">
    <skos:prefLabel>children</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#adults">
    <skos:prefLabel>adults</skos:prefLabel>
  </skos:Concept>

</rdf:RDF>

5. Inconsistent Examples

Because skos:Collection and skos:Concept are declared by this proposal to be disjoint classes, several examples given in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS become inconsistent. In particular, the use of any SKOS semantic relation property, such as skos:narrower or skos:broader is inconsistent. All examples in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS which involve skos:narrower are inconsistent, and are therefore deprecated under this proposal.

For example, the following is inconsistent (group with no order specified):

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:Concept rdf:about="http://www.example.com/concepts#milk">
    <skos:prefLabel>milk</skos:prefLabel>
    <skos:narrower>
      <skos:Collection>
        <rdfs:label>milk by source animal</rdfs:label>
        <skos:member rdf:resource="http://www.example.com/concepts#buffalomilk"/>
        <skos:member rdf:resource="http://www.example.com/concepts#cowmilk"/>
        <skos:member rdf:resource="http://www.example.com/concepts#goatmilk"/>
        <skos:member rdf:resource="http://www.example.com/concepts#sheepmilk"/>
      </skos:Collection>
    </skos:narrower>
  </skos:Concept>

</rdf:RDF>

For example, the following is inconsistent (group with order given):

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:Concept rdf:about="http://www.example.com/concepts#people">
    <skos:prefLabel>people</skos:prefLabel>
    <skos:narrower>
      <skos:OrderedCollection>
        <rdfs:label>people by age</rdfs:label>
        <skos:memberList rdf:parseType="Collection">
          <skos:Concept rdf:about="http://www.example.com/concepts#infants"/>
          <skos:Concept rdf:about="http://www.example.com/concepts#children"/>
          <skos:Concept rdf:about="http://www.example.com/concepts#adults"/>
        </skos:memberList>
      </skos:OrderedCollection>
    </skos:narrower>
  </skos:Concept>

</rdf:RDF>

6. Entailment Rules

There are no additional semantic conditions given in section 3 above, therefore there are no entailment rules which follow from the semantics (other than simple, RDF & RDFS entailment rules).

Two rules are stated in http://www.w3.org/TR/2005/WD-swbp-skos-core-guide-20051102/#seccollections SKOS-GUIDE-SEC-COLLECTIONS without any semantic justification.

The first of these, the "Collectable Property Rule", is deprecated by this proposal, because it assumes inconsistent usage as described above.

The second of these, the "Ordered Collection Membership Rule", is provisionally retained by this proposal, although there are issues with this rule (see discussion below). This rule is stated as follows, using the Jena rule syntax:

(?c skos:memberList ?l) elementOfList(?e,?l)
->
(?c skos:member ?e)

... where 'elementOfList' is a function that returns true if the first argument is an element of the RDF list for which the second argument is the head.

7. Syntactic Constraints

There are no syntactic constraints.

8. Discussion

The obvious question is, if you can't use skos:narrower with skos:Collection, how do you handle group labels when generating a hierarchical display?

Take for example the following snippet from a thesaurus that uses node labels:

milk
.<milk by source animal>
..buffalo milk
..cow milk
..goat milk
..sheep milk

Under this proposal, the concepts and their paradigmatic relationships must first be explicitly stated, i.e.:

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:Concept rdf:about="http://www.example.com/concepts#milk">
    <skos:prefLabel>milk</skos:prefLabel>
    <skos:narrower rdf:resource="http://www.example.com/concepts#buffalomilk"/>
    <skos:narrower rdf:resource="http://www.example.com/concepts#cowmilk"/>
    <skos:narrower rdf:resource="http://www.example.com/concepts#goatmilk"/>
    <skos:narrower rdf:resource="http://www.example.com/concepts#sheepmilk"/>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#buffalomilk">
    <skos:prefLabel>buffalo milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#cowmilk">
    <skos:prefLabel>cow milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#goatmilk">
    <skos:prefLabel>goat milk</skos:prefLabel>
  </skos:Concept>

  <skos:Concept rdf:about="http://www.example.com/concepts#sheepmilk">
    <skos:prefLabel>sheep milk</skos:prefLabel>
  </skos:Concept>

</rdf:RDF>

A labelled group can then be declared also:

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:skos="http://www.w3.org/2004/02/skos/core#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  
  <skos:Collection>
    <rdfs:label>milk by source animal</rdfs:label>
    <skos:member rdf:resource="http://www.example.com/concepts#buffalomilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#cowmilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#goatmilk"/>
    <skos:member rdf:resource="http://www.example.com/concepts#sheepmilk"/>
  </skos:Collection>

</rdf:RDF>

The thesaurus hierarchy (i.e. tree) can then be constructed from these graphs, by using a simple algorithm.

Informally, the algorithm starts from the milk concept, and constructs a tree node labelled "milk". Then, all narrower concepts are considered. For each concept which is not a member of a group, a tree node is constructed and added as a direct child of "milk". However, if some or all of the narrower concepts are members of a labelled group, then a child tree node is first added with the group label (in this case all concepts are members of the group labelled "milk by source animal"). Tree nodes are then constructed for all members of the group, and added as children of the group node.

N.B. Under this proposal, applications can safely be written that completely ignore the grouping constructs. This is a significant advantage of this proposal.

There are, however, a number of potential issues with this proposal.

Firstly, it is not specified how the algorithm should handle situations where concepts have multiple broader concepts (i.e. "polyhierarchies"). The algorithm could therefore lead to the spurious introduction of group labels in multiple locations in a hierarchy - this needs some test cases.

Secondly, the proposal currently relies on default reasoning to ascertain whether a group is unordered. I.e. there is no way to explicitly state that a group is unordered, this has to be inferred from the absence of explicit ordering information.

Thirdly, the "Ordered Collection Membership Rule" was originally introduced as a work around for RDF query languages that had little or no support for querying the contents of lists. Given that many SPARQL engines will provide built in functions for querying RDF lists, this rule may therefore be unecessary. Alternatively, the rule can also becomes redundant, if the following rule set is used:

### Extract from RDF plus OWL rules <http://eulersharp.sourceforge.net/2003/03swap/rpo-rules.n3>

@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

{?L rdf:first ?I; a rdf:List} => {?I list:in ?L}.
{?L rdf:rest ?R; a rdf:List. ?I list:in ?R} => {?I list:in ?L}.


SkosDesign/GroupingConstructs/ProposalOne (last edited 2007-05-08 10:35:30 by AlistairMiles)