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

sorting of type-less nodes #23

Open
VladimirAlexiev opened this issue Sep 10, 2024 · 2 comments
Open

sorting of type-less nodes #23

VladimirAlexiev opened this issue Sep 10, 2024 · 2 comments

Comments

@VladimirAlexiev
Copy link

What if a named node (not blank) lacks any of the types listed in #22?

  • On first glance it should go into ### Individuals because owl:NamedIndividual is a parasitic (useless) class that no practical-minded KG builder uses. Eg see https://linkedvocabs.org/data/era-ontology/3.1.0/doc/resources/skos/ and the hundreds of thesauri linked there.
  • Some sloppy ontology writers may leave properties without a type, eg:
    • :prop rdfs:domain :Foo; rdfs:range :Bar (RDFS reasoning will infer rdf:Property)
    • :prop owl:inverseOf :prop2` (OWL reasoning will infer it's a property)
    • But reasoning is not an excuse for sloppiness
  • If you look at https://www.w3.org/TR/owl2-quick-reference/, there are many constructs that are expressed with props not classes
    • eg :external owl:propertyChainAxiom (:internal1 :internal2) is a fully legitimate axiom that says :internal1/:internal2 infers :external and doesn't need to attach a type to :external
    • Ideally it should be sorted into the ### Axioms section based on the prop owl:propertyChainAxiom
@atextor
Copy link
Owner

atextor commented Sep 10, 2024

Let's say we introduce customizable sections as per my comment in #22, then I think there are multiple valid options:

  1. There's an option to mark one section as "default" or "fall back" that will collect all elements that are not explicitly part of another section
  2. The elements are listed at the bottom of the file
  3. You can also have an element sorted into a section by having a certain predicate (e.g. rdfs:domain or owl:inverseOf will put an element into "Properties"), maybe even by predicate + value.

While I like 3 for its flexibility (I think it would allow to precisely configure for your examples), it's either lots of OWL-specific logic in the formatter (which I would like to prevent if possible) or it means a lot of necessary configuration for a user, which is also bad.

@VladimirAlexiev
Copy link
Author

I don't have a clear answer, so this is currently an issue for discussion and to gather patterns.

BTW this smells like SHACL "targets": Class, subjectsOf, objectsOf...

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

No branches or pull requests

2 participants