Mirror of the Rel4tion website/wiki source, view at <http://rel4tion.org>

[[ 🗃 ^yEzqv rel4tion-wiki ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Commits]

Clone

HTTPS: git clone https://vervis.peers.community/repos/yEzqv

SSH: git clone USERNAME@vervis.peers.community:yEzqv

Branches

Tags

master :: projects / idan /

statement-identifiers.mdwn

In the Turtle-like syntax, there is no way to specify statement identifier uids. I want to add it, so people can specify this information if they need to. I have two general directions:

  1. Specify them at the beginning of the statement
  2. Specify them at the end of the statement

Here’s a small part from the Metro ontology: (uid intentionally removed)

	<aaaaaaaaaaaaaaaa>
		smaoin:has_label "BasicUnit" ;
		smaoin:belongs_to_namespace $metro ;
		smaoin:is_a smaoin:Class ;
		smaoin:is_subclass_of :Term ;
		smaoin:is_subclass_of :Unit .

Since each statement can begin with any part - S or P or O - depending on how the factoring-out of common parts was used, the options are:

  1. Allow to place it anywhere in the statement except the end, depending on factoring
  2. Always at the end

Here’s an updated version of the same text, which has more syntax variety:

	<aaaaaaaaaaaaaaaa> smaoin:has_label "BasicUnit" .
	<aaaaaaaaaaaaaaaa>
		smaoin:belongs_to_namespace $metro ;
		smaoin:is_a smaoin:Class ;
		smaoin:is_subclass_of :Term, :Unit .

This is some suggested syntax for the first option:

	(ssssssssssssssss) <aaaaaaaaaaaaaaaa> smaoin:has_label "BasicUnit" .
	<aaaaaaaaaaaaaaaa>
		(ssssssssssssssss) smaoin:belongs_to_namespace $metro ;
		(ssssssssssssssss) smaoin:is_a smaoin:Class ;
		smaoin:is_subclass_of
			(ssssssssssssssss) :Term,
			(ssssssssssssssss) :Unit .

Hmmm… somewhat ugly. Let’s try the second option:

	<aaaaaaaaaaaaaaaa> smaoin:has_label "BasicUnit" (ssssssssssssssss) .
	<aaaaaaaaaaaaaaaa>
		smaoin:belongs_to_namespace $metro (ssssssssssssssss) ;
		smaoin:is_a smaoin:Class (ssssssssssssssss) ;
		smaoin:is_subclass_of
			:Term (ssssssssssssssss) ,
			:Unit (ssssssssssssssss) .

A bit better, don’t you think? The original data didn’t move, so understanding it hasn’t become much more difficult. It’s just the bit of clutter, which I don’t like. The lot of clutter, I mean. Let’s try to move these new uids somehow to separate them from the text better:

	<aaaaaaaaaaaaaaaa> smaoin:has_label "BasicUnit"    (ssssssssssssssss) .
	<aaaaaaaaaaaaaaaa>
		smaoin:belongs_to_namespace $metro             (ssssssssssssssss) ;
		smaoin:is_a smaoin:Class                       (ssssssssssssssss) ;
		smaoin:is_subclass_of
			:Term                                      (ssssssssssssssss) ,
			:Unit                                      (ssssssssssssssss) .

Good. Now, do you see those punctuation marks at the end of each line? If I could move them to where they used to be, it would be perfect. The only problem is that it could ruin the syntax. At the moment things can be arranged freely across lines. If I allow it now, the statement identifier may be placed at the beginning of the next line, which is very confusing because it would look like the first syntax suggestion.

Hold on… I have an idea. The rule can be as follows: If a punctuation mark ends a statement - i.e. one of {. ; ,} - then an optional statement identifier is allowed to be placed on the same line. After that, a new statement may begin as before. How readable it is, the user will decide, but it’s possible. I didn’t try, but I suggest the conventions as above: The lines end with statement identifiers. I’ll experiment with this more later, but here’s the updated example:

	<aaaaaaaaaaaaaaaa> smaoin:has_label "BasicUnit" .    (ssssssssssssssss)
	<aaaaaaaaaaaaaaaa>
		smaoin:belongs_to_namespace $metro ;             (ssssssssssssssss)
		smaoin:is_a smaoin:Class ;                       (ssssssssssssssss)
		smaoin:is_subclass_of
			:Term ,                                      (ssssssssssssssss)
			:Unit .                                      (ssssssssssssssss)

Done. This is the syntax for now. Seems reasonable.

[See repo JSON]