{"id":20457863,"url":"https://github.com/pythainlp/lekcut","last_synced_at":"2025-04-13T05:28:24.335Z","repository":{"id":62220644,"uuid":"558819174","full_name":"PyThaiNLP/LEKCut","owner":"PyThaiNLP","description":"LEKCut (เล็ก คัด) is a Thai tokenization library that ports the deep learning model to the onnx model.","archived":false,"fork":false,"pushed_at":"2022-10-28T17:09:45.000Z","size":4785,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T15:24:02.591Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/PyThaiNLP.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":"2022-10-28T11:18:35.000Z","updated_at":"2022-11-27T07:13:23.000Z","dependencies_parsed_at":"2022-10-28T17:17:04.476Z","dependency_job_id":null,"html_url":"https://github.com/PyThaiNLP/LEKCut","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FLEKCut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FLEKCut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FLEKCut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyThaiNLP%2FLEKCut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyThaiNLP","download_url":"https://codeload.github.com/PyThaiNLP/LEKCut/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248668909,"owners_count":21142759,"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-11-15T12:09:31.711Z","updated_at":"2025-04-13T05:28:24.297Z","avatar_url":"https://github.com/PyThaiNLP.png","language":"Jupyter Notebook","readme":"# LEKCut\n\u003ca href=\"https://pypi.python.org/pypi/lekcut\"\u003e\u003cimg alt=\"pypi\" src=\"https://img.shields.io/pypi/v/lekcut.svg\"/\u003e\u003c/a\u003e\n\nLEKCut (เล็ก คัด) is a Thai tokenization library that ports the deep learning model to the onnx model.\n\n## Install\n\n\u003e pip install lekcut\n\n## How to use\n\n```python\nfrom lekcut import word_tokenize\nword_tokenize(\"ทดสอบการตัดคำ\")\n# output: ['ทดสอบ', 'การ', 'ตัด', 'คำ']\n```\n\n**API**\n\n```python\nword_tokenize(text: str, model: str=\"deepcut\", path: str=\"default\") -\u003e List[str]\n```\n\n## Model\n- ```deepcut``` - We ported deepcut model from tensorflow.keras to ONNX model. The model and code come from [Deepcut's Github](https://github.com/rkcosmos/deepcut). The model is [here](https://github.com/PyThaiNLP/LEKCut/blob/main/lekcut/model/deepcut.onnx).\n\n### Load custom model\n\nIf you have trained your custom model from deepcut or other that LEKCut support, You can load the custom model by ```path``` in ```word_tokenize``` after porting your model.\n\n- How to train custom model with your dataset by deepcut - [Notebook](https://github.com/rkcosmos/deepcut/blob/master/notebooks/training.ipynb) (Needs to update ```deepcut/train.py``` before train model)\n\n## How to porting model?\n\nSee ```notebooks/```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Flekcut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythainlp%2Flekcut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythainlp%2Flekcut/lists"}