Archive for the ‘XTM’ Category

Understanding Clojure’s Persistent Vectors, pt. 1

Monday, March 24th, 2014

Understanding Clojure’s Persistent Vectors, pt. 1 by Jean Niklas L’orange.

From the post:

You may or may not heard about Clojure’s persistent vectors. It is a data structure invented by Rich Hickey (influenced by Phil Bagwell’s paper on Ideal Hash Trees) for Clojure, which gives practically O(1) runtime for insert, update, lookups and subvec. As they are persistent, every modification creates a new vector instead of changing the old one.

So, how do they work? I’ll try to explain them through a series of blogposts, in which we look at manageable parts each time. It will be a detailed explanation, with all the different oddities around the implementation as well. Consequently, this blog series may not be the perfect fit for people who want a “summary” on how persistent vectors work.

For today, we’ll have a look at a naive first attempt, and will cover updates, insertion and popping (removal at the end).

Note that this blogpost does not represent how PersistentVector is implemented: There are some speed optimizations, solutions for transients and other details which we will cover later. However, this serves as a basis for understanding how they work, and the general idea behind the vector implementation.

The sort of post that makes you start wondering why we don’t have a persistent data model for XTM based topic maps?

With persistent we get to drop all the creating new identifiers on merges, creating sets of identifiers, determining if sets of identifiers intersect, to say nothing of having persistent identifiers for interchange of data with other topic maps. A topic’s identifier is its identifier today, tomorrow and at any time to which it is persisted.

To say nothing of having an audit trail for additions/deletions plus “merges.”

While you are considering those possibilities, see: Understanding Clojure’s Persistent Vectors, pt. 2

Balisage 2013 – Dates/Location

Tuesday, November 20th, 2012

Tommie Usdin just posted email with the Balisage 2013 dates and location:

Montreal, Hotel Europa, August 5 – 9 , 2013

Hope that works with everything else.

That’s the entire email so I don’t know what was meant by:

Hope that works with everything else.

Short of it being your own funeral, open-heart surgery or giving birth (to your first child), I am not sure what “everything else” there could be?

You get a temporary excuse for the second two cases and a permanent excuse for the first one.

Now’s a good time to hint about plane fare plus hotel and expenses for Balisage as a stocking stuffer.

And to wish a happy holiday Tommie Usdin and to all the folks at Mulberry Technology who make Balisage possible all of us. Each and every one.

Practical Transformation Using XSLT and XPath

Sunday, February 13th, 2011

A new edition of Practical Transformation Using XSLT and XPath by Ken Holman is out.

While not topic map specific, ;-), this is one of the two resources you need for transformations getting to (or from) topic maps using XSLT and XPath. The other one, would be: XSLT 2.0 and XPath 2.0: programmer’s reference. (You can also use both of these for non-topic map, XML based work.)

While your looking at Ken’s training resources, note his series on UBL (Universal Business Language).

I mention that because the greater the exposure of business systems the greater the need for the mapping of semantics (that means topic maps).

Contra XTM?

Thursday, January 13th, 2011

I was reading a topic map paper that complained about difficulties processing XTM with XML tools.

In fact, the article says, you need a topic map engine to process XTM effectively.

Was that a surprise?

What if I ran across a SQL database dump with tables, which contain foreign keys, etc.

I would be bet that I need a SQL database engine to process it effectively.

Would that be a surprise?

XTM, is and was an interchange syntax for topic maps.

That means people can interchange XTM topic maps with the expectation of a defined set of semantics, for processing with, wait for it, a topic map engine.

I write this because I think XML is under-recognized as a declarative semantic format and too casually viewed as a basis for processing.

There are cases where XML can be used as a basis for processing, I don’t know, tweets for example. ­čśë

Seriously, a file being written in XML (think word processing formats), doesn’t automatically make XML tools the best processing choice.

XTM is one of those cases, but that wasn’t a surprise.

idk (I Don’t Know)

Sunday, December 5th, 2010

What are you using to act as the placeholder for an unknown player of a role?

That is in say a news, crime or accident investigation, there is an association with specified roles, but only some facts and not the identity of all the players is known.

For example, in the recent cablegate case, when the story of the leaks broke, there was clearly an association between the leaked documents and the leaker.

The leaker had a number of known characteristics, the least of which was ready access to a wide range of documents. I am sure there were others.

To investigate that leak with a topic map, I would want to have a representative for the player of that role, to which I can assign properties.

I started to publish a subject identifier for the subject idk (I Don’t Know) to act as that placeholder but then thought it needs more discussion.

This has been in my blog queue for a couple of weeks so another week or so before creating a subject identifier won’t hurt.

