{"id":18887155,"url":"https://github.com/thunlp-mt/voting4sc","last_synced_at":"2025-10-26T08:17:15.378Z","repository":{"id":86099781,"uuid":"259301755","full_name":"THUNLP-MT/Voting4SC","owner":"THUNLP-MT","description":"Modeling Voting for System Combination in Machine Translation (IJCAI 2020)","archived":false,"fork":false,"pushed_at":"2020-07-14T09:02:57.000Z","size":72,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T22:52:58.610Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/THUNLP-MT.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":"2020-04-27T12:04:10.000Z","updated_at":"2022-04-19T01:27:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6823e37-9de1-4b69-b69d-89de58fbc848","html_url":"https://github.com/THUNLP-MT/Voting4SC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/THUNLP-MT/Voting4SC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUNLP-MT%2FVoting4SC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUNLP-MT%2FVoting4SC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUNLP-MT%2FVoting4SC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUNLP-MT%2FVoting4SC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/THUNLP-MT","download_url":"https://codeload.github.com/THUNLP-MT/Voting4SC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUNLP-MT%2FVoting4SC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261494580,"owners_count":23167161,"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":[],"created_at":"2024-11-08T07:34:51.260Z","updated_at":"2025-10-26T08:17:10.331Z","avatar_url":"https://github.com/THUNLP-MT.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voting4SC\n## Contents\n* [Introduction](#Introduction)\n* [Prerequisites](#Prerequisites)\n* [Training](#Training)\n* [Inference](#Inference)\n* [Citation](#Citation)\n\n\n## Introduction\nThis is the code for the paper \"[Modeling Voting for System Combination in Machine Translation](https://www.ijcai.org/Proceedings/2020/511)\" (IJCAI 2020).  The implementation is on top of the open-source NMT toolkit [THUMT](https://github.com/thumt/THUMT). You might need to glance over the user manual of THUMT for knowing the basic usage of THUMT.\n\n## Prerequisites\n* Python 2.7\n* Tensorflow 1.11 - 1.15\n\n## Training\n```\nPYTHONPATH=${path_to_Voting4SC} \\\npython ${path_to_Voting4SC}/thumt/bin/trainer.py \\\n    --input ${train_src} ${train_trg} ${train_hyp1} ${train_hyp2} ${train_hyp3} \\\n    --vocabulary ${vocab_src} ${vocab_trg} \\\n    --model transformer \\\n    --validation ${dev_src} ${dev_hyp1} ${dev_hyp2} ${dev_hyp3} \\\n    --references ${dev_ref1} ${dev_ref2} ... \\\n    --parameters update_cycle=3,constant_batch_size=false,batch_size=1667,eval_steps=2000,eval_batch_size=12,train_steps=100000,save_checkpoint_steps=2000,keep_top_checkpoint_max=10,keep_checkpoint_max=9999999,\\\ndevice_list=[0,1,2,3,4],hidden_size=512,num_encoder_layers=6,num_decoder_layers=6,learning_rate=1,warmup_steps=4000,residual_dropout=0.1,relu_dropout=0.1,attention_dropout=0.1,num_heads=8,\\\nshared_embedding_and_softmax_weights=true,shared_source_target_embedding=true,buffer_size=10000000,layer_preprocess=\"layer_norm\",layer_postprocess=\"none\",position_info_type=\"absolute\",sc_num=3\n```\n* hyperparam \"sc_num\": number of system to be combined during Training or Inference (defalt value = 3).\n\n## Inference\n```\nPYTHONPATH=${path_to_Voting4SC} \\\npython ${path_to_Voting4SC}/thumt/bin/translator.py \\\n    --input ${src} ${hyp1} ${hyp2} ${hyp3} \\\n    --output ${trans} \\\n    --vocabulary ${vocab_src} ${vocab_trg} \\\n    --checkpoints ./train/eval \\\n    --model transformer \\\n    --parameters device_list=[0,1,2,3],decode_alpha=1.0,decode_batch_size=20,sc_num=3\n```\n\n## Citation\nIf you use our codes, please cite our paper:\n```\n@inproceedings{ijcai2020-511,\n  title     = {Modeling Voting for System Combination in Machine Translation},\n  author    = {Huang, Xuancheng and Zhang, Jiacheng and Tan, Zhixing and Wong, Derek F. and Luan, Huanbo and Xu, Jingfang and Sun, Maosong and Liu, Yang},\n  booktitle = {Proceedings of the Twenty-Ninth International Joint Conference on\n               Artificial Intelligence, {IJCAI-20}},\n  publisher = {International Joint Conferences on Artificial Intelligence Organization},             \n  editor    = {Christian Bessiere}\n  pages     = {3694--3701},\n  year      = {2020},\n  month     = {7},\n  note      = {Main track}\n  doi       = {10.24963/ijcai.2020/511},\n  url       = {https://doi.org/10.24963/ijcai.2020/511},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunlp-mt%2Fvoting4sc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunlp-mt%2Fvoting4sc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunlp-mt%2Fvoting4sc/lists"}