get

Function get 

Source
pub fn get<T: AsRef<str>>(input_language: T) -> &'static [&'static str]
Expand description

This function fetches stop words for a language using either a member of the LANGUAGE enum, or a two-character ISO language code as any type implementing std::convert::AsRef<str>. Please note that constructed languages use either a member of the LANGUAGE enum, or a three-character ISO language code as either a str or a String type.

let first_list = stop_words::get("ar");
let second_list = stop_words::get(stop_words::LANGUAGE::Arabic);
assert_eq!(first_list, second_list)

§Panics

Panics if the provided language code is not recognized.