{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/improving-lexical-choice-in-neural-machine","title":"Improving Lexical Choice in Neural Machine Translation","arxiv_id":"1710.01329","date":"2017-10-03","proceeding":"NAACL 2018 6","authors":["Toan Q. Nguyen","David Chiang"],"abstract":"We explore two solutions to the problem of mistranslating rare words in\nneural machine translation. First, we argue that the standard output layer,\nwhich computes the inner product of a vector representing the context with all\npossible output word embeddings, rewards frequent words disproportionately, and\nwe propose to fix the norms of both vectors to a constant value. Second, we\nintegrate a simple lexical module which is jointly trained with the rest of the\nmodel. We evaluate our approaches on eight language pairs with data sizes\nranging from 100k to 8M words, and achieve improvements of up to +4.3 BLEU,\nsurpassing phrase-based translation in nearly all settings.","url_abs":"http://arxiv.org/abs/1710.01329v3","url_pdf":"http://arxiv.org/pdf/1710.01329v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"improving-lexical-choice-in-neural-machine","repo_url":"https://github.com/tnq177/improving_lexical_choice_in_nmt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"improving-lexical-choice-in-neural-machine","repo_url":"https://github.com/arturo-garza/NMTLexiconModel","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"improving-lexical-choice-in-neural-machine","repo_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"improving-lexical-choice-in-neural-machine","repo_url":"https://github.com/s1879281/Lexical-NMT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"word-embeddings","task_name":"Word Embeddings"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1710.01329","atlas_url":"https://app.syntology.ai/?focus=1710.01329","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1710.01329"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tnq177/improving_lexical_choice_in_nmt","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/arturo-garza/NMTLexiconModel","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/s1879281/Lexical-NMT","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"unverified":9},"by_repo_kind":{"official":{"samples":3,"ran":0,"repositories":1},"listed":{"samples":6,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"2528a36338102ff2","entry":"compute_types_and_tokens","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"data_exploration.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/data_exploration.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2528a36338102ff2"}},{"code_sha256_prefix":"039e3fb281ed1d58","entry":"get_logger","repo":"tnq177/improving_lexical_choice_in_nmt","repo_kind":"official","path":"nmt/utils.py","file_url":"https://github.com/tnq177/improving_lexical_choice_in_nmt/blob/HEAD/nmt/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"039e3fb281ed1d58"}},{"code_sha256_prefix":"aa13bf076ec9c1b1","entry":"get_lstm_cell","repo":"tnq177/improving_lexical_choice_in_nmt","repo_kind":"official","path":"nmt/utils.py","file_url":"https://github.com/tnq177/improving_lexical_choice_in_nmt/blob/HEAD/nmt/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa13bf076ec9c1b1"}},{"code_sha256_prefix":"c0d7740d9c0e6556","entry":"load_checkpoint","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"seq2seq/utils.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/seq2seq/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c0d7740d9c0e6556"}},{"code_sha256_prefix":"b6ec5393a30d6ce7","entry":"load_data","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"data_exploration.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/data_exploration.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6ec5393a30d6ce7"}},{"code_sha256_prefix":"e2578d93913154ab","entry":"load_embedding","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"seq2seq/utils.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/seq2seq/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e2578d93913154ab"}},{"code_sha256_prefix":"00b1604d04daae7a","entry":"move_to_cuda","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"seq2seq/utils.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/seq2seq/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00b1604d04daae7a"}},{"code_sha256_prefix":"b7c064b311a0eb1d","entry":"tensor_to_lstm_state","repo":"tnq177/improving_lexical_choice_in_nmt","repo_kind":"official","path":"nmt/utils.py","file_url":"https://github.com/tnq177/improving_lexical_choice_in_nmt/blob/HEAD/nmt/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b7c064b311a0eb1d"}},{"code_sha256_prefix":"b8a4984a4b3089b5","entry":"word_tokenize","repo":"prachetaphadnis/NMT_Seq2Seq_LexicalModel","repo_kind":"listed","path":"preprocess.py","file_url":"https://github.com/prachetaphadnis/NMT_Seq2Seq_LexicalModel/blob/HEAD/preprocess.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8a4984a4b3089b5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}