Whatlangex (whatlangex v0.3.0)
NIF bindings for Whatlang, a natural language detection library written in Rust.
Summary
Functions
Get the full language English name from language code.
Get the full language native name from language code.
Detect the language of the given sentence.
Functions
Get the full language English name from language code.
Examples
iex> code_to_eng_name("fra")
"French"
iex> code_to_eng_name("abc")
nil
Get the full language native name from language code.
Examples
iex> code_to_name("fra")
"Français"
iex> code_to_name("abc")
nil
@spec detect(String.t()) :: Whatlangex.Detection.t() | nil
Detect the language of the given sentence.
Examples
iex> detect("This is a cool sentence.")
%Whatlangex.Detection{lang: "eng", script: "Latin", confidence: 0.47970281937238757}
iex> detect("")
nil