w3c / dx-prof

The Profiles Vocabulary
https://w3c.github.io/dx-prof/prof/
Other
4 stars 2 forks source link

Introduce mappingFrom and mappingTo properties #15

Open nicholascar opened 5 years ago

nicholascar commented 5 years ago

The Resource Role Mapping, if found to be necessary or useful, might need mappingFrom and mappingTo properties defined to indicate what is mapped to what.

kcoyle commented 5 years ago

I don't see how these could be roles. Actually, they aren't roles - they would have to be properties with values that identify the "from" and "to". In addition, I would even seem them as problematic as properties because in general each mapping document has both a "from" and a "to" so they are by definition about the same resource.

nicholascar commented 4 years ago

We, editors, will not be adding properties mappingFrom and mappingTo to the vocabulary, regardless of the outcome of discussions about a potential Mapping role, due to time constraints.

Marking this Issue as wontfix & future-work

aisaac commented 4 years ago

I'm a bit split here: this was about indicating that a resource includes alignments, wasn't it? This would seem rather handy. PROF has material about alignments, other vocabularies too, and it's useful to know that in an interlinked web of profiles.

That said it indeed would bring complexity. I don't think we need the "from" that @kcoyle mentions, (it can be said to be the profile that the resource is connected to) but the "to" would be needed, as without knowing its target, metadata about an alignment is a bit moot.

Note that we could also defer to some other vocabularies, like VoiD, which has features for "linksets" that we could use to indicate alignments between profiles. But that would be probably only work for formal representation of profiles in RDF-like expressions of profiles, not for the documentations.

rob-metalinkage commented 4 years ago

Including this sort of resource is the main reason I'd rather move forward as a Note than limit the scope to the very narrow subset of concerns that most of the group has about data description as opposed to data exchange. The point is to model the actual complexity in the real world - to minimise the additional layer of complexity caused by not having unambiguous ways to describe the things in the real world.

aisaac commented 4 years ago

@rob-metalinkage yes having PROF as a W3C Note would allow a more experimental approach. We just need to be careful not to go outside of our use cases and requirements. But even if there's no formalized requirement for alignment (I won't check it now) I'm quite sure that the profile cases we've inventorized include data or documentation that align them with other specifications.

kcoyle commented 4 years ago

@aisaac RE: mapping to and mapping from - A profile description could say: "If you want to map from X to me, here's what you use." Especially if X isn't using PROF. Think of BIBFRAME, where there's mapping from MARC to BIBFRAME, and BIBFRAME profiles might want to specify that mapping, since it's one of the main ways that people create BIBFRAME data - mapping from MARC.

aisaac commented 4 years ago

@kcoyle ah ok I think I see that we maybe our issue is that we don't have the same granularity in mind! I was thinking of identifying an alignment that is not strictly directional (i.e. it could connect two specs in either direction, or a combination of directions). I.e., rather an "alignment between X and Y" which could include "mappings from X to Y" and "mappings from Y to X". So in my scenario, "from" and "to" were not needed - instead we needed only a kind of "with".

kcoyle commented 4 years ago

@aisaac I can't imagine the utility of getting something that vague. If it's just "with" then it requires a human to actually read the document (well, at least the title) to determine if it is useful. So I suppose this takes us back to use cases for this vocabulary, and we don't have any that speak to it in any kind of detail. I can imagine wanting to scan the universe of profile data to find specific mappings ("what is a mapping between X and Y"), or even more specific: "what can I use to map from X to Y". But I can't imagine someone wanting "any related mapping between any format and this profile, or from this profile to anything else".

rob-metalinkage commented 4 years ago

"with" doesnt carry much information other than a place to look (at some artefact that could be any type) to try to work out from its contents what relationship it actually has to the profiles being referenced. from and to are simple inverses - and now we are talking Note I'll add property chain axioms to show how they relate semantically in case its really not obvious enough.

" Especially if X isn't using PROF" - if you mean X is an identifier for a profile that may or may not be described with PROF then thats correct.

rob-metalinkage commented 4 years ago

@aisaac we should be able to handle bi-directional mapping by including both to and from relationships for each - if we could identify a real world example we could throw this in to illustrate that - but the model handles it OK it cardinality is not suppressed. More complex would be if the mapping handles a subset - i,e, extract this part of X and turn it into a Y where X has quite a different scope to Y.

aisaac commented 4 years ago

@kcoyle I believe we've all agreed that it's acceptable that some characteristics of profiles will be only meant for humans, so I guess the case you describe ("it requires a human to actually read the document") would still fall in scope. Anyway my point is that basically the interpretation of an alignment as a directional mapping is often very difficult, and as a matter of fact, rather a human feat than a machine one. Especially in the RDF context. Consider the set of statements:

ex1:c1 rdfs:subClassOf ex2:c4
ex1:c2 owl:equivalentClass ex2:c5
ex2:c6 rdfs:subClassOf ex1:c3

(for a real world example see https://dcmi.github.io/schema.org/mappings.html . I don't remember where it comes from, but it looks rather serious)

Is this a mapping from ex1 to ex2, or from ex2 to ex1? It's in the eye of the beholder, really. Well actually, and to be fair to @rob-metalinkage 's point, we can express both directions with two pairs of to and from statements. That would probably be correct. And to be fair to @kcoyle 's point, it is true that most mappings come to existence because someone has a specific conversion case in mind, and that has a from and to. But the end the result (I mean, the set of statements in RDF) can be used for a conversion in either direction. So the question is, if most mappings are this way, can from and to be given meaningful semantics? I'm curious to see @rob-metalinkage 's axioms...

Perhaps a way out of it is to make it more precise, what we mean by "mapping". If we meant a conceptual crosswalk, or a set of correspondences between (meta)data elements, then it's hard to give it a direction. If it's a "specification of a conversion" (by means of a formalism whose realizations are essentially directional, like XSLT) then it probably has a direction. Maybe there's actually room for both notions.

A bit of googling gives two interesting examples, both looking quite official:

rob-metalinkage commented 4 years ago

@aisaac great work tracking down examples!

We have valid examples of both unidirectional and bi-directional mappings ( XSLT and cross-walks) so lets make sure we empower people to describe these. we have mappings in human readable form and machine readable form. Its obvious this is useful to have in scope and it looks like there is an appetite to provide enough metadata to answer interesting questions such as @kcoyle suggests.

maybe we need a subclass (narrower concept in this case) of "mapping" which is "specification of a conversion" - allowing "mapping" to be anything that allows you to get information about the relationship between two specifications with different conformance requirements (such as different schemas and/or different terms in values).

OTOH, maybe dct:conformsTo will tell you the form of the mapping and that tells you if its a specification language. (yes your system may need to include additional statements about the set of specifications to ask for things that can be converted using any conversion formalism)

I think property chain axioms could be introduced to make the profile the object of a "from" qualifier if this is not specified - but need to be careful it doesnt stop us being bi-directional. Another wrinkle would be a conversion script that spits out multiple forms- i.e. does more than one conversion (I've just written one that does that!)

So i think all the following are valid: 1) mapping from "this" profile X to a different profile Y (noting profile=specification through principles of reflexivity) 2) mapping from another specification Y to this profile X 3) bi-directional mapping between X and Y 4) mapping from X to Y,Z.. etc

Can we identify a case where the combination of role="mapping", "to", "from" and "conformsTo" doesnt give us enough information to answer a query we think should be supported (and if necessary added to the competency questions for PROF)?