https://github.com/minibikini/paasaa
🔤 Natural language detection for Elixir without AI
https://github.com/minibikini/paasaa
detect-language elixir language language-detection nlp
Last synced: 16 days ago
JSON representation
🔤 Natural language detection for Elixir without AI
- Host: GitHub
- URL: https://github.com/minibikini/paasaa
- Owner: minibikini
- License: mit
- Created: 2016-08-31T15:17:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T03:46:41.000Z (about 2 months ago)
- Last Synced: 2025-04-01T12:05:18.765Z (23 days ago)
- Topics: detect-language, elixir, language, language-detection, nlp
- Language: Elixir
- Homepage:
- Size: 937 KB
- Stars: 120
- Watchers: 3
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Natural language detection for Elixir. (Natural Language Processing (NLP))
- fucking-awesome-elixir - Paasaa - Natural language detection for Elixir. (Natural Language Processing (NLP))
- awesome-elixir - Paasaa - Natural language detection for Elixir. (Natural Language Processing (NLP))
README
# Paasaa
[](https://github.com/minibikini/paasaa/actions)
[](https://coveralls.io/github/minibikini/paasaa?branch=master)
[](https://hex.pm/packages/paasaa)
[](https://hex.pm/packages/paasaa)Natural language detection for Elixir
[API Documentation] | [Hex Package]
## Installation
Add `paasaa` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:paasaa, "~> 0.6.0"}]
end
```After you are done, run `mix deps.get` in your shell to fetch and compile **Paasaa**.
## Usage
Detect a language:
```elixir
iex> Paasaa.detect "Detect this!"
"eng"
```Detect language and return a scored list of languages:
```elixir
iex> Paasaa.all("Detect this!")
[
{"eng", 1.0},
{"sco", 0.8675529295913343},
{"nob", 0.6065977351058591},
{"swe", 0.5923190546528804},
...
]
```## Benchmark
```shell
mix bench
```## Update Language Data
```shell
mix run script/generate_language_data.exs
```## Derivation
**Paasaa** is a derivative work from [Franc][] (JavaScript, MIT) by [Titus Wormer].
## License
[MIT] © [Egor Kislitsyn]
[Api Documentation]: https://hexdocs.pm/paasaa/Paasaa.html
[Hex Package]: https://hex.pm/packages/paasaa
[Franc]: https://github.com/wooorm/franc/
[Titus Wormer]: http://wooorm.com/
[mit]: LICENSE
[Egor Kislitsyn]: https://github.com/minibikini