LMNL in Miniature

An introduction

Wendell Piez

Amsterdam Goddag Workshop, 1-5 December 2008

3 December 2008

Contact: Wendell Piez [wapiez -at- mulberrytech -dot- com]

Today's coverage

Whence cometh LMNL?

Wherefore LMNL?

LMNL as materials research

LMNL as exploration (I)

LMNL as exploration (II)

Design goals of LMNL

Informal design principles

What LMNL looks like: overlap

What LMNL looks like: structured annotations

Brief overview of LMNL object model

Design principle: less is more (especially for now)

Developments and current status

LMNL atoms

Parsing LMNL syntax

Using XML syntax instead

A LMNL processing architecture

Demonstration: LMNL via XML

Notice: no hierarchy

But ... we have talked about “layers”

An example limen: a document “view”

An example limen: relating discontinuous ranges

Another example limen

Looking for validation

Validating range relations: CREOLE

Conclusions and open questions


                                                   

Today's coverage


                                                   

Whence cometh LMNL?

Layered Markup and Annotation Language


                                                   

Wherefore LMNL?

And why not TexMECS, BUVH/JITTs, or other contemporaneous efforts?

“Um, clarify something for me ... are the requirements for TexMECS the same as or different as those of other efforts to deal with overlap such as LMNL, and if they're different, how are they different, and if they're the same, then why aren't you guys collaborating?”

(Paraphrasing Jonathan Robie to Claus Huitfeldt, Extreme 2006)


                                                   

LMNL as materials research

LMNL as architecture

                                                   

LMNL as exploration (I)

Of an unknown continent on Planet Markup ...

Overlap as blank map

                                                   

LMNL as exploration (II)

If this region is interesting, it's reasonable to expect we're not the only ones to visit ...

Overlap map

                                                   

Design goals of LMNL


                                                   

Informal design principles


                                                   

What LMNL looks like: overlap

LMNL syntax (“sawtooth” syntax) is designed to work with LMNL:

[excerpt [source}The Housekeeper{] [author}Robert Frost{]}
[s}[l [n}144{n]}He manages to keep the upper hand{l]
[l [n}145{n]}On his own farm.{s] [s}He's boss.{s] [s}But as to hens:{l]
[l [n}146{n]}We fence our flowers in and the hens range.{l]{s]
{excerpt]

                                                   

What LMNL looks like: structured annotations

[excerpt}
[s}[l [n}144{n]}He manages to keep the upper hand{l]
[l [n}145{n]}On his own farm.{s] [s}He's boss.{s] [s}But as to hens:{l]
[l [n}146{n]}We fence our flowers in and the hens range.{l]{s]
{excerpt
  [source
    [title}The Housekeeper{title]
    [loc}lines 144-146{loc]
    [source
      [title}North of Boston{title]
      [date}1915{date]]]
  [author
    [name}[given}Robert{given] [family}Frost{family]{name]
    [date}1874-1963{date]] ]

Annotations


                                                   

Brief overview of LMNL object model


                                                   

Design principle: less is more (especially for now)

LMNL is minimal


                                                   

Developments and current status


                                                   

LMNL atoms

A problem: LMNL ranges don't have much “thingness”


                                                   

Parsing LMNL syntax

Matt Palmer has been experimenting with parsing LMNL syntax in Python and Java

Development on this front continues


                                                   

Using XML syntax instead

Work inspired by Steve DeRose (2004) and Syd Bauman (2005)

CLIX: “Canonical LMNL in XML”


                                                   

A LMNL processing architecture


                                                   

Demonstration: LMNL via XML


                                                   

Notice: no hierarchy


                                                   

But ... we have talked about “layers”

Because applications and processing languages will need a systematic way of registering higher-level relationships between ranges ...

We stipulate the existence of an object called a limen (pl. limina)

Limina are largely untried to date


                                                   

An example limen: a document “view”

[excerpt [source}The Housekeeper{] [author}Robert Frost{]}
[s}[l [n}144{n]}He manages to keep the upper hand{l]
[l [n}145{n]}On his own farm.{s] [s}He's boss.{s] [s}But as to hens:{l]
[l [n}146{n]}We fence our flowers in and the hens range.{l]{s]
{excerpt]

Define a limen whose owner is the document. Select the excerpt and l ranges. This limen maps to a clean hierarchy.

The same can be done with any set of ranges that do not overlap (starts or ends). Enclosure implies dominance in the resulting tree.


                                                   

An example limen: relating discontinuous ranges

song and stanza limina

[p}The Hatter shook his head mournfully.
[q [sp}Hatter{]}Not I!{q] he replied. [q [cont}Hatter{]}We quarrelled
last March--just before HE went mad, you know--{q] (pointing with his
tea spoon at the March Hare,) [q [cont}Hatter{]}-- it was at the great
concert given by the Queen of Hearts, and I had to sing{p] [song}
[lg [n}1{]}
  [l}Twinkle, twinkle, little bat!{l]
  [l}How I wonder what you're at!{l]{lg]

[p}You know the song, perhaps?{p]{q]

[p}[q [sp}Alice{]}I've heard something like it,{q] said Alice.{p]

[p}[q [sp}Hatter{]}It goes on, you know,{q] the Hatter continued,
[q [cont}Hatter{]}in this way: --{p]

[lg [n}1{]}
  [l}Up above the world you fly,{l]
  [l}Like a tea-tray in the sky.{l]
  [l}Twinkle, twinkle --{l]{lg]{song]{q]

song limina could select all the song ranges from the document (one song range per limen). stanza limina could select the lg ranges with the same n annotation within the song limina, leaving other ranges (and cosmetic whitespace) behind.

We could then retrieve /%song/%stanza (limina) for stanzas and /%song/%stanza/enclosed::l (ranges) for lines appearing within stanzas.


                                                   

Another example limen

quote limina

[p}The Hatter shook his head mournfully.
[q [sp}Hatter{]}Not I!{q] he replied. [q [cont}Hatter{]}We quarrelled
last March--just before HE went mad, you know--{q] (pointing with his
tea spoon at the March Hare,) [q [cont}Hatter{]}-- it was at the great
concert given by the Queen of Hearts, and I had to sing{p] [song}
[lg [n}1{]}
  [l}Twinkle, twinkle, little bat!{l]
  [l}How I wonder what you're at!{l]{lg]

[p}You know the song, perhaps?{p]{q]

[p}[q [sp}Alice{]}I've heard something like it,{q] said Alice.{p]

[p}[q [sp}Hatter{]}It goes on, you know,{q] the Hatter continued,
[q [cont}Hatter{]}in this way: --{p]

[lg [n}1{]}
  [l}Up above the world you fly,{l]
  [l}Like a tea-tray in the sky.{l]
  [l}Twinkle, twinkle --{l]{lg]{song]{q]

quote limina could select each q with a sp annotation along with any following q with cont annotations equaling the sp on the first, up to the next q with that sp (and ignoring other ranges over the same text).

We could then retrieve /%quote (limina) for quotes and /%quote/enclosed::q/@sp (annotations) for their speakers.

Note: these semantics are only implicit in flat LMNL, and will require some sort of apparatus (syntax or declarations) to express.


                                                   

Looking for validation


                                                   

Validating range relations: CREOLE


                                                   

Conclusions and open questions