IVOA Thesaurus

Alasdair Gray agray at dcs.gla.ac.uk
Wed Oct 31 04:46:44 PDT 2007


Hi Doug,

Good work with the cwm rules :)

I have just extended your rules to apply one for making the skos:related
relationship symmetrical. The new rule file can be found at
http://explicator.dcs.gla.ac.uk/Vocabularies/inferRelationships.n3

To help those who are struggling to get cwm working on their machines
(it can be a bit of a beast to get working), I have run Rick's version
through cwm to produce a base rdf version. This can be found at
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT-relationships_2007-10
-30.rdf. This was generated by the command:
cwm
http://www.astro.physik.uni-goettingen.de/~hessman/rdf/IVOAT/IVOAT.rdf
--rdf >
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT-relationships_2007-10
-30.rdf

A version of the thesaurus with Doug's rules applied for the
broader/narrower but not mine can be found at
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT+relationships_2007-10
-30.rdf. This was generated by the command:
cwm
http://www.astro.physik.uni-goettingen.de/~hessman/rdf/IVOAT/IVOAT.rdf
--think=http://hea-www.harvard.edu/~dburke/playground/infer.n3 --rdf >
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT+relationships_2007-10
-30.rdf

Finally, the version with the broader/narrower and the related
relationships inferred can be found at
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT+relationships2_2007-1
0-30.rdf. This was generated by the command:
cwm
http://www.astro.physik.uni-goettingen.de/~hessman/rdf/IVOAT/IVOAT.rdf
--think=http://explicator.dcs.gla.ac.uk/Vocabularies/inferRelationships.
n3 --rdf >
http://explicator.dcs.gla.ac.uk/Vocabularies/IVOAT+relationships2_2007-1
0-30.rdf

Doing some comparisons with a merge tool is quite interesting. However,
you will note that there are lots of skos:changeNote added even though
there has not been a change. I will see if I can amend the rules to only
generate output when there is not an existing triple.

Cheers,

Alasdair



Alasdair J G Gray
Research Associate: Explicator Project
http://explicator.dcs.gla.ac.uk
Computer Science, University of Glasgow
0141 330 6292

-----Original Message-----
From: owner-semantics at eso.org [mailto:owner-semantics at eso.org] On Behalf
Of Douglas Burke
Sent: 30 October 2007 20:35
To: Frederic V. Hessman
Cc: IVOA semantics
Subject: Re: IVOA Thesaurus

Frederic V. Hessman wrote:
> 

>> My second issue is to do with maintenance. In going through the 
>> vocabulary I have found quite a few errors that have crept in due to 
>> the editing process. (The list can be found at the bottom of this 
>> email.) Some of these are simple typos but others are where 
>> identifiers have been changed for a concept and the subsequent edits 
>> have not been made for all of the relationships involving that edit. 
>> Others make the vocabulary poly-hierarchy inconsistent, e.g. 
>> acceleration of gravity has gravity as a broader term but the inverse

>> relation is not present in gravity. I think that we need to develop 
>> scripts that can check that the inverses of all of the relationships 
>> that are declared in the hierarchy are present. This would be based
on 
>> the related relationship being symmetrical and the broader/narrower 
>> being inverses of each other.
>>
> I have made very little effort to correct the consistency of BT's and 
> NT's, thinking like Alasdair, that someone will use a much fancier
tool 
> which spits out the correct list.
> 
> Note, however, that total consitency is only really important when the

> thesaurus is more-or-less finished in it's final working-draft form.

In the spirit of "why not use a sledge hammer to crack a walnut", I've 
just tried automatically adding skos:broader/narrower terms for those 
that are missing, using cwm and assuming that the terms are inverses of 
each other.

The magic - once you have cwm installed [1,2] - is

% cwm 
http://www.astro.physik.uni-goettingen.de/~hessman/rdf/IVOAT/IVOAT.rdf 
--think=http://hea-www.harvard.edu/~dburke/playground/infer.n3 --rdf > 
ivoa.infer.rdf

or

% cwm 
http://www.astro.physik.uni-goettingen.de/~hessman/rdf/IVOAT/IVOAT.rdf 
--filter=http://hea-www.harvard.edu/~dburke/playground/infer.n3 --rdf > 
ivoa.additions.rdf

and the output files are at

http://hea-www.harvard.edu/~dburke/playground/ivoa.infer.rdf
http://hea-www.harvard.edu/~dburke/playground/ivoa.additions.rdf

where the first version is the full set of terms (ie Rick's "Tue Oct 30 
09:44:06 2007" version with my additions) and the second one is just the

set of additions made.

The rules I used for this are shown below. Not exactly rocket science
;-)
Doug

[1] http://www.w3.org/2000/10/swap/doc/CwmInstall
[2] http://dig.csail.mit.edu/2007/Talks/0110-rules-tbl/

--- infer.n3 ---

@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix :
<http://www.Astro.physik.Uni-Goettingen.DE/~hessman/rdf/IVOAT#> .
@prefix string: <http://www.w3.org/2000/10/swap/string#>.


{
   ?x skos:narrower ?y .
   ("DJB: added skos:broader term for '" ?x.skos:prefLabel "' 
(2007-OCT-30)")
          string:concatenation  ?s.
}
=>
{
   ?y skos:broader ?x ;
      skos:changeNote ?s .
} .

{
   ?x skos:broader ?y .
   ("DJB: added skos:narrower term for '" ?x.skos:prefLabel "' 
(2007-OCT-30)")
          string:concatenation  ?s.
}
=>
{
   ?y skos:narrower ?x ;
      skos:changeNote ?s .
} .



More information about the semantics mailing list