The Franc Natural Language Detection library as a binary file
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
.travis.yml
CHANGELOG.md
LICENSE.txt
README.md
package-lock.json
package.json

README.md

Build Status

Franc as Binary

The Franc Natural Language Detection library inside a single executable with no dependencies.

Getting Started

Download the pre-built binary for your Operating System from the Release page.

franc-bin [options] <string>

where <string> is the text to recognize

Options:

  • -h, --help output usage information
  • -v, --version output Franc version number
  • -m, --min-length <number> minimum length to accept
  • -w, --whitelist <string> allow specific languages
  • -b, --blacklist <string> disallow specific languages
  • -a, --all display all guesses with probability score

Usage examples

output language

$ franc "Alle menslike wesens word vry"
# afr

output language from stdin (expects utf8)

$ echo "এটি একটি ভাষা একক IBM স্ক্রিপ্ট" | franc
# ben

blacklist certain languages

$ franc --blacklist por,glg "O Brasil caiu 26 posições"
# src

Supported languages

Support 186 languages. See Franc supported languages for more info.

Franc can support more than 380 languages, but I this package stops at 186

Compile from source

Requirements:

  • NodeJS (8.0 or newer)
  • NPM

Yes, it is a Javascript project, but thanks to PKG, by Zeit can be packed into a real executable.

Generate the binaries

Download all the dependencies

# pull the dependencies
npm install

Now generate the binaries for MacOS, Windows and Linux in the ./dist folder

# Build the executables
npm run production

Contribution

Contributions are welcomed, just make a pull request.

License

This project is licensed under the MIT license, see LICENSE.txt.