Adding intelligence to language generator