LMNL syntax parsing: a demonstration

Wendell Piez
Balisage 2012

See the paper at http://balisage.net/Proceedings/vol8/html/Piez01/BalisageVol8-Piez01.html.

Source

Luminescent

Results

frost-example.lmnl [4.1K]

step 1

step 2

step 3

step 4

step 5

step 6

step 7

step 8

step 9

step 10

step 11

step 12

xLMNL

XML

Analysis

demo.lmnl [4.1K]

step 1

step 2

step 3

step 4

step 5

step 6

step 7

step 8

step 9

step 10

step 11

step 12

xLMNL

XML

Analysis

Demo HTML

frankenstein.lmnl [4.1K]

step 1

step 2

step 3

step 4

step 5

step 6

step 7

step 8

step 9

step 10

step 11

step 12

xLMNL

XML

Analysis

Bubble graph

julian-and-maddalo.lmnl [4.1K]

step 1

step 2

step 3

step 4

step 5

step 6

step 7

step 8

step 9

step 10

step 11

step 12

xLMNL

XML

Analysis

Bubble graph

Easter1916.lmnl [4.1K]

step 1

step 2

step 3

step 4

step 5

step 6

step 7

step 8

step 9

step 10

step 11

step 12

xLMNL

XML

Analysis

Bubble graph

Lyric graph

Highlights of the demonstration

Robert Frost excerpt (frost-example.lmnl)

This is the short example used in the paper; it is small, but has both overlapping ranges and "stacked" (recursive) annotations.

Of particular interest here is the different stages of the Luminescent processing pipeline, proceeding to the xLMNL "compiled" form of the document.

Additionally, two more results of processing this document (not linked in the table) show how XML may be extracted from LMNL:

(Both of these are delivered by Luminescent dynamically using runtime parameters when requesting the XML.)

Demo page (demo.lmnl)

An example of free-form documentary markup using, for the most part, HTML vocabulary.

Of particular interest here is ranges marked noted. These are provided with annotations: a resp annotation indicates the author of the note, while anonymous annotation gives the content of the note appended to the range.

In the HTML display, the notes are shown as popups in the margin, linked from the range (which shows up highlighted when the user hovers over the number generated for the noted range). LMNL annotations can be marked up and structured, as demonstrated. In addition, arbitrary overlap (ranges overlapping other ranges of the same type) is shown in this file.

Frankenstein, by Mary Shelley (frankenstein.lmnl)
This is a TEI-encoded version of Mary Shelley's novel Frankenstein: Or, the Modern Prometheus (1831 ed.).
The bubble graph of the LMNL document renders the narrative structure of the novel, with chapters, narrations (nar ranges) and quotes marked up. This novel presents a nested narrative structure: a sequence of letters from a sea captain relates an encounter with Victor Frankenstein, in which Frankenstein tells his story (chapters 1-24); in the midst of this (chapters 10-14) the monster tells his own story. This structure partly corresponds with, and partly overlaps with, the chapters.
For best results, use an SVG browser capable of zooming in to arbitrary levels.
“Julian and Maddalo: A Conversation“, by Percy Bysshe Shelley (julian-and-maddalo.lmnl)

A narrative poem in rhymed couplets (1818-1819), with the occasional tercet. Both the verse structure (lines and line groups) and the rhetorical composition (verse paragraphs) are marked up; these overlap (occasionally, the boundaries between verse paragraphs appear in the middle of lines). Additionally, quotation structure (q ranges) is marked up (and quotations nest in a couple of places); it also overlaps the other structures.

The SVG bubble graph here shows not only the structures marked up but also renders the poem itself. (Zoom in to read the poem.)

“Easter 1916“, by William Butler Yeats (Easter1916.lmnl)

A poem in tetrameter quatrains. Markup shows verse paragraph (lines and quatrains) and also grammatical structure (sentences and phrases marked as s and phr ranges).

In addition to a bubble graph like the preceding example, here we have a "lyric graph", in HTML with SVG, showing some dynamic (animated) behaviors. If the user roves the pointer over the bars to the left or the text of the poem, the ranges covering that position in the text will be highlighted, and the text will scroll to that position.

Also (and not linked from the table), you may inspect the XML extracted to represent verse and line structure (with empty range markers for s and phr ranges) or the alternative XML representing sentence and phrase structure (with lines and quatrains marked with range markers).

In addition, for all examples the complete Luminescent pipeline is shown, proceeding from left to right, with the xLMNL result of the pipeline. Also the results of an analytical stylesheet, indicating where overlaps occur in each instance, are shown.

More information on LMNL may be found at lmnl-markup.org, or by emailing Wendell Piez (wapiez@wendellpiez.com)