{"id":17483411,"url":"https://github.com/g-corp/efranc","last_synced_at":"2025-04-22T14:25:38.380Z","repository":{"id":57493723,"uuid":"92992056","full_name":"G-Corp/efranc","owner":"G-Corp","description":"Detect the language of text","archived":false,"fork":false,"pushed_at":"2017-07-29T17:41:17.000Z","size":1192,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-19T00:16:33.044Z","etag":null,"topics":["elixir","erlang","language","ngrams"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/G-Corp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-31T21:55:51.000Z","updated_at":"2024-06-05T08:20:45.000Z","dependencies_parsed_at":"2022-08-30T04:01:16.337Z","dependency_job_id":null,"html_url":"https://github.com/G-Corp/efranc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Corp%2Fefranc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Corp%2Fefranc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Corp%2Fefranc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/G-Corp%2Fefranc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/G-Corp","download_url":"https://codeload.github.com/G-Corp/efranc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250257304,"owners_count":21400695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","erlang","language","ngrams"],"created_at":"2024-10-19T00:04:52.714Z","updated_at":"2025-04-22T14:25:38.359Z","avatar_url":"https://github.com/G-Corp.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# efranc : Detect the language of text. #\n\nCopyright (c) 2017 G-Corp\n\n__Version:__ 0.0.1\n\n__Authors:__ Gregoire Lejeune ([`gregoire.lejeune@gmail.com`](mailto:gregoire.lejeune@gmail.com)).\n\n[![Build Status](https://travis-ci.org/G-Corp/efranc.svg?branch=master)](https://travis-ci.org/G-Corp/efranc)\n\n\n### API ###\n\n\n#### DATA TYPES ####\n\n`options() = #{whitelist =\u003e whitelist(), blacklist =\u003e blacklist(), min_length =\u003e integer()}`\n\n`whitelist() = [code()]`\n\n`blacklist() = [code()]`\n\n`code() = string()`\n\n`iso6393() = #{code =\u003e string(), part_2b =\u003e string(), part_2t =\u003e string(), part_1 =\u003e string(), scope =\u003e individual | macrolanguage | special, type =\u003e ancient | constructed | extinct | historical | living | special, ref =\u003e string(), comment =\u003e string()}`\n\n\n#### EXPORTS ####\n\n__`efranc:detect(Text, Options) -\u003e Lang`__\n\nTypes:\n\n__`Text = string()`\u003cbr /\u003e`Options = options()`\u003cbr /\u003e`Lang = code() | iso6393()`__\n\n`detect/2` return the detected language for the `Text` or `undefined`.\n\n__`efranc:detect(Text) -\u003e Lang`__\n\nEquivalent to `efranc:detect(Text, #{})`\n\n__`efranc:detect_all(Text, Options) -\u003e [{Lang, Weight}]`__\n\nTypes:\n\n__`Text = string()`\u003cbr /\u003e`Options = options()`\u003cbr /\u003e`Lang = code() | iso6393()`\u003cbr /\u003e`Weight = float()`__\n\n`detect_all/2` return the list of possible detected language for the `Text` or `undefined`.\n\n__`efranc:detect_all(Text) -\u003e [{Lang, Weight}]`__\n\nEquivalent to `efranc:detect_all(Text, #{})`\n\n\n### Command line tool ###\n\nBuild:\n\n```\n\nmake script\n\n```\n\nUse :\n\n```\n\n./_build/escriptize/bin/efranc -h\nUsage: efranc [-w \u003cwhitelist\u003e] [-b \u003cblacklist\u003e] [-m \u003cmin_size\u003e] [-h]\n\n  -w, --whitelist  Whitelist\n  -b, --blacklist  Blacklist\n  -m, --min_size   Minimum size\n  -h, --help       Display this help\n\n```\n\nExample :\n\n```\n\n./_build/escriptize/bin/efranc \"Bonjour tout le monde, ceci est un example d'utilisation d'efranc en ligne de commande ! Enjoy ;)\"\nfra | Bonjour tout le monde, ceci est un example d'utilisation d'efranc en ligne de...\n\n```\n\n\n### Derivation ###\n\neFranc is a port to Elang of [franc](https://github.com/wooorm/franc).\n\n\n### Licence ###\n\nefranc is available for use under the following license, commonly known as the 3-clause (or \"modified\") BSD license:\n\nCopyright (c) 2017 G-Corp\u003cbr /\u003e\nCopyright (c) 2014 Titus Wormer \u0026lt;tituswormer@gmail.com\u0026gt;\u003cbr /\u003e\nCopyright (c) 2008 Kent S Johnson\u003cbr /\u003e\nCopyright (c) 2006 Jacob R Rideout \u0026lt;kde@jacobrideout.net\u0026gt;\u003cbr /\u003e\nCopyright (c) 2004 Maciej Ceglowski\u003cbr /\u003e\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n* The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.\n\n\n\nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n## Modules ##\n\n\n\u003ctable width=\"100%\" border=\"0\" summary=\"list of modules\"\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"https://github.com/G-Corp/efranc/blob/master/doc/efranc.md\" class=\"module\"\u003eefranc\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\u003ca href=\"https://github.com/G-Corp/efranc/blob/master/doc/efranc_lang.md\" class=\"module\"\u003eefranc_lang\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-corp%2Fefranc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-corp%2Fefranc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-corp%2Fefranc/lists"}