{"id":13722992,"url":"https://github.com/sinaahmadi/wergor","last_synced_at":"2025-05-07T16:31:36.308Z","repository":{"id":87863917,"uuid":"99863744","full_name":"sinaahmadi/wergor","owner":"sinaahmadi","description":"Rule-based Kurdish Transliterator","archived":false,"fork":false,"pushed_at":"2024-05-03T10:42:14.000Z","size":264,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-14T12:50:44.270Z","etag":null,"topics":["kurdish","kurdish-language-processing","transliteration","wergor-corpus","wergor-transliterator"],"latest_commit_sha":null,"homepage":null,"language":"Python","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,"publiccode":null,"codemeta":null}},"created_at":"2017-08-10T00:24:14.000Z","updated_at":"2024-05-03T10:42:18.000Z","dependencies_parsed_at":"2024-11-14T12:44:24.253Z","dependency_job_id":null,"html_url":"https://github.com/sinaahmadi/wergor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2Fwergor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2Fwergor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2Fwergor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaahmadi%2Fwergor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinaahmadi","download_url":"https://codeload.github.com/sinaahmadi/wergor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252915351,"owners_count":21824547,"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":["kurdish","kurdish-language-processing","transliteration","wergor-corpus","wergor-transliterator"],"created_at":"2024-08-03T01:01:35.277Z","updated_at":"2025-05-07T16:31:35.013Z","avatar_url":"https://github.com/sinaahmadi.png","language":"Python","funding_links":[],"categories":["Development"],"sub_categories":["Tools"],"readme":"# Wergor transliterator\n## Transliteration system for Kurdish\n\n##### ⭐ **Since 2020, this project is now part of the Kurdish Language Processing Toolkit (KLPT): [https://github.com/sinaahmadi/klpt].**\n\n[Wergor](https://github.com/sinaahmadi/wergor) is a transliteration system for Sorani Kurdish Latin-based and Arabic-based orthographies. In this first version, we have used a rule-based method. It is the result of a research project published in the ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP) and can be downloaded here: [https://dl.acm.org/citation.cfm?id=3278623](https://dl.acm.org/citation.cfm?id=3278623)\n\n### Usage\nThe script can be used in command-line or directly by importing the `Wergor class` in your codes.\n\n#### Command-line usage\n\n~~~\npython Wergor.py -\u003cmode\u003e \u003cinput file\u003e.txt\n~~~\nCurrently `-arabic2latin` and `-latin2arabic` are the only defined modes. The input file should be in `.txt` format. By running the script, the output file is automatically created in the same directory with \"_transliterated\" added to the name of the input file.\n\n#### Importing *Wergor* class in the *Wergor* module\n\n \n~~~python\nimport Wergor\n# Arabic to Latin transliteration\nwergor_transliterator = Wergor.Wergor(\"-arabic2latin\")\nprint wergor_transliterator._transliterate(u\"هەڵاوێر\")\n\n# Latin to Arabic transliteration\nwergor_transliterator = Wergor.Wergor(\"-latin2arabic\")\nprint wergor_transliterator._transliterate(u\"birayetî\")\n\n# Syllable detection based on the defined patterns (not complete)\nwergor_transliterator = Wergor.Wergor(\"-latin2arabic\")\nprint wergor_transliterator._syllable_detector(u\"henase\")\n~~~\n\nThis script yields the folowing outputs: \n\n~~~\nheławêr\nبرایەتی\n[('CV', 'CV', 'CV'), ('CV', 'CVC', 'V'), ('CVC', 'V', 'CV'), ('CVC', 'VC', 'V')]\n~~~\n\nPresently the Wergor transliterator only supports UTF-8 encoding. If not interested in getting red lines in your console make sure to encode your strings in UTF-8 or simply add `u` to the beginning of your strings (i.e., `word1 = u\"جوان\"`). \n\nFor each orthography, two text files are provided in the *examples* folder that you can test. Note that `_syllable_detector()` which suggests the possible syllable structures in a given word is not an option for the command-line usage. \n\n### Wergor corpus\n\nIf you are interested in the task of transliteration or you are going to study the existing challenges in the Sorani Kurdish text processing more in depth, Wergor corpus can help you. Wergor corpus includes 20k manually transliterated Sorani Kurdish words in the Arabic-based and the Latin-based orthographies. \n\nIf you're using a character-level model, you may use `transliteration_data_set.pickle` in the `dataset` folder. This file contains the preprocessed tokens in the corpus. By unpickling this file, you have a list of tuples containing a token with its transliteration. Our tokenization is based on the space delimiter.\n\n\n### Requirements\n  * KurdITGroup keyboard ([Download](https://www.kurditgroup.org/downloads)).\n  * Python 2.7\n\n\n### Reference\nIf you're using Wergor transliterator in your researches, please don't forget to cite the following paper. \n\n~~~\n@article{ahmadi2019rule,\n  title={A Rule-Based Kurdish Text Transliteration System},\n  author={Ahmadi, Sina},\n  journal={ACM Transactions on Asian and Low-Resource Language Information Processing (TALLIP)},\n  volume={18},\n  number={2},\n  pages={18},\n  year={2019},\n  publisher={ACM}\n}\n~~~\n\nThis helps us to also find your work easily.\n\n### License\n\nMIT License\n\nCopyright (c) 2017 Sina Ahmadi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n### Contact\n\nIf you have any questions, suggestions or bug reports, you can contact me at sina.ahmadi at etu.parisdescartes.fr.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinaahmadi%2Fwergor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinaahmadi%2Fwergor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinaahmadi%2Fwergor/lists"}