[topicmapmail] Compact Topic Maps Syntax -- A modest proposal

thomas thomas@stray.net
Wed, 15 Feb 2006 12:32:29 +0100


hi,

--On Mittwoch, 15. Februar 2006 9:12 Uhr +0100 Steve Pepper 
<pepper@ontopia.net> wrote:

> Hi Thomas,
>
>| although dict.leo.org couldn't help me find out what a "gut reaction"
>| might be,
>
> Spontan Reaktion? (Aus dem Bauch heraus?)

ah!

>| i'd like to give some remarks:
>|
>| * '>' and '>>' don't seem intuitive to me.
>
> I understand your point and the same thought occurred to me.
> However, I tried with the more "intuitive" '<' and '<<' and
> it didn't seem right: it's as if the flow of reading left to
> right gets interrupted.

"das dicke ende kommt noch" ;-) i could live with the reversed flow much 
better. but ... that's highly subjective, isn't it? although: the "<" is 
much easier to type on my german keyboard!

>| * why the use of paranthesis in this case:
>|         foaf:name "Giacomo Puccini" ( 'puccini, giacomo' /tm:sort/ ) ;
>|   but not in that case:
>|         dc:title "Madama Butterfly" , "Madame Butterfly" /lang:en
>|         lang:fr/ ; ?
>
> Because the first is a single base name with a variant, whereas
> the second is two separate base names (one of which is scoped).

okay. but perhaps a single slash for variants and a double slash for the 
scope?

or a single slash for variant and a "%" for scope? the "%" could be quite 
nice, because a percentage of something reminds at a confinement which a 
scope is.

and in both cases no parantheses and and no ending 
slash/doubleslash/percentage?

>
>| * the way associations are handled is not intuitive.
>|   i would expect another ordering: first the subject, then the
>|   association-type, then the object(s).
>
> That is indeed the order in the data itself:
>
>    :tosca
>       music:composed-by  :puccini .
>
> However, it felt more correct to have the following order in the
> declaration of the template:
>
>    assoc-type  role-type1  role-type2  [...]  role-typeN .
>
> There are two reasons for this: (1) The declaration is basically
> making an assertion about the association type ("these are its
> role types"), hence the assoc-type is the "subject" and should go
> first. (2) An important purpose of the template is to specify the
> *order* of the role types; having the order "disrupted" by the
> assoc-type appearing second in the list is counter-intuitive.

that appears right, because it follows to the topic maps model and 
thinking.

>| but i think it's better to stick to the XTM-practice of holding
>| associations seperate from topics
>
> In order to get full generality, this has to be an option. The
> templating mechanism only works when a single association type
> "signature" is used consistently throughout the topic map, and
> that will not always be the case.

i don't understand

> So my proposal does include the
> possibility of using the following (LTM-like syntax):
>
>    music:killed-by( :scarpia  > ex:victim
>                     :tosca    > ex:perpetrator
>                     :stabbing > ex:method
>    )
>
> which, in the presence of an appropriate template, could be
> abbreviated to
>
>    music:killed-by( :scarpia :tosca :stabbing )
>
>|   this also makes more sense semantically, since if you write it
>|   like subject-predicate-object, why should you care to define an
>|   association at all?
>|   (which may indeed be a question? may it?)
>
> I'm not completely certain I understand what you mean when you
> say "define an association" -- I assume you mean to declare an
> association type?

yes, i mumbled

> Well, the reason is, quite simply, in order to avoid having to
> always specify the *role types*. The @assoc declaration tells us
> which role types to expect, and what order to expect them in, so
> we must have it (unless we are willing to pay the price of having
> to specify the role types on every association).
>
> Your comment does raise one issue, however, which is whether it
> is a good idea (or not) to encourage (or even allow) users to
> express associations *as if* they had a "subject".

exactly, that's what i wanted to point out!

> We all know that associations in Topic Maps are inherently
> multidirectional, and that "Tosca was composed by Puccini" is the
> same as "Puccini composed Tosca". That relationship no more
> "belongs to" Tosca than it does to Puccini.
>
> The XTM interchange syntax has always made this very explicit by
> having <association> elements appear at the same level as <topic>
> elements (while <baseName> and <occurrence> are *subelements* of
> <topic>, because names and occurrences always "belong to" some
> topic).
>
> However, because we are humans, and we use natural language --
> a serialization syntax -- to communicate, it *is* natural to
> think in terms of a direction when *describing* a relationship.
> For most speakers of European languages, subject-verb-object is
> a very natural way to express a binary relationship. So why not
> exploit this in what is supposed to be a compact, intuitive and
> easy to read syntax? I believe we should.

i don't think so. i don't want to sound more topic maps than you, steve, 
but i think we shouldn't blur the concept of association. human language 
tends to carry a lot of context explaining and complementing the actaul 
"assertion". computer syntaxes have to be unnatural at some point to make 
up for that. so there's nothing unnatural with being unnatural at some 
point. (ehm, did i study computer sciences? no, i did not. do i really know 
what i'm talking about? perhaps i shouldn't talk so much...).
another argument: it get's too near to rdf (where they have developed 
things like owl:inverseProperty to handle situations...)
and another: you claim it's intuitive in itself which is only right in an 
ad hoc way. in the context of topic maps it isn't because it blurs the 
difference to subelements. ctm may very well become the language for 
beginners because they tend to be a little slower with typing. they 
shouldn't be forced to think of associations differently in ctm. because 
that may take less time to write but a lot more time to twist your mind 
while typing (and afterwards to correct your mistakes).
and don't forget the initial argument, that the change of order in elements 
is irritating. there's a topic and there follow lots of rows with 
properties-value-pairs, but suddenly, on the x-th row, there's not a 
property but an association-type in the first position, in the second 
position you have to think the topic (which you thought at the beginning of 
the line for x-1 rows), and so on... in an environment, where you expect to 
live under the majestic reign of logic, that's rather disturbing and 
unnatural ;-)


> This does, however, raise the question of whether we should offer
> an alternate syntax, based on subject-object-verb word order, for
> the benefit of speakers of languages like Japanese and Korean:
>
>    :tosca
>       :puccini  music:composed-by .
>
> SOV-language speakers: Would this be useful or not?
>
>
> --
> Steve Pepper, Ontopian
>



ciao
thomas

.
mailto:thomas@stray.net
http://stray.net

..
early optimization is the root of many evil
donald e. knuth