A CLI for the Compact Language Detector
CLD3 is a statistical language identification library that is able to identify many languages with high accuracy.
script/bootstrap
Note: The script/cld-cli
command has to be run from this directory.
script/cld-cli --help
Usage: cld-cli cat <text> | cld-cli [global options]
Language identification CLI
Generates a language identifier for each line of the given text.
Options:
-V, --version output the version number
--no-proportion Remove proportion
--no-reliable Remove reliable
--no-probability Remove probability
-h, --help display help for command
❯ echo "je vourdrais du savon" | script/cld-cli
{"text": "je vourdrais du savon", "language": "fr", "reliable": true, "proportion": 1, "probability": 0.90}
> cat sentences.txt | script/cld-cli --no-proportion --no-reliable
{"text": "even moar bad franch", "language":"fr", "probability": 0.83}
...
Bug reports and pull requests are welcome on GitHub at https://github.com/willf/cld-cli