[topicmapmail] Triangulation of associations

Eirik Jensen Opland opland@ontopia.net
Fri, 24 Feb 2006 20:24:36 +0100


Hi Knut,

On Fri, 24 Feb 2006 13:01:07 +0100, Knut Anton Bøckman <kab@db.dk> wrote:

> As a newcomer to the list and a TM-beginner, I ask humbly for a piece of
> advice. It may be trivial, but it may also touch on some very simple  
> form of
> inferencing.

Hopefully, my feedback will be helpful. I'll address the points  
individually below.

>
> The case is this:
> having made a topic map over my library, let's keep it simple and focus  
> on
> the three main topic types: person, book, and subject (what the book is
> about).
> There are the obvious association types between them: person (in the  
> role of
> author) associated with book; book associated with subject, and book
> associated with person (in the role of subject).
> On the instance level, of course, the persons have names, the books  
> titles,
> and the subjects terms (that are related taxonomically related, but that  
> is
> an other story).
> The TM is thus populated, everything works well, but one association is
> annoyingly absent: The one that would give a profile of the person in  
> terms
> of the subjects associated to the books that person has authored. In the
> opposite direction, it would also provide the chance to see the names of  
> the
> who have written on a given topic, as opposed to only the books on that
> topic.

This is more a question of how you present the information in your topic  
map than about the actual modelling. As you say, the information is  
already there. Duplicating it will give you more work managing changes to  
your topicmap and will most likely make it harder to find the right  
information in it.

If the authors are connected to the books and the books to the subjects,  
you could easily navigate to the different subject via the books (e.g. in  
the Omnigator).

I guess what you really want is the ability to present the different  
subjects that an author has written about. The easiest way to do this is  
by using a query language. Tolog, which was developed by Ontopia, is great  
for this. You can read about how to write tolog queries at the following  
web site:
http://www.ontopia.net/omnigator/docs/query/tutorial.html

Aslo look out for TMQL, which is an ISO standard for Topic Map Query  
Languages, currently under development.

You can use Tolog for free to query topic maps in the Omnigator (Open your  
topic map in the Omnigator and click on "Query" in the Omnigator menu).

An example query, which gives you all subjects that an author wrote about  
can look a bit like this (depending on what your topic map looks like):

select $SUBJECT from written-by(stephen-king : author, $BOOK : book),  
subject-of($BOOK : has-subject, $SUBJECT : subject)

Since Stephen King writes horror stories, this would probably return  
something like:

Fear
Murder
Psychopathy
Crime

Using the tolog tag library in the Ontopia Knowledge Suite (OKS), you  
could make your own web-site that dynamically creates links directly from  
Stephen King to the subjects of Fear, Murder, Psycopathy and Crime (and  
similar for other authors).

>
> Clearly, I couold make a new association type connecting person and  
> subject
> directly and then type in the appropriate person IDs and subject terms  
> (or
> IDs), but that would be redundant (and it would involve a lot of typing).
> The information is already there in the TM. So how do I get it out in the
> form I want?

If by "get it out" you mean present it to a user in some interface (e.g a  
web-site), then my previous paragraph should explain in detail how to do  
it.

However, in some cases you may want to make explicit that the author wrote  
about a particular subject. For example, an author may have certain  
subjects that (s)he wrote a lot about or that were essential to his/her  
authoring. In that case, you could make the information explicit by  
associating the author directly to the book (e.g. with an "wrote-about"  
association).

>
> I came up with the following suggestions (on a conceptual level):
> 1) reify the book-subject association, then make an association between  
> this
> (new) topic type and person. However, I can't quite figure out how this
> would get me the right information.

Neither do I. If you do want connect the person directly to the subject  
you should use a separate association.

> 2) take the subject role type (which can be played by both person and
> subject topics, in associations with books) and make it into a topic  
> type,
> then make an association between this topic type and person. But again,  
> how
> would I ensure the correct transfer between person and subject role via  
> the
> person's books?

I'm not sure what you achieve by doing this. Regardless, I would advice  
against it in this case. Again, making an association directly between the  
author and subject is the best way if you require this additional  
information.

> 3) it also occurred to me that if the subject terms were conceived of as
> properties of the book, the transfer would be safe, and I could simply  
> have
> these subject-properties turn out as book names in a
> "person-subject-profile" scope. However, I need the subjects to be  
> topics in
> order to say other things about them (such as what their positions are in
> the subject term hierarchy).

Again, I would advice against this solution. Like solutions 1 and 2, it  
makes things unnecessarily complicated.

I recommend you keep things as simple as possible when you design your  
topic map. Focus on what makes the topic map logically simple. Don't try  
to make short-cuts that may allow you to type less, but make the  
relationships more logically complicated. Use binary associations whenver  
it makes sense.

>
> Any good ideas (and patience), anyone?

Did this help?

>
> Knut

-- 
Eirik Jensen Opland, Ontopian         <URL: http://www.ontopia.net >