The problem, which you already spotted, is that TMDM governed topic maps are going to merge topics with the idk (I Don’t Know) subject identifier. Which would in incorrect in many cases.

Interesting that it would not be wrong in all cases. That is I could have two associations, both of which have idk (I Don’t Know) subject identifiers and I want them to merge on the basis of other properties. So in that case the subject identifiers should merge.

I am leaning towards simply defining the semantics to be non-merger in the absence of merger on some other specified basis.


PS: I kept writing the expansion idk (I Don’t Know) because a popular search engine suggested Insane Dutch Killers as the expansion. Wanted to avoid any ambiguity.

TMDM-NG – Overloading Occurrence

Friday, November 5th, 2010

“Occurrence” in topic maps is currently overloaded. Seriously overloaded.

In one sense, “occurrence” is used as it is in a bibliographic reference. That is that subject X “occurs” at volume Y, page Z. A reader expects to find the subject in question at that location.

In the overloaded sense, “occurrence” is used to mean some additional property of a subject.

To me the semantics of “occurrence” weigh against using it for any property associated with a subject.

That has been the definition used in topic maps for a very long time but that to me simply ripens it for correction.

Occurrence should be used only for instances of a subject that are located outside of a topic map.

A property element should be allowed for any topic, name, occurrence or association. Every property should have a type attribute.

It is a property of the subject represented by the construct where it appears.

Previously authored topic maps will continue to be valid since as of yet there are no processors that could validate the use of “occurrence” either in the new or old sense of the term.

Older topic map software will not be able to process newer topic maps but unless topic maps change and evolve (even COBOL has), they will die.

TMDM-NG – Reification

Monday, October 18th, 2010

Reification in the TMDM means using a topic to “reify” a name, occurrence, association, etc. Whatever a subject is represented by a name, occurrence or association, after “reification” it is also also represented by a topic.

For the TMDM-NG, let’s drop reification and make names, occurrences, associations, etc., first class citizens in a topic map.

Making names, occurrences, associations first class citizens would mean we could add properties to them without the overhead of creating topics to represent subjects that already have representatives in a topic map.

Do need to work on occurrence being overloaded to mean both in the bibliographic sense as well as a property but that can wait for a future post.

Semantic Drift: A Topic Map Answer (sort-of)

Tuesday, October 12th, 2010

Topic maps took a different approach to the problem of identifying subjects (than RDF) and so looks at semantic drift differently.

In the original 13250, subject descriptor was defined as:

3.19 subject descriptor – Information which is intended to provide a positive, unambiguous indication of the identity of a subject, and which is the referent of an identity attribute of a topic link.

When 13250 was reformulated to focus on the XTM syntax and the legend known as the Topic Maps Data Model (TMDM), the subject descriptor of old became subject identifiers. (Clause 7, TMDM)

A subject identifier has information that identifies a subject.

The author of a topic uses information that identifies a subject to create a subject identifier. (Which is represented in a topic map by an IRI.)

Anyone can look at the subject identifier to see if they are talking about the same subject.

They are responsible for catching semantic drift if it occurs.

But, there is something missing from RDF and topic maps.

Something that would help with semantic drift, although they would use it differently.

Care to take a guess?

ANN: Finally! DBpedia and Wikipedia switched to Topic Maps! – News

Wednesday, June 30th, 2010

ANN: Finally! DBpedia and Wikipedia switched to Topic Maps!, according to Lars Heuer.

See his post for the details but if you are capable of installing plugins in a FireFox browser, you can use his DBpedia / Wikipedia -> Topic Maps service within your browser to create topic maps.

The bar for creating topic maps just keeps getting lower!

A few minutes later….

Caveat: I am already running FireFox 3.6.6 so your experience may vary, but….this rocks!

Installation of GreaseMonkey and the Mappify browser plugins was very slick (only GreaseMonkey required a restart) and then a quick jaunt to Wikipedia and the first article I pulled up, “rough sets” (that is *sets*), has “Mappify” next to the title and it presents a drop down menu of XTM, CTM and JTM, in that order. Pick one and it offers you the file.

It doesn’t get any slicker than this! Kudos to Lars Heuer!

Online RDF to Topic Maps Converter

Thursday, June 17th, 2010

Lars Heuer has released an online RDF to Topic Maps coversion web service!

Mappify – RDF to Topic Maps is the place!

No need for a topic maps engine or an RDF store. Streams RDF in and Topic Maps format out.

See his post for more details: ANN: Online RDF to Topic Maps Converter.

If you find this interesting, useful, etc., you can find contact information for Lars Heuer at: