Skip to content

Section 9 Modifiers vs. complements

Ruud de Jong edited this page Oct 24, 2018 · 1 revision

This page is based on a page of the wiki for the original SimpleNLG.

As shown in Table 1 on the Getting Started page, there are several different kinds of phrase in SimpleNLG: noun phrases (which are represented by the Java class NPPhraseSpec), clauses or full sentences (which are represented by SPhraseSpec), prepositional phrases (represented by the class PPPhraseSpec), adjective phrases and adverb phrases. Adjective phrases and adverb phrases can be generated using the SimpleNLG concepts of modifier (when they modify a specific word/phrase) and complement (when they should occur after the verb).

SimpleNLG in fact distinguishes between three types of modifiers: front modifiers (which go at the beginning of a phrase), pre-modifiers (which go immediately before the main noun or verb in a phrase), and post-modifiers (which go at the end of a phrase). You can directly specify where a modifier goes by using addFrontModifier(), addPremodifier(), or addPostmodifier(). If you use the more general addModifier(), then SimpleNLG will decide where to place your modifier.

Pre- and post-modifiers are allowed in all types of phrases. Front modifiers can only be specified for SPhraseSpec.