Interface RelevanceRanker
public interface RelevanceRanker
An interface to provide relevance ranking algorithm.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the relevance score between a set of terms and a document based on a corpus.doubleReturns the relevance score between a term and a document based on a corpus.
-
Method Details
-
rank
Returns the relevance score between a term and a document based on a corpus.- Parameters:
corpus- the corpus.doc- the document to rank.term- the searching term.tf- the term frequency in the document.n- the number of documents containing the given term in the corpus;- Returns:
- the relevance score.
-
rank
Returns the relevance score between a set of terms and a document based on a corpus.- Parameters:
corpus- the corpus.doc- the document to rank.terms- the searching terms.tf- the term frequencies in the document.n- the number of documents containing the given term in the corpus;- Returns:
- the relevance score.
-