Implement document frequency