{"id":15520719,"url":"https://github.com/proycon/lingua-cli","last_synced_at":"2025-04-23T03:49:38.694Z","repository":{"id":66967662,"uuid":"482364760","full_name":"proycon/lingua-cli","owner":"proycon","description":"Very small simple command-line interface for language detection using lingua-rs","archived":false,"fork":false,"pushed_at":"2024-10-12T21:13:02.000Z","size":80,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T03:49:31.590Z","etag":null,"topics":["languagedetection","nlp"],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~proycon/lingua-cli","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proycon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-16T21:26:34.000Z","updated_at":"2025-03-05T09:39:40.000Z","dependencies_parsed_at":"2024-01-26T14:30:31.872Z","dependency_job_id":"d0b8d214-c48c-4170-8a47-851da53daa10","html_url":"https://github.com/proycon/lingua-cli","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Flingua-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Flingua-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Flingua-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Flingua-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proycon","download_url":"https://codeload.github.com/proycon/lingua-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"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":["languagedetection","nlp"],"created_at":"2024-10-02T10:29:02.509Z","updated_at":"2025-04-23T03:49:38.675Z","avatar_url":"https://github.com/proycon.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing"],"sub_categories":[],"readme":"[![Crate](https://img.shields.io/crates/v/lingua-cli.svg)](https://crates.io/crates/lingua-cli)\n[![GitHub release](https://img.shields.io/github/release/proycon/lingua-cli.svg)](https://github.com/proycon/lingua-cli/releases/)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n![Technology Readiness Level 7/9 - Release Candidate - Technology ready enough and in initial use by end-users in intended scholarly environments. Further validation in progress.](https://w3id.org/research-technology-readiness-levels/Level7ReleaseCandidate.svg)\n\n# Lingua-cli\n\nThis is a small command-line tool for language detection, it is a simple\nwrapper around the [lingua-rs](https://github.com/pemistahl/lingua-rs/) library\nfor Rust, read there for extensive documentation. A distinguishing feature is\nthat this library works better for short texts thanmany other libraries\n\n## Installation\n\nEnsure you have Rust's package manager `cargo`, then download, isntall and compile `lingua-cli` in one go as follows:\n\n``$ cargo install lingua-cli``\n\n## Usage\n\nPass text as parameter\n\n``$ lingua-cli bonjour à tous``\n\nPass text via standard input:\n\n``$ echo \"bonjour à tous\" | lingua-cli``\n\nConstrain the languages you want to detect using `-l` with iso-639-1 languages\ncodes. Constraining the list improves accuracy. Do `-L` to see a list of\nsupported languages.\n\n``$ echo \"bonjour à tous\" | lingua-cli -l \"fr,de,es,nl,en\"``\n\nTo classify input line-by-line, pass ``-n``.\n\n``$ echo -e \"bonjour à tous\\nhola a todos\\nhallo allemaal\" | lingua-cli -n -l \"fr,de,es,nl,en\"``\n\n```\nfr      0.9069164472389637      bonjour à tous\nes      0.918273871035807       hola a todos\nnl      0.988293648761749       hallo allemaal\n```\n\nOutput is TSV and consists of an iso-639-1 language code, confidence score, and in line-by-line mode, a copy of the line.\n\nYou can also classified mixed text using the ``--multi`` option. This will then output UTF-8 byte offsets:\n\n```\n$ lingua-cli --multi -l fr,de,en \u003c /tmp/test.txt\n0       23      fr      Parlez-vous français? \n23      73      de      Ich spreche ein bisschen spreche Französisch ja. \n73      110     en      A little bit is better than nothing.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproycon%2Flingua-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproycon%2Flingua-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproycon%2Flingua-cli/lists"}