Forked to add diversity reranking features.