DocumentElement sentence = nlgFactory // create a sentence DocumentElement from SPhraseSpec
.createSentence(johnGoToThePark);
// below creates a sentence DocumentElement by concatenating strings
StringElement hePlayed = new StringElement("he played");
StringElement there = new StringElement("there");
WordElement football = new WordElement("football");
DocumentElement sentence2 = nlgFactory.createSentence();
sentence2.addComponent(hePlayed);
sentence2.addComponent(football);