Lingua (lingua v0.1.0)

Lingua wraps Peter M. Stahl's linuga-rs language detection library.

Link to this section Summary

Functions

Detect the language of the given input text. By default, all supported languages will be considered and the minimum relative distance is 0.0.

Link to this section Functions

Link to this function

detect(text, options \\ [])

Detect the language of the given input text. By default, all supported languages will be considered and the minimum relative distance is 0.0.

Example

iex> Lingua.detect("this is definitely English")
{:ok, :english}

iex> Lingua.detec("וזה בעברית")
{:ok, :hebrew}