added new way of extracting sentences from a given corpus