{"id":51149990,"url":"https://github.com/fa-mc/w266_proj","last_synced_at":"2026-06-26T05:04:38.666Z","repository":{"id":365763451,"uuid":"160990521","full_name":"fa-mc/w266_proj","owner":"fa-mc","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-09T01:28:10.000Z","size":12650,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-18T20:19:58.481Z","etag":null,"topics":[],"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/fa-mc.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-09T00:23:02.000Z","updated_at":"2018-12-09T01:28:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fa-mc/w266_proj","commit_stats":null,"previous_names":["fa-mc/w266_proj"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fa-mc/w266_proj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fw266_proj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fw266_proj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fw266_proj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fw266_proj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fa-mc","download_url":"https://codeload.github.com/fa-mc/w266_proj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fa-mc%2Fw266_proj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34803682,"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-26T02:00:06.560Z","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":[],"created_at":"2026-06-26T05:04:38.076Z","updated_at":"2026-06-26T05:04:38.648Z","avatar_url":"https://github.com/fa-mc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chinese Sentiment Analysis with Google BERT\n### Instructions\n\nThe Bert folder is cloned from Google's official repository (git pull git@github.com:google-research/bert.git). I have edited the run_classifier.py file to make it compatible with our processed ChnSentiCorp data.\n\n\n#### 1. Download and extract the BERT base Chinese monolanguage model into ./bert/models\n```\nmkdir $PROJ/bert/models\ncd $PROJ/bert/models\nwget https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip\nunzip chinese_L-12_H-768_A-12.zip\n```\n\n#### 2. (skip 2 \u0026 3 if you want to use the processed data) unzip the ChnSentiCorp data\n```\ncd $PROJ/data/raw/\nunzip chnsenticorp.zip ./data/raw/\n```\n\n#### 3. (skip 2 \u0026 3 if you want to use the processed data) Run process_csc.ipynb to process the raw files\n\n#### 4. Run the following command to train and evaluate the models\nThe official document from Google used python2 and TensorFlow 1.11 I ran the code with python3.6 and TensorFlow 1.10 without error.\n\nIncreasing the max_seq_length and / or train_batch_size might yield better results. My PC (GTX 1070) is limited to 128 / 20.\n\n```\ncd $PROJ/bert\n# dangdang\npython run_classifier.py --task_name csc --do_train --do_eval \\\n--data_dir $PROJ/data/processed/csc/dangdang \\\n--vocab_file $PROJ/bert/models/chinese_L-12_H-768_A-12/vocab.txt \\\n--bert_config_file $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_config.json \\\n--init_checkpoint $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_model.ckpt \\\n--max_seq_length 128 --train_batch_size 20 --learning_rate 2e-5 --num_train_epochs 3.0 \\\n--output_dir $PROJ/output/dangdang --local_rank 3\n\n# ctrip\npython run_classifier.py --task_name csc --do_train --do_eval \\\n--data_dir $PROJ/data/processed/csc/ctrip \\\n--vocab_file $PROJ/bert/models/chinese_L-12_H-768_A-12/vocab.txt \\\n--bert_config_file $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_config.json \\\n--init_checkpoint $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_model.ckpt \\\n--max_seq_length 128 --train_batch_size 20 --learning_rate 2e-5 --num_train_epochs 3.0 \\\n--output_dir $PROJ/output/ctrip --local_rank 3\n\n# jingdong\npython run_classifier.py --task_name csc --do_train --do_eval \\\n--data_dir $PROJ/data/processed/csc/jingdong \\\n--vocab_file $PROJ/bert/models/chinese_L-12_H-768_A-12/vocab.txt \\\n--bert_config_file $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_config.json \\\n--init_checkpoint $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_model.ckpt \\\n--max_seq_length 128 --train_batch_size 20 --learning_rate 2e-5 --num_train_epochs 3.0 \\\n--output_dir $PROJ/output/jingdong --local_rank 3\n\n# combined\npython run_classifier.py --task_name csc --do_train --do_eval \\\n--data_dir $PROJ/data/processed/csc/all \\\n--vocab_file $PROJ/bert/models/chinese_L-12_H-768_A-12/vocab.txt \\\n--bert_config_file $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_config.json \\\n--init_checkpoint $PROJ/bert/models/chinese_L-12_H-768_A-12/bert_model.ckpt \\\n--max_seq_length 128 --train_batch_size 20 --learning_rate 2e-5 --num_train_epochs 3.0 \\\n--output_dir $PROJ/output/csc_all --local_rank 3\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffa-mc%2Fw266_proj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffa-mc%2Fw266_proj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffa-mc%2Fw266_proj/lists"}