Solution of the third Statistical NLP assignment