TextGenerator getNextWord method and standard constructor
merging