{"id":14977189,"url":"https://github.com/thundergolfer/text-classify-with-cnn","last_synced_at":"2025-10-28T01:30:44.355Z","repository":{"id":73463581,"uuid":"70539436","full_name":"thundergolfer/text-classify-with-cnn","owner":"thundergolfer","description":":school: Easy to follow text classifying implementation using a Conv. Neural Network (Tensorflow)","archived":false,"fork":false,"pushed_at":"2017-04-22T09:43:07.000Z","size":770,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-28T23:23:51.705Z","etag":null,"topics":["conv","ipython-notebook","machine-learning","neural-network","notebook","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thundergolfer.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}},"created_at":"2016-10-11T00:13:28.000Z","updated_at":"2024-08-30T09:43:57.000Z","dependencies_parsed_at":"2023-06-30T18:03:40.024Z","dependency_job_id":null,"html_url":"https://github.com/thundergolfer/text-classify-with-cnn","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/thundergolfer%2Ftext-classify-with-cnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Ftext-classify-with-cnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Ftext-classify-with-cnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thundergolfer%2Ftext-classify-with-cnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thundergolfer","download_url":"https://codeload.github.com/thundergolfer/text-classify-with-cnn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860278,"owners_count":16556020,"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":["conv","ipython-notebook","machine-learning","neural-network","notebook","tensorflow"],"created_at":"2024-09-24T13:55:15.936Z","updated_at":"2025-10-28T01:30:38.874Z","avatar_url":"https://github.com/thundergolfer.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/cnn_header.jpg\"/\u003e\n\u003c/p\u003e\n\n# Text Classifying With A Convolutional Neural Network\n\u003e `python` `tensorflow` `juptyer `\n\n\u003e [![Code Climate](https://codeclimate.com/github/thundergolfer/text-classify-with-cnn/badges/gpa.svg)](https://codeclimate.com/github/thundergolfer/text-classify-with-cnn) [![Test Coverage](https://codeclimate.com/github/thundergolfer/text-classify-with-cnn/badges/coverage.svg)](https://codeclimate.com/github/thundergolfer/text-classify-with-cnn/coverage)\n\nEasy to follow text classifying implementation using a Conv. Neural Network (Tensorflow)\n\n#### What You Need\n\n1. Python 3.4 \u003e=\n2. Tensorflow \u003e= 0.8\n3. Jupyter Notebook *or* IPython Notebook [Deprecated]\n\n### Training The Network\n\nTraining the network with Tensorflow CPU-only (2013 i7 3770K) took about **70 mins**. *Note: If you try train in Jupyter/Ipython Notebook remove all print statements in the training loop. These print statement will lock up your browser and slow things down a lot.*\n\nTo train the network on the Movie Review dataset just run:\n\n```bash\n./train.py\n```\n\nTraining the network on the Customer Product Review data is\n\n```bash\n./train.py --dataset_option=\"products\"\n```\n\n\n### Evaluating The Network\n\nYou first have to train the network so [see above](#training-the-network).\n\nTo evaluate the network we need to pass in some arguments to the `evaluate.py`. Run this command, replacing `checkpoint_dir` with the last savepoint of the trained model.\n\n```shell\npython evaluate.py --checkpoint_dir=\"runs/*some numbers*/checkpoints/\"\n```\n\nor for product review dataset_option\n\n```shell\npython evaluate.py --checkpoint_dir=\"runs_product/*some numbers*/checkpoints/\"\n```\n\n### Playing With The Network\n\nYou first have to train the network so [see above](#training-the-network).\n\nTo test out individual sentences on the network, open `experiment.ipynb` and follow instruction within the notebook.\n\n```shell\npython experiment.py --checkpoint_dir=\"runs/*some numbers*/checkpoints/\" --sent=\"This is the sentence you want to test.\"\n```\n\n### Credit To\n\n[Yoon Kim](https://github.com/yoonkim/CNN_sentence), [Hu and Liu - KDD-2004](https://www.cs.uic.edu/~liub/publications/kdd04-revSummary.pdf), [Denny Britz](https://github.com/dennybritz)\n\n### Citations\n\n*Minqing Hu and Bing Liu*. \"Mining and Summarizing Customer Reviews.\" Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD-2004), Aug 22-25, 2004, Seattle, Washington, USA,\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/cnn_footer.jpg\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundergolfer%2Ftext-classify-with-cnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthundergolfer%2Ftext-classify-with-cnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthundergolfer%2Ftext-classify-with-cnn/lists"}