Trait tfidf::ProcessedDocument[][src]

pub trait ProcessedDocument: Document {
    fn term_frequency<K>(&self, term: K) -> usize
    where
        K: Borrow<Self::Term>
;
fn max(&self) -> Option<&Self::Term>; }
Expand description

A document where the frequencies of each term is already calculated.

Required methods

fn term_frequency<K>(&self, term: K) -> usize where
    K: Borrow<Self::Term>, 
[src]

Expand description

Returns the number of times a (non-normalized) term exists within the document.

fn max(&self) -> Option<&Self::Term>[src]

Expand description

Returns the term with the highest frequency, or tied for the highest frequency.

Implementations on Foreign Types

impl<T> ProcessedDocument for Vec<(T, usize)> where
    T: PartialEq
[src]

fn term_frequency<K>(&self, term: K) -> usize where
    K: Borrow<T>, 
[src]

fn max(&self) -> Option<&T>[src]

impl<T> ProcessedDocument for HashMap<T, usize> where
    T: Eq + Hash
[src]

fn term_frequency<K>(&self, term: K) -> usize where
    K: Borrow<Self::Term>, 
[src]

fn max(&self) -> Option<&Self::Term>[src]

impl<T> ProcessedDocument for BTreeMap<T, usize> where
    T: Ord
[src]

fn term_frequency<K>(&self, term: K) -> usize where
    K: Borrow<Self::Term>, 
[src]

fn max(&self) -> Option<&Self::Term>[src]

Implementors