Module tfidf::idf[][src]

Expand description

Implementations of different weighting schemes for inverse document frequency (IDF). For more information about which ones are implemented, check the Wiki link in the crate description.

Structs

InverseFrequencyIdf

Inverse frequency weighting scheme for IDF. Computes log (N / nt) where N is the number of documents, and nt is the number of times a term appears in the corpus of documents.

InverseFrequencyMaxIdf

Inverse frequency weighting scheme for IDF. Compute log (1 + (max nt / nt)) where nt is the number of times a term appears in the corpus, and max nt returns the most number of times any term appears in the corpus.

InverseFrequencySmoothIdf

Inverse frequency weighting scheme for IDF. Computes log (1 + (N / nt)).

UnaryIdf

Unary weighting scheme for IDF. If the corpus contains a document with the term, returns 1, otherwise returns 0.

Traits

InverseFrequencySmoothedIdfStrategy

Inverse frequency weighting scheme for IDF with a smoothing factor. Used internally as a marker trait.