[sc34wg3] Representing hierarchies in CTM

Murray Altheim murray06 at altheim.com
Sun Aug 13 19:24:37 EDT 2006


Quoting Steve Pepper <pepper at ontopia.net>:
[...]
> I was aware of the actual syntax. What I was after was a longer extract from
> a real-life topic map that showed it used in context. I guess what I am
> really curious about is whether the semicolon syntax tends to be used in the
> context of other assertions being made about the subtype (but in isolation
> from other supertype-subtype relationships), or whether you tend to cluster
> your supertype-subtype relationships and, if so, what it looks like.
>
> In other words: did you invent this syntax extension (a) "merely" because
> your topic map happened to have a lot of class hierarchy and you wanted to
> save keystrokes, or (b) because you hit upon a way of making the hierarchy
> much easier to eyeball as a whole?

There is no way to "eyeball" the whole hierarchy because it is much too
large to see in one glance of LTM, as well as being spread out over a
number of files, as a series of modules -- many of the larger branches
are broken off into their own files. Also, the inclusion of all
declarations related to a given Topic are kept near the Topic declaration,
so the idea of attempting to show a complete hierarchy in one place just
isn't practical, or really necessary:  I don't look at LTM as having any
requirement as a reader-viewable format, i.e., it's for the author and
maintainers, not as a visual medium of expressing Topic Maps. If someone
is using it for pedagogical purposes, fine, but I don't see that as a
priority at all. LTM to me is an authoring format.

The overall ontology has a substantial hierarchical backbone, but there
are a lot of other relation types as well. These are intermixed in with
the hierarchy, e.g., properties (facets) follow their Topics.

> If it's the former (a), then a special delimiter may not be necessary, since
> you could _almost_ define your own using the current draft of CTM:
>
>   %assoc subtype ako supertype
>   ako tm:supertype-subtype .
>   subtype tm:subtype .
>   supertype tm:supertype .
>
>   dog ako mammal .
>   cat ako mammal .
>   mammal ako animal .
>
> OK, so it's two extra keystrokes per association, but it's 200% more
> intuitive than the semicolon :-) (I myself would probably opt for
> 'subtypeOf' rather than 'ako', but that's a matter of taste.) Lars Marius
> recently questioned whether we even need the proposed AKO "shortcut" for
> supertype-subtype and, given the above, I tend to agree with him.

I'm not particularly interested in converting all of my existing LTM to
CTM, as there is little benefit for me to do so. The one thing that
might alter that decision is the fact that I'm not remotely happy with
the semicolon as being defined by the superclass-subclass PSI, or any
specific PSI for that matter. I realized fairly early on that the specific
choice of hierarchical definition relies first on one's decision on a
set-theoretic (or other) model for a "hierarchy", and I decided against
using a class structure in favour of a collection structure, akin to
the decision in Cyc.

I've noted that most of my early decisions have over time moved closer
and closer to Cyc's, which I suppose isn't too surprising since a lot
of thought went into that project. I'm saddened to see how many
projects don't even stop to consider the fundamental relationship types
they use. Questions of extensional or intensional classes are considered
de rigueur, but backing up another level to whether or not to *use*
classes or sets is seldom considered. But part of my falling out with
one of my Ph.D. advisors came down to his lack of interest in
epistemology, so I shouldn't be too surprised.

> HOWEVER... if your answer to the question above was (b), we have a different
> situation. If it is the case that you have a way of using the semicolon
> delimiter to create a more visual impression of your class hierarchy, maybe
> we should consider going one step further. (Of course, we should really
> consider that anyway). Perhaps we could use indentation to represent a class
> hierarchy:
>
> [
>   animal
>     mammal
>       canine
>         dog
>         wolf
>       feline
>         tiger
>         lion
>     reptile
>       snake
>       neo-con
>     insect
> ]

I see this only of any practical benefit in pedagogy, or in (as above)
showing in documentation these kinds of structures. The problem is
(and I know you meant the above informally, but it's very common),
there are actually quite a number of expressed relation types in the
above "hierarchy". Zoological taxonomies are a lot more complex than
found at first glance.

> And if we can do that with supertype-subtype, why not also other
> "hierarchical" association types (locatedIn, partOf, subtopicOf)? Presumably
> the technique -- indentation or whatever -- would remain the same; we would
> simply declare the association type and role types using the normal template
> mechanism, and then specify what kind of hierarchy we were creating:
>
>   %assoc subtopic subtopicOf topic
>   %hierarchy subtopicOf [
>     arts
>       movies
[...]
>
> What do other people think? Is this something worth considering?

The only real benefit I see (frankly) to this is the ability to
declare inline relation type shortcuts. Since CTM is an active
project I would highly encourage this feature for the reasons
given above. For myself, I've thought about some kind of feature
like this for my custom LTM for quite awhile -- as I mentioned,
I've not been happy using the semicolon because it is now an
archaism, and that I'd much prefer to have a simple shortcut to
a fundamental relation type that *I* define. I continue to use
it because I have yet to reprogram my parser to handle predefined
inlines (not that it would be that difficult, just time and
motivation...).

In the end I suppose shortcuts are just shortcuts. It's just
nice to have an inline ability to express whatever place a given
Topic fits into a bigger picture (whatever relation type is used
to make that fit).

Hope this was helpful,

Murray

...........................................................................
Murray Altheim <murray06 at altheim.com>                              ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

        In the evening
        The rice leaves in the garden
        Rustle in the autumn wind
        That blows through my reed hut.  -- Minamoto no Tsunenobu



More information about the sc34wg3 mailing list