Skip to content

Section 12 Different ways of specifying a phrase

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.

We have now covered a bunch of the basic functionality of SimpleNLG. One thing that this tutorial has outlined is the fact that there are numerous ways of specifying a phrase.

In order to make this a bit more explicit, the table below shows some of the ways we can create the sentence ‘Mary chases the monkey’. You can define all the components of the phrase when you create an instance of it (as in example #1). Or you can create the instance first and then add the components one at a time (as in example #2). Alternatively, the components of a sentence can themselves be phrases (as in example #3). Or you can have a combination of all these various syntaxes (as in examples 4-5).

Note: Currently .setDeterminer("the") is set as deprecated! Use .setSpecifier("the") instead.