To improve my writing, I want to reduce the number of nominalizations (a.k.a. zombie nouns) that I use. For that purpose I would like to have all nominalizations automatically highlighted in the generated PDF.

Essentially I am trying to automatically have words highlighted in the same manner as in the Writer's Diet Test, which, given a sample text, highlights be-verbs (am, is, are, was, were, be, being, been), nominalizations, prepositions, adjectives and adverbs, and waste words (it, this, that, and there).

Nominalizations can be detected as words ending with the following suffixes: ion, ism, ty, ment, ness, ance or ence (although with some false positives, e.g., the word "city" would be detected as a nominalization, but this would be OK). So I think it should be possible to highlight nominalizations using regular expressions.

As a starting point, I used the accepted solution to the question Highlight every occurrence of a list of words?.

Specifically, I used the luahighlight.sty package and the lua module highlight.lua provided in the solution.

The following is a MWE that uses luahighlight.sty and highlight.lua to highlight be-verbs, prepositions, and waste words:




% highlight be-verbs

% highlight prepositions

% highlight waste words



The proliferation of nominalizations in a discursive formation may be an
indication of a tendency toward pomposity and abstraction.


It gives the following output:

Highlighted text

How can I now also highlight nominalizations? In the sample text the words proliferation, nominalizations, formation, indication, pomposity, and abstraction should be highlighted.

At the end the output should be highlighted like this:

Writer's Diet highlighting

(The above output is the result of running the sample text through the online Writer's Diet test).

1 Answer 1


Simple work for the listofitems package, if you are willing to place the regions as the argument of a macro.

The item list is parsed on two levels: first by word (i.e., space search), then by nominalization suffix. If a nominalization is found, then the list length for that 2nd-level search is 2, otherwise it is 1. Therefore, I search each word (1st level parsing) to see whether the list length of the 2nd level exceeds 1. If so, I put it out in a colorbox. Otherwise, I put it out in the raw.

While all nominalizations belong equally to the 2nd-level parsing, I think it would be pretty easy to differentiate between the different nominalizations, were that required.

  \setsepchar{ /ion||ism||ty||ment||ance||ence}%
    \ifnum\xcnt=1\relax\else\ \fi%
\nominalize{The proliferation of nominalizations in a discursive formation may be an
indication of a tendency toward pomposity and abstraction.}

enter image description here

  • Thanks! Although if someone could provide an answer that does not require passing the text as an argument to a macro, that would be even better.
    – davitenio
    Jun 5, 2017 at 12:58
  • @Quantumspaghettification I have moved those comments to the referenced question. I will delete them here. Feb 4, 2021 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .