Halliday & Matthiessen (2014: 726-8):
Consider the following sentence, from The Horizon Book of Railways, pp. 74–75:
In bridging river valleys, the early engineers built many notable masonry viaducts of numerous arches.
The clause complex and transitivity analysis is given in Figure 10-17.
To measure lexical density, simply divide the number of lexical items by the number of ranking clauses. This example has eleven lexical items (bridging, river, valleys, early, engineers, built, notable, masonry, viaducts, numerous, arches), and two clauses; hence lexical density [is] 5.5. Note that the grammatical structure both of the clause complex as a whole and of each constituent clause is rather simple.
Let us now reword this in a form more typical of the spoken language. If we retain the same lexical items, but reword in a more naturally spoken form, we might arrive at something like the following:
In the early days when engineers had to make a bridge across a valley and the valley had a river flowing through it, they often built viaducts, which were constructed of masonry and had numerous arches in them; and many of these viaducts became notable.
Here the structure of the clause complex is
1×b1 ^ 1×β+2 ^ 1aa ^ 1α =β1 ^ 1α=β+2 ^ +2
There are now six grammatically related clauses, rather than just two. The total number of lexical items has gone up to seventeen, mainly because there is some repetition; but since there are six ranking clauses, the lexical density is slightly under 3. In other words, the written version is more complex in terms of lexical density, while the spoken version is more complex in terms of grammatical intricacy. The lexical items in the written version thus have fewer clauses to accommodate them; but obviously they are still part of the overall grammatical structure – what typically happens is that they are incorporated into nominal groups.