Crate text_analysis

Source

Functionsยง

count_words
Takes &Vec and counts the quantity of each word. Returns Hashmap<String,u32>, with String being the word and u32 the quantity
get_index_max
Get maximum index and guarantee that index does not exceed total length of Vec
get_index_min
Get minimum index and guarantee that index is alway >=0
save_file
save file to path. Return result.
sort_map_to_vec
Sort words in HashMap<Word, Frequency> according to frequency into Vec<String, u32>.
trim_to_words
Splits String into single words as Vector. Splits String at whitespaces and removes chars like , or ?. Change the relevant line to remove or add chars from provided String.