Trait tfidf::Tf[][src]

pub trait Tf<T> where
    T: NaiveDocument
{ fn tf<K>(term: K, doc: &T) -> f64
    where
        K: Borrow<T::Term>
; }
Expand description

A strategy to calculate a weighted or unweighted term frequency (tf) score of a term from a document.

Required methods

fn tf<K>(term: K, doc: &T) -> f64 where
    K: Borrow<T::Term>, 
[src]

Expand description

Returns the weighted or unweighted term frequency (tf) for a single term within a document.

Implementors

impl<T> Tf<T> for BinaryTf where
    T: NaiveDocument
[src]

fn tf<K>(term: K, doc: &T) -> f64 where
    K: Borrow<T::Term>, 
[src]

impl<T> Tf<T> for LogNormalizationTf where
    T: ProcessedDocument
[src]

fn tf<K>(term: K, doc: &T) -> f64 where
    K: Borrow<T::Term>, 
[src]

impl<T> Tf<T> for RawFrequencyTf where
    T: ProcessedDocument
[src]

fn tf<K>(term: K, doc: &T) -> f64 where
    K: Borrow<T::Term>, 
[src]

impl<T, S> Tf<T> for S where
    S: DoubleKNormalizationTf,
    T: ProcessedDocument
[src]

fn tf<K>(term: K, doc: &T) -> f64 where
    K: Borrow<T::Term>, 
[src]