I think its based on sentance structure and word association. So it can identify nouns etc and what adjectives can desribe those nouns. It can then build sentances based on the subject matter that sort of make sense