alps-io / imports

Collection of imported vocabularies from other sources (e.g. IANA, Schema.org, microformats, etc.) converted into ALPS documents.
https://alps-io.github.io/imports/
7 stars 2 forks source link

resolving multi-range ontology descriptors #8

Open mamund opened 3 years ago

mamund commented 3 years ago

how do we handle schema.org elements with range values?

dillonredding commented 3 years ago

To expand on that a bit, there are two things here.

First, there's an issue in the current generated taxonomic descriptors (complex schemas), specifically around referencing ontological descriptors (properties) with multiple types (rangeIncludes has multiple values). For example, in Thing.json:

{
  "id": "Thing",
  "def": "https://schema.org/Thing",
  "descriptor": [
    { "href": "./identifier.json#identifier" }
  ]
}

However, identifier.json does not contain the ID identifier, which leads to the second part: how do we handle the generated ontology descriptors? Should we include a "default" descriptor and leave the taxonomic descriptors unchanged? For example,

[
  {
    "id": "identifier",
    "def": "https://schema.org/identifier",
    "name": "identifier",
    "type": "semantic"
  },
  {
    "id": "identifierPropertyValue",
    "def": "https://schema.org/identifier",
    "name": "identifier",
    "type": "semantic"
  },
  {
    "id": "identifierText",
    "def": "https://schema.org/identifier",
    "name": "identifier",
    "type": "semantic"
  },
  {
    "id": "identifierURL",
    "def": "https://schema.org/identifier",
    "name": "identifier",
    "type": "semantic"
  }
]

Or should we denorm a reference to each ontological descriptor in the taxonomic descriptors?

{
  "id": "Thing",
  "def": "https://schema.org/Thing",
  "descriptor": [
    { "href": "./identifier.json#identifierPropertyValue" },
    { "href": "./identifier.json#identifierText" },
    { "href": "./identifier.json#identifierURL" }
  ]
}
mamund commented 3 years ago

i am currently doing the "denorm-ed" approach in my ALPS work. IOW, I continue to go as flat as possible in my ALPS documents. it seems to me to be consistent (if not pretty) and doesn't hide anything or bake assumptions into the output. happy to get feedback on that.

FWIW, this project was originally started by @leonardr and myself as a way to explore how closely (or not) existing vocabularies like schema.org would fit w/ ALPS. i assume we are not likely to get a "high fidelity" fit but i would like to see us come up with a "good enough" fit between existing vocabularies (like schema.org, deblin core, microformats, etc.) and the way ALPS uses them.

it might be worth it to see if @koriym's issue on the spec repo (https://github.com/alps-io/spec/issues/110) about hierarchical descriptors has implications for this import work, too.