- Introduced Rule 42: No Ontology Prefixes in Slot Names to enforce clean naming conventions. - Established Rule: No Rough Edits in Schema Files to ensure structural integrity during modifications. - Implemented Rule: No Version Indicators in Names to maintain stable semantic naming. - Created Rule: Ontology Detection vs Heuristics to emphasize the importance of verifying ontology definitions. - Defined Rule 50: Ontology-to-LinkML Mapping Convention to standardize mapping practices. - Added Rule: Polished Slot Storage Location to specify directory structure for polished slot files. - Enforced Rule: Preserve Bespoke Slots Until Refactoring to prevent unintended migrations during slot updates. - Instituted Rule 56: Semantic Consistency Over Simplicity to mandate execution of revisions in slot_fixes.yaml. - Added new Genealogy Archives Registry Enrichment class with multilingual support and structured aliases.
1.3 KiB
1.3 KiB
Rule: Ontology Detection vs Heuristics
Summary
When detecting classes and predicates in data/ontology/ or external ontology files, you must read the actual ontology definitions (e.g., RDF, OWL, TTL files) to determine if a term is a Class or a Property. Do not rely on naming heuristics (like "Capitalized means Class").
Detail
- Verification: Always read the source ontology file or use a semantic lookup tool to verify the
rdf:typeof an entity.- If
rdf:typeisowl:Classorrdfs:Class, it is a Class. - If
rdf:typeisrdf:Property,owl:ObjectProperty, orowl:DatatypeProperty, it is a Property.
- If
- Avoid Heuristics: Do not assume that
skos:Conceptis a class just because it looks like one (it is), or thatschema:nameis a property just because it's lowercase. Many ontologies have inconsistent naming conventions (e.g.,schema:Personvsfoaf:Person). - Strictness: If the ontology file is not available locally, attempt to fetch it or consult authoritative documentation before guessing.
Violation Examples
- Assuming
ex:MyTermis a class because it starts with an uppercase letter without checking the.ttlfile. - Mapping a LinkML slot to
schema:Thing(a Class) instead of a Property because you guessed based on the name.