{"id":16559372,"url":"https://github.com/melix/jlangdetect","last_synced_at":"2025-03-21T11:31:31.367Z","repository":{"id":13457602,"uuid":"16147242","full_name":"melix/jlangdetect","owner":"melix","description":"A language detection library for the JVM","archived":false,"fork":false,"pushed_at":"2023-08-21T09:39:08.000Z","size":1210,"stargazers_count":36,"open_issues_count":4,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-18T00:46:12.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/melix.png","metadata":{"files":{"readme":"README.adoc","changelog":"changelog/CHANGELOG.txt","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":"2014-01-22T17:56:15.000Z","updated_at":"2024-10-16T07:34:09.000Z","dependencies_parsed_at":"2024-10-28T10:21:13.963Z","dependency_job_id":null,"html_url":"https://github.com/melix/jlangdetect","commit_stats":{"total_commits":28,"total_committers":5,"mean_commits":5.6,"dds":0.2857142857142857,"last_synced_commit":"179fe8655cccee1586d128f98e7ef37bd69bb3c9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melix%2Fjlangdetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melix%2Fjlangdetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melix%2Fjlangdetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/melix%2Fjlangdetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/melix","download_url":"https://codeload.github.com/melix/jlangdetect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244790770,"owners_count":20510804,"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":[],"created_at":"2024-10-11T20:25:42.415Z","updated_at":"2025-03-21T11:31:30.821Z","avatar_url":"https://github.com/melix.png","language":"Java","funding_links":[],"categories":["人工智能"],"sub_categories":["自然语言处理"],"readme":"== JLangDetect\n\nimage:https://github.com/melix/jlangdetect/workflows/Main/badge.svg[\"Build Status\", link=\"https://github.com/melix/jlangdetect/actions?query=workflow%3AMain\"]\n\nWARNING: This library has been republished to Maven Central for convenience, but it not maintained. It is provided \"as is\".\n\nA language detection library for the JVM.\n\n== How to use it ?\n\nThe simplest way to use JLangDetect is to use the _UberLanguageDetector_ singleton, available in the _jlangdetect-extra_ module :\n\n[source]\n----\nimport  me.champeau.ld.UberLanguageDetector;\nUberLanguageDetector detector = UberLanguageDetector.getInstance();\n\n// ..\n\nString language = detector.detectLang(\"ceci est un petit texte en français\");\n\n----\n\n\nAlternatively, if you don’t need to detect russian, chinese, japanese or korean languages, you can use the _EuroparlDetector_ available in the _jlangdetect-europarl_ module. Note that you can still create your own language detector and register custom languages using the core module.\n\nKeep in mind that this package requires SLF4J to be referenced. \n\n== Maven integration\n\nJLangDetect is now available on Maven Central.\n\nThen use the following dependency :\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eme.champeau.jlangdetect\u003c/groupId\u003e\n  \u003cartifactId\u003ejlangdetect-extra\u003c/artifactId\u003e\n  \u003cversion\u003e0.6\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\nor with Gradle:\n\n[source,groovy]\n----\ndependencies {\n    implementation(\"me.champeau.jlangdetect:jlangdetect:0.6\")\n}\n----\n\n== Use from Groovy\n\nAs a last integration example, here is how to use it from Groovy, through a simple script :\n\n[source]\n----\n@Grab('me.champeau.jlangdetect:jlangdetect-extra:0.6')\nimport me.champeau.ld.UberLanguageDetector as ULD\n\nULD.instance.with {\n  assert detectLang('ceci est un petit texte en français') == 'fr'\n  assert detectLang('this is a text in english') == 'en'\n}\n\n----\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelix%2Fjlangdetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmelix%2Fjlangdetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmelix%2Fjlangdetect/lists"}