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

Profile SHACL shape #84

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Profile SHACL shape #84

wants to merge 3 commits into from

Conversation

VirginiaBalseiro
Copy link
Member

@VirginiaBalseiro VirginiaBalseiro commented Jan 17, 2023

:zeroOrMorePath rdf:rest ]
rdf:first ) ] ];
:path schema:knowsLanguage;
:targetClass rdf:Collection ] ],
Copy link
Member

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.

Suggested change
:targetClass rdf:Collection ] ],
:targetClass schema:Text, schema:Language ] ],

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member

@timea-solid timea-solid left a 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?

Copy link
Contributor

@woutermont woutermont left a 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 Show resolved Hide resolved
shapes/profile-shape.ttl Outdated Show resolved Hide resolved
Comment on lines 37 to 38
:name "Organization"@en,
"Organization"@fr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice!

Comment on lines 40 to 45
[
:name "occupation";
:path org:role ],
[
:datatype xsd:string;
:path vcard:role ] ];
Copy link
Contributor

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.

Copy link
Contributor

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:

Suggested change
[
: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 Show resolved Hide resolved
shapes/profile-shape.ttl Outdated Show resolved Hide resolved
shapes/profile-shape.ttl Outdated Show resolved Hide resolved
:zeroOrMorePath rdf:rest ]
rdf:first ) ] ];
:path schema:knowsLanguage;
:targetClass rdf:Collection ] ],
Copy link
Contributor

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.

@woutermont
Copy link
Contributor

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.

:ProfileDocShape     a sh:NodeShape;
    dct:title "ShaCL shape for a PersonalProfileDocument";
    sh:targetClass foaf:PersonalProfileDocument;
    sh:property [
        sh:path foaf:primaryTopic;
        sh:node :ProfileShape;
    ].

@jeswr
Copy link

jeswr commented Jan 17, 2023

I will just ask: should this not be a .shacl file?

@timea .shacl is reserved for SHACL compact syntax; the file in this PR uses Turtle syntax.

@VirginiaBalseiro VirginiaBalseiro marked this pull request as ready for review January 24, 2023 07:31
@VirginiaBalseiro VirginiaBalseiro changed the title WIP: profile SHACL shape Profile SHACL shape Jan 24, 2023
sh:property
[
sh:datatype xsd:string;
sh:name "his/hers/theirs...";
Copy link

@jeswr jeswr Apr 1, 2023

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:names seem better suited to sh:descriptions

Suggested change
sh:name "his/hers/theirs...";
sh:name "Preferred Relative Pronoun";
sh:description "his/hers/theirs...";

Copy link
Contributor

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.

Comment on lines +15 to +27
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 ],
Copy link

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
Copy link

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?

Comment on lines +79 to +95
[
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
])],
Copy link

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  ) ]

Comment on lines +37 to +39
sh:name "Organization"@en,
"Organization"@fr;
sh:path org:organization ],
Copy link

@jeswr jeswr Apr 1, 2023

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

@pmcb55
Copy link

pmcb55 commented Nov 17, 2023

I will just ask: should this not be a .shacl file?

@timea .shacl is reserved for SHACL compact syntax; the file in this PR uses Turtle syntax.

@jeswr - just being pedantic, but that draft SHACL compact syntax spec you reference states that the reserved file extensions are either .shc and .shaclc (i.e., with a trailing 'c'). But yeah, your point is still valid though - i.e., this file is indeed using the Turtle syntax, and so .ttl is what I'd expect - but @timea-solid, have you ever come across a use of .shacl as a file extension (I can't find any from a quick Google search)...?

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

Successfully merging this pull request may close these issues.

8 participants