Documentation of 'smile.nlp.relevance.RelevanceRanker' Java class
RelevanceRanker
smile.nlp.relevance

Interface RelevanceRanker

  • All Known Implementing Classes:
    BM25, TFIDF


    public interface RelevanceRanker
    An interface to provide relevance ranking algorithm.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      double rank(Corpus corpus, TextTerms doc, java.lang.String[] terms, int[] tf, int n)
      Returns a relevance score between a set of terms and a document based on a corpus.
      double rank(Corpus corpus, TextTerms doc, java.lang.String term, int tf, int n)
      Returns a relevance score between a term and a document based on a corpus.
    • Method Detail

      • rank

        double rank(Corpus corpus,
                    TextTerms doc,
                    java.lang.String term,
                    int tf,
                    int n)
        Returns a 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;
      • rank

        double rank(Corpus corpus,
                    TextTerms doc,
                    java.lang.String[] terms,
                    int[] tf,
                    int n)
        Returns a 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;

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.