{"id":13723292,"url":"https://github.com/sinaahmadi/KurdishLID","last_synced_at":"2025-05-07T16:32:43.730Z","repository":{"id":225960282,"uuid":"618879277","full_name":"sinaahmadi/KurdishLID","owner":"sinaahmadi","description":" Language identification of Kurdish and Zaza-Gorani languages (\u0026 variants) ","archived":false,"fork":false,"pushed_at":"2023-03-25T17:21:08.000Z","size":6504,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-14T12:51:13.736Z","etag":null,"topics":["arabic","feyli","gorani","hawrami","kurdish","kurdish-language-processing","kurdish-oss","kurmanji","language-identification","less-resource-languages","persian","sorani","southern-kurdish","turkish","zazaki"],"latest_commit_sha":null,"homepage":"https://aclanthology.org/2023.fieldmatters-1.7/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinaahmadi.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}},"created_at":"2023-03-25T16:06:47.000Z","updated_at":"2024-03-15T19:53:21.000Z","dependencies_parsed_at":"2024-03-05T07:59:28.973Z","dependency_job_id":null,"html_url":"https://github.com/sinaahmadi/KurdishLID","commit_stats":null,"previous_names":["sinaahmadi/kurdishlid"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2FKurdishLID","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2FKurdishLID/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2FKurdishLID/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2FKurdishLID/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinaahmadi","download_url":"https://codeload.github.com/sinaahmadi/KurdishLID/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252915511,"owners_count":21824582,"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":["arabic","feyli","gorani","hawrami","kurdish","kurdish-language-processing","kurdish-oss","kurmanji","language-identification","less-resource-languages","persian","sorani","southern-kurdish","turkish","zazaki"],"created_at":"2024-08-03T01:01:38.682Z","updated_at":"2025-05-07T16:32:38.715Z","avatar_url":"https://github.com/sinaahmadi.png","language":"Shell","funding_links":[],"categories":["Development"],"sub_categories":["Tools"],"readme":"# Language Identification of Kurdish \u0026 Zaza-Gorani Languages\n\n![Kurdish alphabets](Kurdish-alphabets.png)\n\nLanguage identification or detection is the task of detecting the language in which a sentence is written. This repository provides models for language identificaiton of Kurdish and Zaza-Gorani languages with their Kurdified Perso-Arabic and Latin scripts. Our models can predict the following languages and scripts:\n\n* Northern Kurdish / کورمانجی (Kurmanji, `kmr`) - both scripts with `kuarab` \u0026 `kulatn` labels\n* Central Kurdish / سۆرانی (Sorani, `ckb`) - both scripts with `ckbarab` \u0026 `ckblatn` labels\n* Southern Kurdish / کوردیی خوارین (`sdh`) \n* Gorani / گۆرانی (Hawrami, `hac`)\n* Zazaki / Zazakî / (`zza`) - both scripts with `zza` for Bedirxan and `zzawiki` for the script used on [Zazaki Wikipedia](https://diq.wikipedia.org)\n* Arabic / اَلْعَرَبِيَّةُ (`ar`)\n* Persian / فارسی (`fa`)\n* Turkish / Türkçe / (`tr`)\n\n## How to use?\n\nOur [models](models) are trained using `fastText`. You can run the models in Python or on command-line by installing the `fastText`library as described at [https://fasttext.cc/docs/en/support.html](https://fasttext.cc/docs/en/support.html).\n\nTwo models are provided:\n\n* [models/KLID_model.ftz](models/KLID_model.ftz): use this if you don't mind about detecting the script of the language. This predicts language codes only.\n* [models/KLID_model_scr.ftz](models/KLID_model_scr.ftz): use this if you want the script label in addition to the language code. This predicts language and script.\n\nHere is an example in Python:\n\n```python\n\u003e\u003e\u003e import fasttext\n\u003e\u003e\u003e model = fasttext.load_model(\"models/KLID_model.ftz\")\n\n# Central Kurdish\n\u003e\u003e\u003e model.predict(\"لەزۆربەی یارییەکان گوڵ تۆمار دەکات\") \n(('__label__ckb',), array([1.00002003]))\n\u003e\u003e\u003e model.predict(\"لەزۆربەی یارییەکان گوڵ تۆمار دەکات\", k=5)\n(('__label__ckb', '__label__ku'), array([1.00002003e+00, 1.00000989e-05]))\n\u003e\u003e\u003e model.predict(\"لەزۆربەی یارییەکان گوڵ تۆمار دەکات\")\n(('__label__ckb',), array([1.00002003]))\n\u003e\u003e\u003e model.predict(\"باڵیۆزی عێراق\")\n(('__label__ckb',), array([1.00001979]))\n\n# Southern Kurdish\n\u003e\u003e\u003e model.predict(\"چەس ئمڕوو چە قوومیاس؟!!\") \n(('__label__sdh',), array([1.00003743]))\n\n# Gorani\n\u003e\u003e\u003e model.predict(\"داستانێ فرەتەر و درێژتەرەنه و دەسی سەر پەی\") \n(('__label__hac',), array([0.99998134]))\n\n# Kurmanji\n\u003e\u003e\u003e model.predict(\"ئەگەر بێژم ئەز فەرهادم\") \n(('__label__ku',), array([0.93445575]))\n\n# Zazaki\n\u003e\u003e\u003e model.predict(\"Seba naye zî ganî ma rayîr û metodanê xo xurtêr bikerê.\") \n(('__label__zza',), array([1.00003004]))\n\n# Northern Kurdish\n\u003e\u003e\u003e model.predict(\"Amerîkayîyan di sala 2004 de zîndana Ebû Xerîb girtin.\") \n(('__label__ku',), array([0.99766862]))\n\n# Central Kurdish\n\u003e\u003e\u003e model.predict(\"Emin filsêkim le kitêban dest nekewtbû bełam\") \n(('__label__ckb',), array([1.00001991]))\n\n# Central Kurdish\n\u003e\u003e\u003e model.predict(\"گەرەکمە پێی بێژم نامگەرەکە\") \n(('__label__ku',), array([0.99485904])) \n\u003e\u003e\u003e model.predict(\"جا ئەتوو وەرە دەگەڵ وی ڕێک کەوە\")\n(('__label__sdh',), array([0.84034669])) \n\n# English\n\u003e\u003e\u003e model.predict(\"To be, or not to be\") \n(('__label__zza',), array([1.00003004]))\n```\n\nIf you would like to train your own models, you can use the datasets provided in the [datasets](datasets) folder. All the datasets are merged into [train](datasets/train.txt) and [train_scr](datasets/train.txt); these two files refer to the instances tagged without and with their scripts, respectively.\n\n## Cite this corpus\nIf you're using the models, please cite the project along with the following paper ([bib file](https://sinaahmadi.github.io/bibliography/ahmadi2023fieldmatters.bib) | [PDF](https://sinaahmadi.github.io/docs/articles/ahmadi2023fieldmatters.pdf)). \n\n```\n@inproceedings{ahmadi2023fieldmatters,\n  title = \"Approaches to Corpus Creation for Low-Resource Language Technology: the Case of {Southern Kurdish and Laki}\",\n  author = \"Ahmadi, Sina and Azin, Zahra and Belelli, Sara and Anastasopoulos, Antonios\",\n  booktitle = \"Proceedings of the second workshop on NLP applications to field linguistics\",\n  month = may,\n  year = \"2023\",\n  address = \"Dubrovnik, Croatia\",\n  publisher = \"The 17th Conference of the European Chapter of the Association for Computational Linguistics\"\n}\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinaahmadi%2FKurdishLID","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinaahmadi%2FKurdishLID","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinaahmadi%2FKurdishLID/lists"}