{"id":22339240,"url":"https://github.com/dotnetthailand/thairomanizationsharp","last_synced_at":"2026-05-01T12:31:58.727Z","repository":{"id":46316189,"uuid":"401771635","full_name":"dotnetthailand/ThaiRomanizationSharp","owner":"dotnetthailand","description":"The .NET project contains several implementations of Romanization of Thai text.","archived":false,"fork":false,"pushed_at":"2021-11-11T18:14:53.000Z","size":9490,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-10-10T22:12:52.058Z","etag":null,"topics":["csharp","dotnet","hacktoberfest","ml"],"latest_commit_sha":null,"homepage":"https://www.dotnetthailand.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnetthailand.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}},"created_at":"2021-08-31T16:29:34.000Z","updated_at":"2022-06-07T03:55:38.000Z","dependencies_parsed_at":"2022-08-25T18:50:56.680Z","dependency_job_id":null,"html_url":"https://github.com/dotnetthailand/ThaiRomanizationSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dotnetthailand/ThaiRomanizationSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetthailand%2FThaiRomanizationSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetthailand%2FThaiRomanizationSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetthailand%2FThaiRomanizationSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetthailand%2FThaiRomanizationSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnetthailand","download_url":"https://codeload.github.com/dotnetthailand/ThaiRomanizationSharp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetthailand%2FThaiRomanizationSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csharp","dotnet","hacktoberfest","ml"],"created_at":"2024-12-04T07:07:40.183Z","updated_at":"2026-05-01T12:31:58.661Z","avatar_url":"https://github.com/dotnetthailand.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThaiRomanizationSharp\n\nThis .NET project contains several implementations of [Romanization](https://en.wikipedia.org/wiki/Romanization) of Thai text.\n\nFor example, `สวัสดี` is \"romanized\" to `sawatdi`.\n\nThere are currently two romanization algorithms:\n\n1. The **Thai Language Toolkit** (TLTK) algorithm [originally from here](https://github.com/attapol/tltk).\n    - This implementation invokes Python code, and requires python to be installed.\n1. The **Thai2Rom** algorithm [originally from here](https://github.com/PyThaiNLP/pythainlp).\n    - This implementation runs native code (using the Torch machine learning framework -- available for Mac OS / Windows / Linux). The native code for these 3 platforms is bundled in the project and no installation is required.\n    - Currently does not do word-separation; the romanized characters follow the same spacing as the input Thai text.\n\n# Usage\n\n```csharp\n\nusing ThaiRomanizationSharp.Tltk;\nIThaiRomanizationService romanizer = new ThaiRomanizationService();\nstring english = romanizer.Romanize(\"สวัสดี\"); \n\n// or\n\nusing ThaiRomanizationSharp.Thai2Rom;\nIThaiRomanizationService romanizer = new Thai2RomService();\nstring english = romanizer.Romanize(\"สวัสดี\"); \n```\n\n# Credits for Thai Language Toolkit\n\n- Credit to [Assoc.Prof. Wirote Aroonmanakun (Ph.D.)](http://pioneer.chula.ac.th/~awirote/)\n- Director of the Siridhorn Thai Language Institute, Chulalongkorn University\n- Original code is from https://github.com/attapol/tltk/blob/master/tltk/nlp.py.\n- Thai Romanization main project page http://pioneer.chula.ac.th/~awirote/resources/thai-romanization.html.\n\n# Credits for Thai2Rom project\n\nThe C# code of the Thai2Rom algorithm is based on the Python code from the PyThaiNLP project.\n\n- [Main PyThaiNLP repository](https://github.com/PyThaiNLP/pythainlp)\n   - [Specific \"thai2rom\" algorithm that was ported](https://github.com/PyThaiNLP/pythainlp/blob/a1028b5799fd8edd7dc8118e7457a12e60ffc467/pythainlp/transliterate/thai2rom.py)\n- [PyTorch Model (python pickle format)](https://raw.githubusercontent.com/artificiala/thai-romanization/master/notebook/thai2rom-pytorch-attn-v0.1.tar)\n- [Training jupyter notebook](https://github.com/artificiala/thai-romanization/blob/master/notebook/thai_romanize_pytorch_seq2seq_attention.ipynb)\n\n# How to run the project locally\n\n1. For running the ThaiRomanizationSharp.Thai2Rom library, either reference it from your project, or run the unit tests as normal via the `dotnet` command line, Visual Studio Code, or Visual Studio.\n  - See the README.md in the ThaiRomanizationSharp.Thai2Rom subdirectory for more information.\n1. For running the ThaiRomanizationSharp.Thai2Rom library Thai Language Toolkit Project, there are some setup steps you need to do first. The rest of the README is devoted to these steps.\n  - See the README.md in the ThaiRomanizationSharp.Tltk subdirectory for more information.\n\n## Run the project\n\n- In VS Code open integrated terminal by pressing **ctrl+`**.\n- The terminal should start from the root of the project.\n- Run the project with the following command:\n  ```sh\n  $ dotnet run\n  ```\n- Wait for a while and you should find an output message in the integrated terminal.\n\n# Reference \u0026 useful resources\n\n- https://github.com/PyThaiNLP/pythainlp/issues/11\n- https://github.com/comdevx/thai2karaoke\n- [Debugging with Code lens option](https://github.com/formulahendry/vscode-dotnet-test-explorer#debugging-alpha)\n- [Not launching debugger issue](https://github.com/formulahendry/vscode-dotnet-test-explorer/issues/247)\n- [XUnit.ITestOutputHelper.WriteLine not showing up issue](https://github.com/formulahendry/vscode-dotnet-test-explorer/issues/94)\n\n# Todo\n\n- [ ] More details what code changes in nlp.py\n- [ ] Convert project to a class library\n- [ ] Unit test with xUnit\n- [ ] GitHub Actions to run a unit test\n- [ ] GitHub Actions to deploy a library to Nuget and release page\n- [ ] Custom Docker image\n- [ ] Deploy example project to Azure App Service container\n\n# Removed function in nlp.py\n```\nread_thaidict\nreset_thaidict\ncheck_thaidict\nedits2\npos_tag\npos_tag_wordlist\npos_load\nchange_tag\nchunk\nner\nner_load\nwrd_len\ng2p_all\nsylparse_all\nth2ipa\nword_segmentX\nwordseg_w2v\nword_segment_nbest\nwordsegmm_bn\nchartparse_mm_bn\nword_segment_mm\nwordseg_mm\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetthailand%2Fthairomanizationsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnetthailand%2Fthairomanizationsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetthailand%2Fthairomanizationsharp/lists"}