pub trait TFIDFEngine<N>{
// Required methods
fn idf_vec(corpus: &Corpus, token_dim_sample: &[String]) -> (Vec<N>, f64);
fn tf_vec(
freq: &TokenFrequency,
token_dim_sample: &[String],
) -> (ZeroSpVec<N>, f64);
fn tfidf_iter_calc(
tf: impl Iterator<Item = N>,
tf_denorm: f64,
idf: impl Iterator<Item = N>,
idf_denorm: f64,
) -> (impl Iterator<Item = N>, f64);
fn tfidf_iter_calc_sparse(
tf: impl Iterator<Item = (usize, N)>,
tf_denorm: f64,
idf: &Vec<N>,
idf_denorm: f64,
) -> (impl Iterator<Item = (usize, N)>, f64);
}Required Methods§
Sourcefn tfidf_iter_calc(
tf: impl Iterator<Item = N>,
tf_denorm: f64,
idf: impl Iterator<Item = N>,
idf_denorm: f64,
) -> (impl Iterator<Item = N>, f64)
fn tfidf_iter_calc( tf: impl Iterator<Item = N>, tf_denorm: f64, idf: impl Iterator<Item = N>, idf_denorm: f64, ) -> (impl Iterator<Item = N>, f64)
fn tfidf_iter_calc_sparse( tf: impl Iterator<Item = (usize, N)>, tf_denorm: f64, idf: &Vec<N>, idf_denorm: f64, ) -> (impl Iterator<Item = (usize, N)>, f64)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.