Syntax with Cascading Stylesheets (CSS)

Post Reply
Jonathan Robie
Posts: 4226
Joined: May 5th, 2011, 5:34 pm
Location: Durham, NC
Contact:

Syntax with Cascading Stylesheets (CSS)

Post by Jonathan Robie »

In another thread, I discussed displaying morphology with Cascading Stylesheets. In the SBL 2014 talk that Micheal Palmer and I are doing, we will also show how to display syntax trees with Cascading Stylesheets.

The first step is to create an XML representation that is easy to use with Cascading Stylesheets - and as we will see in another thread, it is also very easy to use for queries. This data is derived directly from the Global Bible Initiative treebank published by biblicalhumanities.org, but the scheme is much simpler.

We want to represent both morphology and syntax in the same tree. In our scheme, a <w/> element represents a word with its morphology, and a <wg/> element represents a word group. We identify the class and role of each word and word group. There are no verb phrases in our scheme. Instead, a clause is dominated by a verb, and also contains its subjects and objects. For instance, here is a word group from Luke that contains a prepositional phrase that contains a clause:
xml-tree.png
xml-tree.png (111.4 KiB) Viewed 1400 times
We might want to format this with square brackets to indicate word groups, displaying the role of each word group. Here is a Cascading Stylesheet fragment that does this:
syntax-css.png
syntax-css.png (17.8 KiB) Viewed 1400 times
Here is the Noah quote we used in the morphology thread, displayed as a syntax tree using this format:
noah-tree.png
noah-tree.png (45.04 KiB) Viewed 1400 times
This format makes it reasonably easy to read text continuously, and displays the relationships among verbs in a fairly straightforward way.
ἐξίσταντο δὲ πάντες καὶ διηποροῦντο, ἄλλος πρὸς ἄλλον λέγοντες, τί θέλει τοῦτο εἶναι;
http://jonathanrobie.biblicalhumanities.org/
Post Reply

Return to “Syntax and Grammar”