pub fn get_stemmed_term_frequencies_from_word_vector_without_stop_words(
    word_tokens: Vec<&str>,
    stop_words: Vec<String>
) -> BTreeMap<String, f64>
Expand description

Gets a count of all stemmed words from a vector of word_tokens without stop words.

If a word cannot be stemmed, it will get a frequency of the original word.

Examples

use std::collections::BTreeMap;
use rnltk::token;
 
let arg = vec!["fear", "leads", "to", "anger", "anger", "leads", "to", "hatred", "hatred", "leads", "to", "conflict", "conflict", "leads", "to", "suffering"];
let word_counts = BTreeMap::from([("fear".to_string(), 1.), ("lead".to_string(), 4.), ("anger".to_string(), 2.), ("hatr".to_string(), 2.), ("conflict".to_string(), 2.), ("suffer".to_string(), 1.)]);
let stop_words = token::get_stop_words();
let term_frequencies = token::get_stemmed_term_frequencies_from_word_vector_without_stop_words(arg, stop_words);

assert_eq!(word_counts, term_frequencies);