n-gram repetition analysis