{"id":13628050,"url":"https://github.com/wut0n9/cnn_chinese_text_classification","last_synced_at":"2025-04-17T00:33:12.034Z","repository":{"id":95113180,"uuid":"104768358","full_name":"wut0n9/cnn_chinese_text_classification","owner":"wut0n9","description":"运用cnn + highway network网络结构中文文本分类","archived":false,"fork":false,"pushed_at":"2017-09-25T15:44:24.000Z","size":2169,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-08T18:46:09.451Z","etag":null,"topics":["chinese-characters","chinese-nlp","cnn","cnn-text-classification","deep-learning","highway-network","mxnet"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wut0n9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-25T15:31:28.000Z","updated_at":"2024-02-29T04:50:07.000Z","dependencies_parsed_at":"2023-05-26T18:15:29.597Z","dependency_job_id":null,"html_url":"https://github.com/wut0n9/cnn_chinese_text_classification","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/wut0n9%2Fcnn_chinese_text_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wut0n9%2Fcnn_chinese_text_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wut0n9%2Fcnn_chinese_text_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wut0n9%2Fcnn_chinese_text_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wut0n9","download_url":"https://codeload.github.com/wut0n9/cnn_chinese_text_classification/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249293168,"owners_count":21245690,"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-characters","chinese-nlp","cnn","cnn-text-classification","deep-learning","highway-network","mxnet"],"created_at":"2024-08-01T22:00:43.784Z","updated_at":"2025-04-17T00:33:11.368Z","avatar_url":"https://github.com/wut0n9.png","language":"Python","funding_links":[],"categories":["\u003ca name=\"NLP\"\u003e\u003c/a\u003e3. NLP"],"sub_categories":["2.14 Misc"],"readme":"Implementing  CNN + Highway Network for Chinese Text Classification in MXNet\n============\nSentiment classification forked from [incubator-mxnet/cnn_text_classification/](https://github.com/apache/incubator-mxnet/tree/master/example/cnn_text_classification), i've implemented the [Highway Networks](https://arxiv.org/pdf/1505.00387.pdf) architecture.The final train model is CNN + Highway Network structure, and this version can achieve a best dev accuracy of 94.75% with the Chinese corpus.\n\nIt is a slightly simplified implementation of Kim's [Convolutional Neural Networks for Sentence Classification](http://arxiv.org/abs/1408.5882) paper in MXNet.\n\nRecently, I have been learning mxnet for Natural Language Processing (NLP). I followed this nice blog [\"Implementing a CNN for Text Classification in Tensorflow\" blog post.](http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/) to reimplement it by mxnet framework.\nData preprocessing code and corpus are directly borrowed from original author [cnn-text-classification-tf](https://github.com/dennybritz/cnn-text-classification-tf).\n\n## Performance compared to original paper\nI use the same pretrained word2vec [GoogleNews-vectors-negative300.bin](https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=sharing) in Kim's paper. However, I don't implement L2-normalization of weights on penultimate layer, but provide a L2-normalization of gradients.\nFinally, I got a best dev accuracy 80.1%, close to 81% that reported in the original paper.\n\n## Data\nPlease download the corpus from this repository [cnn-text-classification-tf](https://github.com/dennybritz/cnn-text-classification-tf), :)\n\n'data/rt.vec', this file was trained on the corpus by word2vec tool. I recommend to use GoogleNews word2vec, which could get better performance, since\nthis corpus is small (contains about 10K sentences).\n\nWhen using GoogleNews word2vec, this code loads it with gensim tools [gensim](https://github.com/piskvorky/gensim/tree/develop/gensim/models).\n\n## Remark\nIf I were wrong in CNN implementation via mxnet, please correct me.\n\n## References\n- [\"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- [Convolutional Neural Networks for Sentence Classification](http://arxiv.org/abs/1408.5882)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwut0n9%2Fcnn_chinese_text_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwut0n9%2Fcnn_chinese_text_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwut0n9%2Fcnn_chinese_text_classification/lists"}