-
Notifications
You must be signed in to change notification settings - Fork 9
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
Profile SHACL shape #84
base: main
Are you sure you want to change the base?
Conversation
shapes/profile-shape.ttl
Outdated
:zeroOrMorePath rdf:rest ] | ||
rdf:first ) ] ]; | ||
:path schema:knowsLanguage; | ||
:targetClass rdf: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.
Not sure if this is correct per SHACL but as I understand schemaorg, expected range is Text or Language.
:targetClass rdf:Collection ] ], | |
:targetClass schema:Text, schema:Language ] ], |
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.
Agreed (except that :targetClass
should be sh:class
). schema:knowsLanguage
can just be in the profile multiple times, just as schema:skills
, so no need for a complex rdf:Collection
structure.
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 code uses the structure to allow you to put your languages in order. I think that is quite important in practice. People's ability in different language tends to vary a lot.
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.
Suggestions above seem good and useful.
I'll just leave a reminder about the following. Mentioned the Cognitive Characteristics Ontology ( https://smiy.sourceforge.net/cco/spec/cognitivecharacteristics.html ) elsewhere but it may serve as useful input to towards providing a solution in particular for example ( #52 ):
Factors specific to physical, physiological, genetic, mental, economic, cultural, social, or behavioural identity.
In my https://csarven.ca/cv , I say I have cco:skill
and refer to the human-languages in ESCO. I didn't bother to order or put weights (and maybe that's overkill.. not sure.). The details seems useful for CV/Resume-like cases but not necessarily generic Profile info? Could go either way.. especially if the application can simply adapt the UI to use the user's preferred or most skilled language first, then try others (or even give option to change.) So, ordering languages can be simple to input and consume.
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.
Noting the discussion at https://github.com/solid/webid-profile/blob/main/meetings/2023-02-21.md#shapes-pr . Pardon me for the initial suggestion to use schema's Text or Language. I was merely going with the definition of schema:knowsLanguage that appears to use them as rangeIncludes.
I agree that URIs would be preferable to strings. Ditto Collection (especially if that's intended to be interpreted as preferred order for use).
Feel free to revert or change the shape as you see fit.
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.
Re Collections: the semantics of schema:knowsLanguage
do not allow for that; the range consists of schema:Language
and schema:text
. If we want order/weight, I suggest we indeed go with something like CCO as @csarven mentioned, even though this might make profiles quite complex for the human reader.
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 will just ask: should this not be a .shacl file?
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.
Great job already!
I proposed some structural simplifications where I think it became a bit to complicated, and I tried to clarify the admittedly weird role of sh:targetClass
.
shapes/profile-shape.ttl
Outdated
:name "Organization"@en, | ||
"Organization"@fr; |
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 nice!
shapes/profile-shape.ttl
Outdated
[ | ||
:name "occupation"; | ||
:path org:role ], | ||
[ | ||
:datatype xsd:string; | ||
:path vcard:role ] ]; |
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.
One is missing a name, the other a datatype.
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.
If these happen to be the same, we can remove redundancy by using a sh:or
:
[ | |
:name "occupation"; | |
:path org:role ], | |
[ | |
:datatype xsd:string; | |
:path vcard:role ] ]; | |
[ | |
sh:datatype xsd:string; | |
sh:name "Occupation"@en; | |
sh:or ( [ sh:path org:role ] [ sh:path vcard:role ] ) ]; |
shapes/profile-shape.ttl
Outdated
:zeroOrMorePath rdf:rest ] | ||
rdf:first ) ] ]; | ||
:path schema:knowsLanguage; | ||
:targetClass rdf: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.
Agreed (except that :targetClass
should be sh:class
). schema:knowsLanguage
can just be in the profile multiple times, just as schema:skills
, so no need for a complex rdf:Collection
structure.
Apart from what's arleady in the document, I think it might also be interesting to add a small NodeShape for the PersonalProfileDocument entry linking to WebID Document to the Person. Something along the following lines.
|
@timea |
0a876cc
to
9141123
Compare
sh:property | ||
[ | ||
sh:datatype xsd:string; | ||
sh:name "his/hers/theirs..."; |
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 large amount of the sh:name
s seem better suited to sh:description
s
sh:name "his/hers/theirs..."; | |
sh:name "Preferred Relative Pronoun"; | |
sh:description "his/hers/theirs..."; |
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.
Also, these are not and should not be referred to as the person's "preferred" pronouns; rather, they are simply the person's pronouns.
sh:property | ||
[ | ||
sh:datatype xsd:string; | ||
sh:name "his/hers/theirs..."; | ||
sh:path solid:preferredRelativePronoun ], | ||
[ | ||
sh:datatype xsd:string; | ||
sh:name "him/her/them..."; | ||
sh:path solid:preferredObjectPronoun ], | ||
[ | ||
sh:datatype xsd:string; | ||
sh:name "he/she/they..."; | ||
sh:path solid:preferredSubjectPronoun ], |
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'd suggest making this all part of a sh:group
to assist form tools.
My personal opinion is that we should most shapes for client-client standards in Solid should be required to add these non-validating characteristics so that it is easier for apps to generate nice looking forms for users to supplement and/or fix data that is required for their application from a generic form editor.
[ | ||
sh:name "Set type"; | ||
sh:path rdf:type; | ||
sh:targetValue schema:Person |
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.
Do you mean sh:hasValue
?
[ | ||
sh:min 1; | ||
sh:or ( | ||
[ | ||
sh:name "Set type"; | ||
sh:path rdf:type; | ||
sh:targetValue schema:Person | ||
] | ||
[ | ||
sh:name "Set type"; | ||
sh:path rdf:type; | ||
sh:targetValue foaf:Person ] | ||
[ | ||
sh:name "Set type"; | ||
sh:path rdf:type; | ||
sh:targetValue vcard:Individual | ||
])], |
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 should be able to just be
sh:path rdf:type;
sh:qualifiedMinCount 1 ;
sh:qualifiedValueShape [ sh:in ( schema:Person foaf:Person vcard:Individual ) ]
sh:name "Organization"@en, | ||
"Organization"@fr; | ||
sh:path org:organization ], |
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.
Perhaps set the sh:nodeKind
as sh:blankNodeOrIRI
@jeswr - just being pedantic, but that draft SHACL compact syntax spec you reference states that the reserved file extensions are either |
Based off: https://github.com/solid/webid-profile/blob/main/shapes/profile-shapes.ttl