Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concepts #21

Open
RGShepherd opened this issue Aug 4, 2023 · 18 comments
Open

Concepts #21

RGShepherd opened this issue Aug 4, 2023 · 18 comments
Labels

Comments

@RGShepherd
Copy link
Collaborator

I'm afraid these are looking quite thin now: just a URI and a prefLabel. And I believe the value of @context should be https://gbv.github.io/jskos/context.json (according to https://gbv.github.io/jskos/jskos.html#resource)?

@richardofsussex
Copy link
Collaborator

Ah thanks - as it happens I've just moved onto concepts. I agree about the thinness - but that's what all my examples look like from earlier this year. Hopefully I can do a better job with XSLT than I could do with Jolt. And thanks for the URL: I had assumed I would (once again) have to provide a home-grown address for the context document.

@richardofsussex
Copy link
Collaborator

How does http://richardofsussex.me.uk/ng/ciim7-output/concept-39977.json look? I've reversed the order in broader and ancestors so it goes from specific to general, and dropped the last entry so it doesn't mis-represent the current concept as being its own ancestor.

The one thing I haven't worked out how to do is to populate broader with all the broader concepts. The problem is that you aren't allowed to repeat a URI within the set, and the same broader concept appears in both hierarchies. I can come back to that next week if it's an issue.

@RGShepherd
Copy link
Collaborator Author

Hmm. But should all the broader contexts actually be in broader, or is it just for parents? Having looked at the SKOS Primer, particularly section 4.5, it looks as though we only need the parents there, not the ancestors. (And should we also be using broaderTransitive rather than broader, because our thesauri are based on the principle that all descendants are included in a given concept?)

@richardofsussex
Copy link
Collaborator

Thanks: I was looking at the JSKOS spec, which isn't so helpful. However, it did point out that we don't have the option of broaderTransitive in this serialization of SKOS. The other little challenge was that in this case both hierarchies have the same broader term, and it should therefore only appear once. I think I have now sorted that out: see http://richardofsussex.me.uk/ng/ciim7-output/concept-39977.json

@RGShepherd
Copy link
Collaborator Author

RGShepherd commented Aug 11, 2023

Yep, that looks good - thanks! My only other comment would be that, as they're all web texts, our scopeNotes should probably be definitions - see the SKOS primer, 2.4. We may get as far as scope notes in due course, but we can cross that bridge when we come to it.

@richardofsussex
Copy link
Collaborator

OK: done.

@RGShepherd
Copy link
Collaborator Author

Thanks! Then if @jpadfield's happy with concepts, I'd say they're done?

@jpadfield
Copy link
Collaborator

Hi - I had a question about the formatting, is there meant to be a difference between the formatting for "prefLabel" and "definition" - one has a simple string as the value and one has an array:

"prefLabel": {
"en": "oil"
},
"definition": {
"en": [
"In oil paint the pigment is mixed with the medium of oil. It was used in Northern Europe in the 13th and 14th centuries for panel painting as well as wall painting and its properties were further exploited by Van Eyck and Campin whose innovations were subsequently introduced to Italy in the early 15th century. \r\n\r\nOils of different kinds can be used: linseed, walnut and poppy. Oil paint dries slowly and is a more flexible medium than egg tempera. It allowed a wide range of optical effects and a broader and more detailed application of paint, and so extended the range of new expressive possibilities for artists."
]
},

@jpadfield
Copy link
Collaborator

The default model for the example comes out as:

flowchart TB
classDef object stroke:#2C5D98,fill:#2C5D98,color:white,rx:5px,ry:5px;
classDef url stroke:#2C5D98,fill:white,color:#2C5D98,rx:5px,ry:5px;
classDef literal stroke:black,fill:#f0f0e0,color:black,rx:2px,ry:2px,max-width:100px;


O0("This Model")
class O0 object;

O1("https://gbv.github.io/jskos/context.json")
class O1 url;
click O1 "https://gbv.github.io/jskos/context.json"
O0["This Model"] ---->|has context|O1["https://gbv.github.io/jskos/context.json"]

O2("_#-0")
class O2 object;

O3("ng:0FLK-0008-0000-0000")
class O3 url;
click O3 "https://data.ng-london.org.uk/0FLK-0008-0000-0000" "Link to: https: ..."; 
click O3 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["_"] ---->|uri|O3["ng:0FLK-0008-0000-0000"]

O4("_#-1")
class O4 literal;
O2["_"] ---->|prefLabel|O4["_"]

O5("oil")
class O5 literal;
O4["_"] ---->|en|O5["oil"]

O6("_#-2")
class O6 literal;
O2["_"] ---->|definition|O6["_"]

O7("In oil paint the pigment is mixed with the medium of oil. It was used in Northern Europe in the 13th and 14th centuries for panel painting as well as wall painting and its properties were further exploited by Van Eyck and Campin whose innovations were subsequently introduced to Italy in the early 15th century. \n\nOils of different kinds can be used: linseed, walnut and poppy. Oil paint dries slowly and is a more flexible medium than egg tempera. It allowed a wide range of optical effects and a broader and more detailed application of paint, and so extended the range of new expressive possibilities for artists.")
class O7 literal;
O6["_"] ---->|en|O7["In oil paint the pigment is mixed with the medium of oil. It<br>was used in Northern Europe in the 13th and 14th centuries<br>for panel painting as well as wall painting and its<br>properties were further exploited by Van Eyck and Campin<br>whose innovations were subsequently introduced to Italy in<br>the early 15th century. \n\nOils of different kinds can be<br>used: linseed, walnut and poppy. Oil paint dries slowly and<br>is a more flexible medium than egg tempera. It allowed a<br>wide range of optical effects and a broader and more<br>detailed application of paint, and so extended the range of<br>new expressive possibilities for artists."]

O8("_#-3")
class O8 literal;
O2["_"] ---->|broader|O8["_"]

O9("ng:0F1V-0008-0000-0000")
class O9 url;
click O9 "https://data.ng-london.org.uk/0F1V-0008-0000-0000" "Link to: https: ..."; 
click O9 "https://data.ng.ac.uk/0F1V-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O8["_"] ---->|uri|O9["ng:0F1V-0008-0000-0000"]

O10("_#-4")
class O10 literal;
O8["_"] ---->|prefLabel|O10["_"]

O11("media")
class O11 literal;
O10["_"] ---->|en|O11["media"]

O12("_#-5")
class O12 literal;
O2["_"] ---->|ancestors|O12["_"]
click O9 "https://data.ng.ac.uk/0F1V-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O12["_"] ---->|uri|O9["ng:0F1V-0008-0000-0000"]

O13("_#-6")
class O13 literal;
O12["_"] ---->|prefLabel|O13["_"]
O13["_"] ---->|en|O11["media"]

O14("_#-7")
class O14 literal;
O2["_"] ---->|ancestors|O14["_"]

O15("ng:0FSQ-0008-0000-0000")
class O15 url;
click O15 "https://data.ng-london.org.uk/0FSQ-0008-0000-0000" "Link to: https: ..."; 
click O15 "https://data.ng.ac.uk/0FSQ-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O14["_"] ---->|uri|O15["ng:0FSQ-0008-0000-0000"]

O16("_#-8")
class O16 literal;
O14["_"] ---->|prefLabel|O16["_"]

O17("materials")
class O17 literal;
O16["_"] ---->|en|O17["materials"]

O18("_#-9")
class O18 literal;
O2["_"] ---->|ancestors|O18["_"]

O19("ng:0FAK-0008-0000-0000")
class O19 url;
click O19 "https://data.ng-london.org.uk/0FAK-0008-0000-0000" "Link to: https: ..."; 
click O19 "https://data.ng.ac.uk/0FAK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O18["_"] ---->|uri|O19["ng:0FAK-0008-0000-0000"]

O20("_#-10")
class O20 literal;
O18["_"] ---->|prefLabel|O20["_"]

O21("Materials and techniques")
class O21 literal;
O20["_"] ---->|en|O21["Materials and techniques"]

O22("_#-11")
class O22 literal;
O2["_"] ---->|inScheme|O22["_"]
click O19 "https://data.ng.ac.uk/0FAK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O22["_"] ---->|uri|O19["ng:0FAK-0008-0000-0000"]

O23("_#-12")
class O23 literal;
O22["_"] ---->|prefLabel|O23["_"]
O23["_"] ---->|en|O21["Materials and techniques"]
;
Loading

But I have now adjusted the modeller code to spot the "https://gbv.github.io/jskos/context.json" context and it comes out as:

flowchart TB
classDef object stroke:#2C5D98,fill:#2C5D98,color:white,rx:5px,ry:5px;
classDef url stroke:#2C5D98,fill:white,color:#2C5D98,rx:5px,ry:5px;
classDef name stroke:#563800,fill:#FEF3BA,color:#563800,rx:20px,ry:20px;
classDef note stroke:#2C5D98,fill:#D8FDFF,color:#2C5D98,rx:5px,ry:5px;


O0("This Model")
class O0 object;

O1("https://gbv.github.io/jskos/context.json")
class O1 url;
click O1 "https://gbv.github.io/jskos/context.json"
O0["This Model"] ---->|has context|O1["https://gbv.github.io/jskos/context.json"]

O2("ng:0FLK-0008-0000-0000")
class O2 object;
click O2 "https://data.ng-london.org.uk/0FLK-0008-0000-0000" "Link to: https: ..."; 

O3("oil@en")
class O3 name;
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|prefLabel|O3["oil@en"]

O4("In oil paint the pigment is mixed with the medium of oil. It was used in Northern Europe in the 13th and 14th centuries for panel painting as well as wall painting and its properties were further exploited by Van Eyck and Campin whose innovations were subsequently introduced to Italy in the early 15th century. \n\nOils of different kinds can be used: linseed, walnut and poppy. Oil paint dries slowly and is a more flexible medium than egg tempera. It allowed a wide range of optical effects and a broader and more detailed application of paint, and so extended the range of new expressive possibilities for artists.@en")
class O4 note;
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|definition|O4["In oil paint the pigment is mixed with the medium of oil. It<br>was used in Northern Europe in the 13th and 14th centuries<br>for panel painting as well as wall painting and its<br>properties were further exploited by Van Eyck and Campin<br>whose innovations were subsequently introduced to Italy in<br>the early 15th century. \n\nOils of different kinds can be<br>used: linseed, walnut and poppy. Oil paint dries slowly and<br>is a more flexible medium than egg tempera. It allowed a<br>wide range of optical effects and a broader and more<br>detailed application of paint, and so extended the range of<br>new expressive possibilities for artists.@en"]

O5("ng:0F1V-0008-0000-0000")
class O5 url;
click O5 "https://data.ng-london.org.uk/0F1V-0008-0000-0000" "Link to: https: ..."; 
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
click O5 "https://data.ng.ac.uk/0F1V-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|broader|O5["ng:0F1V-0008-0000-0000"]

O6("media@en")
class O6 name;
click O5 "https://data.ng.ac.uk/0F1V-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O5["ng:0F1V-0008-0000-0000"] ---->|prefLabel|O6["media@en"]
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
click O5 "https://data.ng.ac.uk/0F1V-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|ancestors|O5["ng:0F1V-0008-0000-0000"]

O7("ng:0FSQ-0008-0000-0000")
class O7 url;
click O7 "https://data.ng-london.org.uk/0FSQ-0008-0000-0000" "Link to: https: ..."; 
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
click O7 "https://data.ng.ac.uk/0FSQ-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|ancestors|O7["ng:0FSQ-0008-0000-0000"]

O8("materials@en")
class O8 name;
click O7 "https://data.ng.ac.uk/0FSQ-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O7["ng:0FSQ-0008-0000-0000"] ---->|prefLabel|O8["materials@en"]

O9("ng:0FAK-0008-0000-0000")
class O9 url;
click O9 "https://data.ng-london.org.uk/0FAK-0008-0000-0000" "Link to: https: ..."; 
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
click O9 "https://data.ng.ac.uk/0FAK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|ancestors|O9["ng:0FAK-0008-0000-0000"]

O10("Materials and techniques@en")
class O10 name;
click O9 "https://data.ng.ac.uk/0FAK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O9["ng:0FAK-0008-0000-0000"] ---->|prefLabel|O10["Materials and techniques@en"]
click O2 "https://data.ng.ac.uk/0FLK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
click O9 "https://data.ng.ac.uk/0FAK-0008-0000-0000" "Link to: https://data.ng.ac.uk ..."; 
O2["ng:0FLK-0008-0000-0000"] ---->|inScheme|O9["ng:0FAK-0008-0000-0000"]
;
Loading

@jpadfield
Copy link
Collaborator

Do we have a description of how we are using broader, ancestor and inScheme (I was just thinking would be good to include in any documentation)? Do we have a model for how the "schemes" will be defined?

@richardofsussex
Copy link
Collaborator

As regards map vs. list, the JSKOS spec has:
image
I don't see an example for definition, but altLabel looks like this:
image
Essentially, SKOS mandates a single preferred term per language, but all other fields can have multiple values per language.

@RGShepherd
Copy link
Collaborator Author

Do we have a description of how we are using broader, ancestor and inScheme (I was just thinking would be good to include in any documentation)? Do we have a model for how the "schemes" will be defined?

This is as now documented in #23 (comment):

The source data is contained in @hierarchy, which contains all ancestors in each hierarchy, one array per hierarchy if the entry is polyhierarchical. In this case, therefore, there are two arrays, because there are two hieararchies. These include all ancestors up to and including the top-level entry, and indeed the concept scheme as well. On mapping to JSKOS, we:

  • include one parent per hierarchy in broader
  • include all ancestors, including the top-level entry and concept scheme name, for each hierarchy in ancestors
  • include the concept scheme name in inScheme

@RGShepherd
Copy link
Collaborator Author

So I think now we're just waiting for some external IDs in the source data to sign off how they will be mapped, as discussed in #23 (comment)

@RGShepherd
Copy link
Collaborator Author

I've just run a CIIM extraction which has added some external IDs to concept-41477.

@richardofsussex
Copy link
Collaborator

See http://richardofsussex.me.uk/ng/ciim7-output/concept-41477.json, which uses the same code I have written for place records.

@RGShepherd
Copy link
Collaborator Author

Looking good, and JSKOS-like, but:

  • @context should presumably be https://gbv.github.io/jskos/context.json
  • Our top-level term should be mappings, not equivalents, as per https://gbv.github.io/jskos/jskos.html#concept
  • I think we need something other than a placeholder string in equivalents > mappings.from.memberSet.uri 😉

Thanks!

@RGShepherd RGShepherd mentioned this issue Oct 4, 2023
@richardofsussex
Copy link
Collaborator

richardofsussex commented Oct 4, 2023

Have a look now ... (Ditto for place-39582). (Just updated the JSKOS context URL to the correct one: thanks!)

@RGShepherd
Copy link
Collaborator Author

Thanks! As per #23 (comment) 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants