Script calculate averages of words and sentences