added avg length calculation to the posteriorSentences.py script