https://github.com/avvertix/franc-bin
The Franc Natural Language Detection library as a binary file
https://github.com/avvertix/franc-bin
Last synced: 6 months ago
JSON representation
The Franc Natural Language Detection library as a binary file
- Host: GitHub
- URL: https://github.com/avvertix/franc-bin
- Owner: avvertix
- License: mit
- Created: 2017-11-07T20:25:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-06T15:42:57.000Z (over 1 year ago)
- Last Synced: 2025-04-06T16:35:18.624Z (over 1 year ago)
- Homepage:
- Size: 258 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://github.com/avvertix/franc-bin/actions/workflows/ci.yml)
# Franc as Binary
The [Franc](https://github.com/wooorm/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](https://github.com/avvertix/franc-bin/releases/latest).
```bash
franc-bin [options]
```
where `` is the text to recognize
Options:
- `-h`, `--help` output usage information
- `-v`, `--version` output Franc-Cli version number
- `-m`, `--min-length ` minimum length to accept
- `-o`, `--only ` allow specific languages
- `-i`, `--ignore ` disallow specific languages
- `-a`, `--all` display all guesses with probability score
**Usage examples**
output language
```bash
$ franc "Alle menslike wesens word vry"
# afr
```
output language from stdin (expects utf8)
```bash
$ echo "এটি একটি ভাষা একক IBM স্ক্রিপ্ট" | franc
# ben
```
ignore certain languages
```bash
$ franc --ignore por,glg "O Brasil caiu 26 posições"
# src
```
## Supported languages
Support 187 languages. See [Franc supported languages for more info](https://github.com/wooorm/franc/tree/franc@4.1.0/packages/franc#support).
> Franc can support more than 380 languages, but this packaged version stops at 187
## Compile from source
**Requirements:**
- NodeJS (16.0 or newer)
- NPM
> Yes, it is a Javascript project, but thanks to [PKG, by Vercel](https://github.com/vercel/pkg) can be packed into a real executable.
**Generate the binaries**
Download all the dependencies
```bash
# pull the dependencies
npm ci
```
Now generate the binaries for MacOS, Windows and Linux in the `./dist` folder
```bash
# Build the executables
npm run production
```
## Contribution
Contributions are welcomed, just make a pull request.
## License
This project is licensed under the [`MIT` license](./LICENSE.txt).