transformer_rankers.negative_samplers.negative_sampling

Classes

BM25NegativeSamplerPyserini(candidates, …)

Sample candidates from a list of candidates using BM25.

RandomNegativeSampler(candidates, …[, seed])

Randomly sample candidates from a list of candidates.

SentenceBERTNegativeSampler(candidates, …)

Sample candidates from a list of candidates using dense embeddings from sentenceBERT.