{"id":30126409,"url":"https://github.com/markivory2973/tg-spam","last_synced_at":"2026-06-22T02:32:26.404Z","repository":{"id":308307416,"uuid":"1032338397","full_name":"MarkIvory2973/tg-spam","owner":"MarkIvory2973","description":"Chinese Telegram spam messages classifier in PyTorch.","archived":false,"fork":false,"pushed_at":"2025-08-07T04:38:47.000Z","size":540,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-18T08:12:42.876Z","etag":null,"topics":["lstm","python","pytorch","spam","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarkIvory2973.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,"zenodo":null}},"created_at":"2025-08-05T06:57:28.000Z","updated_at":"2025-08-07T04:38:51.000Z","dependencies_parsed_at":"2025-08-05T09:35:56.717Z","dependency_job_id":null,"html_url":"https://github.com/MarkIvory2973/tg-spam","commit_stats":null,"previous_names":["markivory2973/tg-spam"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MarkIvory2973/tg-spam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkIvory2973%2Ftg-spam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkIvory2973%2Ftg-spam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkIvory2973%2Ftg-spam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkIvory2973%2Ftg-spam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarkIvory2973","download_url":"https://codeload.github.com/MarkIvory2973/tg-spam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarkIvory2973%2Ftg-spam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34632569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":["lstm","python","pytorch","spam","telegram"],"created_at":"2025-08-10T16:48:27.475Z","updated_at":"2026-06-22T02:32:26.382Z","avatar_url":"https://github.com/MarkIvory2973.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TG Spam\n\nChinese Telegram spam messages classifier in PyTorch.\n\n## Installation\n\nCreate an environment (Python **3.13**):\n\n```bash\nconda create -n tg-spam python=3.13\n```\n\nInstall dependencies:\n\n- For CPU:\n\n  ```bash\n  pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu\n  ```\n\n- For NVIDIA GPU:\n\n  ```bash\n  pip install torch torchvision --index-url https://download.pytorch.org/whl/cuxxx\n  ```\n\n```bash\npip install click matplotlib\n```\n\nClone this repository:\n\n```bash\ngit clone https://github.com/MarkIvory2973/tg-spam.git\n```\n\n## Usage\n\n```bash\ncd tg-spam\npython src/cli.py train --batch-size 32 --learning-rate 0.001 --gamma 0.9 --epochs 25\npython src/cli.py result\npython src/cli.py prompt --epoch 5 --input \"缺几个敢拼的兄弟😊，跟我干通宵，下个月路虎开回家，说到做到，看煮也\"\npython src/cli.py prompt --epoch 5 --input \"网络是个神奇的地方hy2套cdn都出来了\"\n```\n\n## Parameters\n\nTrain mode:\n\n|Parameter|Required|Default|Description|\n|:-|:-:|:-|:-|\n|--root|-|./data/|Folder contains datasets and checkpoints|\n|--batch-size|-|32|Batch size of dataset|\n|--learning-rate|-|0.001|Learning rate of Adam|\n|--gamma|-|0.9|Gamma of ExponentialLR|\n|--epochs|-|25|Total epochs of training|\n\nResult mode:\n\n|Parameter|Required|Default|Description|\n|:-|:-:|:-|:-|\n|--root|-|./data/|Folder contains datasets and checkpoints|\n\nPrompt mode:\n\n|Parameter|Required|Default|Description|\n|:-|:-:|:-|:-|\n|--root|-|./data/|Folder contains datasets and checkpoints|\n|--epoch|-|5|Epoch of model to use|\n|--input|✓|-|Text to be classified|\n\n## Result\n\n||Accuracy (%)|\n|:-:|-:|\n|Eval|91.22%|\n\n## References\n\n[1] [Long Short-term Memory RNN](https://arxiv.org/abs/2105.06756)\n\n[2] [reatiny/chinese-spam-10000](https://huggingface.co/datasets/reatiny/chinese-spam-10000)\n\n[3] [paulkm/chinese_conversation_and_spam](https://huggingface.co/datasets/paulkm/chinese_conversation_and_spam)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkivory2973%2Ftg-spam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkivory2973%2Ftg-spam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkivory2973%2Ftg-spam/lists"}