{"id":20542906,"url":"https://github.com/jerryshell/ncap-model","last_synced_at":"2026-02-20T21:04:24.023Z","repository":{"id":113050597,"uuid":"243970372","full_name":"jerryshell/ncap-model","owner":"jerryshell","description":"新闻评论分析平台 - 情感分析模块","archived":false,"fork":false,"pushed_at":"2021-04-26T00:23:58.000Z","size":193,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T09:43:31.379Z","etag":null,"topics":[],"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/jerryshell.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":"2020-02-29T13:05:59.000Z","updated_at":"2025-03-01T12:50:48.000Z","dependencies_parsed_at":"2023-06-07T04:15:25.159Z","dependency_job_id":null,"html_url":"https://github.com/jerryshell/ncap-model","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jerryshell/ncap-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fncap-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fncap-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fncap-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fncap-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerryshell","download_url":"https://codeload.github.com/jerryshell/ncap-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerryshell%2Fncap-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29664476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-16T01:34:53.238Z","updated_at":"2026-02-20T21:04:24.011Z","avatar_url":"https://github.com/jerryshell.png","language":"Python","readme":"# 新闻评论分析平台情感分析模块\n\n## 数据\n\n* Google Drive: https://drive.google.com/drive/folders/1Ox89_qrsJ66AstvGYxCv_8sBo-WIcb8s?usp=sharing\n* 训练数据：https://github.com/SophonPlus/ChineseNlpCorpus/blob/master/datasets/simplifyweibo_4_moods/intro.ipynb\n* 词向量：https://github.com/Embedding/Chinese-Word-Vectors\n\n## 相关项目\n\n* [新闻评论分析平台 Web 端](https://github.com/jerryshell/ncap-admin)\n* [新闻评论分析平台数据大屏](https://github.com/jerryshell/ncap-datav)\n* [新闻评论分析平台服务端](https://github.com/jerryshell/ncap-server)\n* 新闻评论分析平台情感分析模块（当前项目）\n* [新闻评论分析平台数据采集模块](https://github.com/jerryshell/ncap-spider)\n\n## 环境配置\n\n### 升级 pip 并设置镜像\n\n```bash\npip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple\n```\n\n#### aliyun\n\n```bash\npip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple\n```\n\n#### douban\n\n```bash\npip3 config set global.index-url https://pypi.douban.com/simple\n```\n\n### 安装依赖\n\n```bash\npip3 install -U tensorflow keras pandas numpy jieba fastapi uvicorn\n```\n\n## Docker\n\n### 模型训练\n\n```bash\ndocker run -d --rm --name tf \\\n  -v $PWD:/data \\\n  -w /data \\\n  tensorflow/tensorflow:latest \\\n  bash -c ' \\\n    pip3 install -U pip -i https://mirrors.aliyun.com/pypi/simple \u0026\u0026 \\\n    pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple \u0026\u0026 \\\n    pip3 install -U tensorflow keras pandas numpy jieba \u0026\u0026 \\\n    python3 model_train.py 64 100 false 1\u003elog 2\u003e\u00261 \\\n  '\n```\n\n### tensorboard\n\n```bash\ndocker run -d --rm --name tf-board \\\n  -p 6006:6006 \\\n  -v $PWD:/data \\\n  -w /data \\\n  tensorflow/tensorflow:latest \\\n  tensorboard --logdir logs/fit --host 0.0.0.0 --port 6006\n```\n\n### 开启 HTTP API\n\n```bash\ndocker run -d --rm --name tf-api \\\n  -p 8000:8000 \\\n  -v $PWD:/data \\\n  -w /data \\\n  tensorflow/tensorflow:latest \\\n  bash -c ' \\\n    pip3 install -U pip -i https://mirrors.aliyun.com/pypi/simple \u0026\u0026 \\\n    pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple \u0026\u0026 \\\n    pip3 install -U tensorflow keras pandas numpy jieba fastapi uvicorn \u0026\u0026 \\\n    python3 api.py text_cnn.2.79.h5 1\u003eapi_log 2\u003e\u00261 \\\n  '\n```\n\n## 参考\n\n* https://tf.wiki\n* https://www.tensorflow.org/guide/keras/save_and_serialize#part_ii_saving_and_loading_of_subclassed_models\n* https://zhuanlan.zhihu.com/p/25630700\n* https://blog.csdn.net/asialee_bird/article/details/88813385\n* https://trickygo.github.io/Dive-into-DL-TensorFlow2.0\n* https://www.zybuluo.com/Dounm/note/591752\n* https://zhuanlan.zhihu.com/p/54397748\n* https://www.cnblogs.com/jiangxinyang/p/10241243.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryshell%2Fncap-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerryshell%2Fncap-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerryshell%2Fncap-model/lists"}