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

only boolean props should have prefix has/is #92

Open
VladimirAlexiev opened this issue Sep 5, 2024 · 3 comments
Open

only boolean props should have prefix has/is #92

VladimirAlexiev opened this issue Sep 5, 2024 · 3 comments

Comments

@VladimirAlexiev
Copy link

Interoperable-data/ERA_vocabulary#2 discusses prop naming convention.

Interoperable-data/ERA_vocabulary#2 (comment) shows non-boolean props with prefix "has/is". There's only 9 such (as of 2024-09-05).

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX era: <http://data.europa.eu/949/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
select * {
    values ?type {rdf:Property owl:ObjectProperty owl:DatatypeProperty}
    ?x a ?type
    filter(strstarts(str(?x),str(era:)))
    filter(regex(str(?x),"/(is|has)"))
    # optional {?x rdfs:range ?range}
    filter not exists {?x rdfs:range xsd:boolean}
}

The other 462 no-boolean props have no such prefixes. Consider removing this prefix from these 9 props, eg

  • hasETCSRestrictionsConditions -> etcsRestrictionConditions
  • hasPart, isPartOf -> part, partOf (or you could keep the existing names as an exception)
@gatemezing
Copy link
Collaborator

Thank you for the suggestion. Is there any reference on this proposal of "only boolean should have has/is"? Is this anywhere documented in this amazing world of ontology engineering?

@VladimirAlexiev
Copy link
Author

VladimirAlexiev commented Oct 1, 2024

There's no universal naming convention. The convention I described is the simplest one and is used in AKSW ontologies, and i prefer it.

The ERA convention cited in Interoperable-data/ERA_vocabulary#2 says "use verbal form" i.e. all props should be named "has" or "is". @MathiasVDA says you should follow it.

The point of this issue is that the ontology should consistently follow one or the other convention. Currently most props follow the simpler convention, but 9 do not.

@gatemezing
Copy link
Collaborator

As you see, there is not an universal way. The convention there are recipes that we are trying to follow as much as possible. You need to take into account the legacy part of the development of the ontology, taking into account changes that could affect some elements already working. When you read carefully the example of era:maximumBrakingDistance, it might needs a clear semantics of "use of verbal form or adjective" - :)

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