-
Notifications
You must be signed in to change notification settings - Fork 18
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
Refactor Ordered Collections. Fixes #112. #495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small fix and a couple of suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to discuss any of the proposed changes if you would like to.
a owl:Restriction ; | ||
owl:onProperty gist:hasOrderedMember ; | ||
owl:someValuesFrom gist:OrderedMember ; | ||
] ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distinctionary pattern is written like this:
gist:OrderedCollection
a owl:Class ;
owl:equivalentClass [
owl:intersectionOf (
gist:Collection
[
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:someValuesFrom gist:OrderedMember ;
]
);
] ;
skos:definition "A collection where the members are in a fixed sequence."^^xsd:string ;
skos:prefLabel "Ordered Collection"^^xsd:string ;
This expresses more clearly the idea that "An X is a type of Y that Z."
You also need an allValuesFrom
restriction, so the full definition is:
gist:OrderedCollection
a owl:Class ;
owl:equivalentClass [
owl:intersectionOf (
gist:Collection
[
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:someValuesFrom gist:OrderedMember ;
]
[
a owl:Restriction ;
owl:onProperty gist:hasOrderedMember ;
owl:allValuesFrom gist:OrderedMember ;
]
);
] ;
skos:definition "A collection where the members are in a fixed sequence."^^xsd:string ;
skos:prefLabel "Ordered Collection"^^xsd:string ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjyounes @daliadahleh Should we not remove the someValuesFrom
? The allValueFrom
enforces the object type on the property, and removing someValuesFrom
allows for an empty collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uschold and I discussed the possibility of empty sets and opened a new issue to raise the question: #498. In theory I'm in favor of allowing empty collections, but we noted that if we allow empty collections, then the restriction must also be removed from Collection
(gist:hasMember some owl:Thing
), which leaves it as a class without a formal definition.
gistCore.ttl
Outdated
] ; | ||
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ; | ||
skos:prefLabel "Ordinal Member"^^xsd:string ; | ||
skos:definition "A member of an Ordered Collection. It either precedes or is preceded by another Ordered Member in the same collection, or it has a stated integer position in the collection."^^xsd:string ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omit "stated." This implies a violation of the Open World Assumption.
In actual fact I would remove the entire sentence. The definition doesn't need to restate the restrictions, especially in this case, where the restrictions are not even the most salient part of the semantics. I would use something like this:
skos:definition "A member of an ordered collection. This resource serves as a proxy linking a real-world item in the collection to that collection, allowing the expression of positional and other information that applies to the item only in the context of the collection."
If you really want to keep your definition, then I would add the second sentence as a scope note.
I'm not entirely thrilled with the "real-world" term. Feel free to find something better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use 'linking a member of a collection to that collection' to bypass the 'real-world item' awkwardness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sa-bpelakh that seems confusing because the class name (and the first sentence of the definition) suggests that the proxy is the 'member', while your definition suggests that the real-world item is the 'member'. I think 'real-world item' is clearer.
@daliadahleh: @uscholdm and I have been discussing the domain/range issue and we disagree. We think this should be brought to the group before the PR is merged. I will put it on the top of the agenda for the next meeting. In a nutshell:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a owl:Restriction ; | ||
owl:onProperty gist:hasOrderedMember ; | ||
owl:someValuesFrom gist:OrderedMember ; | ||
] ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjyounes @daliadahleh Should we not remove the someValuesFrom
? The allValueFrom
enforces the object type on the property, and removing someValuesFrom
allows for an empty collection.
gistCore.ttl
Outdated
] ; | ||
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ; | ||
skos:prefLabel "Ordinal Member"^^xsd:string ; | ||
skos:definition "A member of an Ordered Collection. It either precedes or is preceded by another Ordered Member in the same collection, or it has a stated integer position in the collection."^^xsd:string ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use 'linking a member of a collection to that collection' to bypass the 'real-world item' awkwardness.
…rdered collection properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix one typo and consider another change to the someValuesFrom
restriction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for steering this barge into the port 👏
gistCore.ttl
Outdated
] ; | ||
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ; | ||
skos:prefLabel "Ordinal Member"^^xsd:string ; | ||
skos:definition "A member of an ordered collection. This resource serves as a proxy linking a real-world item in the collection to that collection, allowing the expression of positional and other information that applies to the item only in the context of the collection."^^xsd:string ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linking a real-world item in the collection to that collection,
Confusing wording, it does not seem to be saying what we want it say. Why does an item that is already in a collection need to be linked to that same collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about 'This resource serves as a proxy that represents an item in the collection to allow the expression of positional and other information that applies to the item only in the context of the collection'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think the phrase "an item in the collection" causes confusion, since it's technically only the proxy that's in the collection.
How about "A member of an ordered collection. This resource links an item to a collection and allows the expression of positional and other information that applies to the item only in the context of the collection."?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is annoyingly difficult to do well. Here is one more attempt. The example is from the IMF.
skos:definition "A member of an ordered collection. It is a proxy for a real world item that can appear in different orders in different collections. The ordered member appears in exactly one ordered collection."
skos:scopeNote "An ordered member points to the real world item via the providesOrderFor property and has ordering information either as a number in a sequence, or by preceding or following another ordered member."^^xsd:string ;
skos:example "A document template may have parts such as table of contents, introduction, main body, appendix etc, but not all documents have all parts. The appendix might be the third part of one document template, but the 5th part of another. This would correspond to one instance of DocumentPart for an appendix, and two instances of ordered member."^^xsd:string ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fact that defining OrderedMember is so difficult to do well, is all the more reason to get it as good as we can.
gistCore.ttl
Outdated
[ | ||
a owl:Restriction ; | ||
owl:onProperty gist:hasOrderedMember ; | ||
owl:minCardinality "1"^^xsd:nonNegativeInteger ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its best (for performance and flexibility reasons) to use someValuesFrom rather than min 1. If there is no filter class, just use owl:Thing.
docs/ReleaseNotes.md
Outdated
@@ -8,6 +8,7 @@ Release 10.0.0 | |||
|
|||
- Renamed `MimeType` to `MediaType` to be consistent with [IANA guidelines](https://www.iana.org/assignments/media-types/media-types.xhtml) | |||
and [RFC6838](https://tools.ietf.org/html/rfc6838). Issue [#434](<https://github.com/semanticarts/gist/issues/434>). | |||
- Refactored ordered collection model. Includes addition of predicate `gist:providesOrderFor` and deletion of classes `gist:OrdinalCollection` and `gist:OrdinalMember`. Issue [#112](<https://github.com/semanticarts/gist/issues/112>). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have pieces indented like this:
- Refactored ordered collection model. Issue [#112](<https://github.com/semanticarts/gist/issues/112>)
- Added predicate `gist:providesOrderFor`
- Deleted classes `gist:OrdinalCollection` and `gist:OrdinalMember`. .
gistCore.ttl
Outdated
] ; | ||
skos:definition "A member of an Ordinal Collection. It necessarily precedes or is preceded by another Ordinal Member in the same collection. (This last condition cannot be formally stated in OWL)."^^xsd:string ; | ||
skos:prefLabel "Ordinal Member"^^xsd:string ; | ||
skos:definition "A member of an ordered collection. This resource serves as a proxy linking a real-world item in the collection to that collection, allowing the expression of positional and other information that applies to the item only in the context of the collection."^^xsd:string ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is annoyingly difficult to do well. Here is one more attempt. The example is from the IMF.
skos:definition "A member of an ordered collection. It is a proxy for a real world item that can appear in different orders in different collections. The ordered member appears in exactly one ordered collection."
skos:scopeNote "An ordered member points to the real world item via the providesOrderFor property and has ordering information either as a number in a sequence, or by preceding or following another ordered member."^^xsd:string ;
skos:example "A document template may have parts such as table of contents, introduction, main body, appendix etc, but not all documents have all parts. The appendix might be the third part of one document template, but the 5th part of another. This would correspond to one instance of DocumentPart for an appendix, and two instances of ordered member."^^xsd:string ;
I think Michael has mostly nailed it. I propose a couple of tweaks:
Michael, I've provided a different example which I think is more straightforward and easier to understand. See what you think. We could of course include both. |
Yes, much better example. Below is a slightly revised version. I split a long sentence in the scope note into two. I also got rid of the last sentence. First, I found it confusing. When I realized what it says, it kind of goes without saying, once the idea is grasped, which is hard enough. If we insist on saying it, then we need to have a compelling example that somehow does not add more complexity and confusion. Even if it was a good example, it still may not be worth saying. Less is more. See also the variation at the end.
VARIATION: I moved last sentence of definition to first sentence of scope note and replaced it with a new sentence, which I think captures the essence. The scope note is rewriten to exactly echo the last sentence in the definition.
Why was this so fricking hard to do well? |
I saw that Dalia made changes to the annotations, but they were not my latest draft. Can @rjyounes and @daliadahleh have a look to see what we want to go with? |
@uscholdm, the annotations are from your latest draft. I used the first variation in your latest comment . |
I'm happy to go with this. @uscholdm please give the final go-ahead. |
I prefer the second variation. Can you say what you prefer about the first? |
I thought 'An ordered member exactly corresponds to a particular item in a particular order in a particular (ordered) collection' is unnecessarily wordy. The point comes across just as clearly in the first variation. I'm not too picky though, happy to go with either. |
I think I agree, at least for the definition. We could just remove that sentence all together, or put it in the scope note. Its Rebecca's call. I'm not too bothered either way. |
Let me look at it. It's not actually correct to say it corresponds to a particular item "in a particular order." It is linked to the same item regardless of the order. It will just change its properties (sequence or directlyPrecedes) accordingly. |
OK - maybe its just helpful to me as a way to think about it, but confusing otherwise. Probably best to just leave that verbiage out. |
No description provided.