{"id":19872463,"url":"https://github.com/fendouai/chinese-text-classification","last_synced_at":"2025-10-17T11:56:39.373Z","repository":{"id":100486574,"uuid":"110062251","full_name":"fendouai/Chinese-Text-Classification","owner":"fendouai","description":"Chinese-Text-Classification，Tensorflow CNN（卷积神经网络）实现的中文文本分类。QQ群：522785813，微信群二维码：http://www.tensorflownews.com/","archived":false,"fork":false,"pushed_at":"2017-11-10T04:41:24.000Z","size":5959,"stargazers_count":292,"open_issues_count":6,"forks_count":88,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-10T01:09:54.969Z","etag":null,"topics":["chinese","cnn","cnn-text-classification","jieba","tensorflow","text-classification"],"latest_commit_sha":null,"homepage":"http://www.tensorflownews.com/","language":"Python","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/fendouai.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}},"created_at":"2017-11-09T03:23:46.000Z","updated_at":"2025-03-23T02:01:53.000Z","dependencies_parsed_at":"2023-05-15T05:30:45.824Z","dependency_job_id":null,"html_url":"https://github.com/fendouai/Chinese-Text-Classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fendouai/Chinese-Text-Classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fendouai%2FChinese-Text-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fendouai%2FChinese-Text-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fendouai%2FChinese-Text-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fendouai%2FChinese-Text-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fendouai","download_url":"https://codeload.github.com/fendouai/Chinese-Text-Classification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fendouai%2FChinese-Text-Classification/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260253258,"owners_count":22981437,"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":["chinese","cnn","cnn-text-classification","jieba","tensorflow","text-classification"],"created_at":"2024-11-12T16:15:41.553Z","updated_at":"2025-10-17T11:56:34.335Z","avatar_url":"https://github.com/fendouai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 用卷积神经网络基于 Tensorflow 实现的中文文本分类\n这个项目是基于以下项目改写：\n **[cnn-text-classification-tf](https://github.com/dennybritz/cnn-text-classification-tf)**\n \n [关于 Chinese-Text-Classification 的问题欢迎来这里提问](http://tensorflow123.com/forum.php?mod=viewthread\u0026tid=3)\n\n主要的改动：\n* 兼容 tensorflow 1.2 以上\n* 增加了中文数据集\n* 增加了中文处理流程\n\n## 特性：\n* 兼容最新 TensorFlow\n* 中文数据集\n* 基于 jieba 的中文处理工具\n* 模型训练，模型保存，模型评估的完整实现\n\n## 训练结果\n\n![](training.png)\n![](training2.png)\n\n\n## 模型评估\n![](eval.png)\n\n以下为原项目的 README\n\n**[This code belongs to the \"Implementing a CNN for Text Classification in Tensorflow\" blog post.](http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/)**\n\nIt is slightly simplified implementation of Kim's [Convolutional Neural Networks for Sentence Classification](http://arxiv.org/abs/1408.5882) paper in Tensorflow.\n\n## Requirements\n\n- Python 3\n- Tensorflow \u003e 1.2\n- Numpy\n\n## Training\n\nPrint parameters:\n\n```bash\n./train.py --help\n```\n\n```\noptional arguments:\n  -h, --help            show this help message and exit\n  --embedding_dim EMBEDDING_DIM\n                        Dimensionality of character embedding (default: 128)\n  --filter_sizes FILTER_SIZES\n                        Comma-separated filter sizes (default: '3,4,5')\n  --num_filters NUM_FILTERS\n                        Number of filters per filter size (default: 128)\n  --l2_reg_lambda L2_REG_LAMBDA\n                        L2 regularizaion lambda (default: 0.0)\n  --dropout_keep_prob DROPOUT_KEEP_PROB\n                        Dropout keep probability (default: 0.5)\n  --batch_size BATCH_SIZE\n                        Batch Size (default: 64)\n  --num_epochs NUM_EPOCHS\n                        Number of training epochs (default: 100)\n  --evaluate_every EVALUATE_EVERY\n                        Evaluate model on dev set after this many steps\n                        (default: 100)\n  --checkpoint_every CHECKPOINT_EVERY\n                        Save model after this many steps (default: 100)\n  --allow_soft_placement ALLOW_SOFT_PLACEMENT\n                        Allow device soft device placement\n  --noallow_soft_placement\n  --log_device_placement LOG_DEVICE_PLACEMENT\n                        Log placement of ops on devices\n  --nolog_device_placement\n\n```\n\nTrain:\n\n```bash\n./train.py\n```\n\n## Evaluating\n\n```bash\n./eval.py --eval_train --checkpoint_dir=\"./runs/1459637919/checkpoints/\"\n```\n\nReplace the checkpoint dir with the output from the training. To use your own data, change the `eval.py` script to load your data.\n\n\n## References\n\n- [Convolutional Neural Networks for Sentence Classification](http://arxiv.org/abs/1408.5882)\n- [A Sensitivity Analysis of (and Practitioners' Guide to) Convolutional Neural Networks for Sentence Classification](http://arxiv.org/abs/1510.03820)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffendouai%2Fchinese-text-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffendouai%2Fchinese-text-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffendouai%2Fchinese-text-classification/lists"}