Grammar and composition: generating sentence and paragraph