Skip to content

vocabulary: relations as verb phrases, attributes as nouns, check_names.py and property icons - #48

Closed
sebastian-siemoleit wants to merge 10 commits into
developfrom
feature/property-names-and-icons
Closed

sebastian-siemoleit wants to merge 10 commits into
developfrom
feature/property-names-and-icons

Conversation

@sebastian-siemoleit

@sebastian-siemoleit sebastian-siemoleit commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

The vocabulary skill's Naming section gets one rule:

  • A relation (object property) is a verb phrase read from domain to range - a verb (manages, appliesTo, standsInFor) or has / is … of with the role the range plays (hasProductManager, isMemberOf), never a bare class or role name.

It also orders a term's predicates as the OWL API writes them - annotations sorted by their full IRI (measured with ROBOT 1.10) - so a vocabulary saved in Protégé or ROBOT shows no reordering.

Left out on purpose (2026-10-29): the spelling of attributes (a noun without has/is/was, Date/Time, is/has, Count), its check bin/check_names.py and the label casing are one organisation's convention; they left this PR for that organisation's own skills.

Why: a form row, a query and a Business Knowledge Editor drawing show the label between two resources. "Product has product manager Employee" says what it states; "Product product manager Employee" reads like the class and hides the direction.

Property icons: task icons (bin/property_icons.py) gives every attribute an icon for its meaning (mapped in icons/property-icons.json, else the kind of its value by its datatype alone: text, number, count, date, time, year, yes/no, link, location) and every mapped relation an icon for its kind with an arrow for its direction - or the range class's own icon behind the arrow - coloured after the domain or range class and embedded in the vocabulary as the last line of the term, where the OWL API puts foaf:depiction; an icon an older release placed elsewhere moves there on the next task icons. The Business Knowledge Editor draws a property's depiction on its box, so a drawing of the model says what each relation and attribute is about. The shared glyphs ship in bin/glyphs/ (13 relation, 17 attribute glyphs); a package draws its own into icons/glyphs/. Every glyph is refused unless it is drawing only (no script, no event handler, no reference outside the SVG), a depiction drawn by hand stays, and only the package's own properties get icons. task check:offline fails on a missing or stale icon once a package maps its properties; the template's check:icons:case holds the behaviour on tests/fixtures/icons with three planted faults. The vocabulary skill's depictions reference describes it.

task check:offline, the skill checks and check:icons:case pass for both test cases; the full task check passes on the tip.

…range

A relation named like a class or role (productManager) reads as the class, hides its direction and turns the triple into no sentence on a form, in a query or in the BKE. Attribute names are still open (Q244). The branch is to carry the property icons (Q205) as well.
@sebastian-siemoleit sebastian-siemoleit changed the title vocabulary: name every relation as a verb phrase vocabulary: relations as verb phrases, attributes as nouns, and check_names.py Oct 27, 2026
@sebastian-siemoleit sebastian-siemoleit changed the title vocabulary: relations as verb phrases, attributes as nouns, and check_names.py vocabulary: relations as verb phrases, attributes as nouns, check_names.py and property icons Oct 27, 2026
…sing left to the organisation

Measured with ROBOT 1.10: rdf:type, the logical axioms in a fixed order per
kind, then the annotations sorted by IRI; # comments are dropped. A
vocabulary saved in Protege or ROBOT then shows no reordering in its diff.
Labels stay words, not the IRI's spelling; their casing is eccenca's.
…uts foaf:depiction; the vocabulary skill sorts annotations by full IRI, not by prefix

Found in the completeness test: every property's icon sat after
rdfs:isDefinedBy, against the template's own predicate order.
… its block, so task icons repairs icons an older release placed after rdfs:isDefinedBy; the test plants one
@sebastian-siemoleit

Copy link
Copy Markdown
Contributor Author

Closed in favour of #55, which now carries this change unchanged, grouped by topic so one reviewer owns each skill. The discussion here stays readable. Sebastian Tramp's review remarks on the vocabulary skill in #31 apply there now.

@sebastian-siemoleit
sebastian-siemoleit deleted the feature/property-names-and-icons branch November 9, 2026 09:01
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

Successfully merging this pull request may close these issues.

1 participant