{"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/contextual-label-projection-for-cross-lingual","title":"Contextual Label Projection for Cross-Lingual Structured Prediction","arxiv_id":"2309.08943","date":"2023-09-16","proceeding":null,"authors":["Tanmay Parekh","I-Hung Hsu","Kuan-Hao Huang","Kai-Wei Chang","Nanyun Peng"],"abstract":"Label projection, which involves obtaining translated labels and texts jointly, is essential for leveraging machine translation to facilitate cross-lingual transfer in structured prediction tasks. Prior research exploring label projection often compromise translation accuracy by favoring simplified label translation or relying solely on word-level alignments. In this paper, we introduce a novel label projection approach, CLaP, which translates text to the target language and performs contextual translation on the labels using the translated text as the context, ensuring better accuracy for the translated labels. We leverage instruction-tuned language models with multilingual capabilities as our contextual translator, imposing the constraint of the presence of translated labels in the translated text via instructions. We benchmark CLaP with other label projection techniques on zero-shot cross-lingual transfer across 39 languages on two representative structured prediction tasks - event argument extraction (EAE) and named entity recognition (NER), showing over 2.4 F1 improvement for EAE and 1.4 F1 improvement for NER. We further explore the applicability of CLaP on ten extremely low-resource languages to showcase its potential for cross-lingual structured prediction.","url_abs":"https://arxiv.org/abs/2309.08943v3","url_pdf":"https://arxiv.org/pdf/2309.08943v3.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":"contextual-label-projection-for-cross-lingual","repo_url":"https://github.com/pluslabnlp/clap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"cross-lingual-transfer","task_name":"Cross-Lingual Transfer"},{"task_slug":"event-argument-extraction","task_name":"Event Argument Extraction"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"cg","task_name":"NER"},{"task_slug":"named-entity-recognition-1","task_name":"Named Entity Recognition"},{"task_slug":"named-entity-recognition-ner","task_name":"Named Entity Recognition (NER)"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"structured-prediction","task_name":"Structured Prediction"},{"task_slug":"translation","task_name":"Translation"},{"task_slug":"zero-shot-cross-lingual-transfer","task_name":"Zero-Shot Cross-Lingual Transfer"},{"task_slug":"named-entity-recognition","task_name":"named-entity-recognition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.08943","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.08943"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/pluslabnlp/clap","reach":{"status":"ok"}}],"summary":{"ran":10,"unverified":5},"by_repo_kind":{"official":{"samples":15,"ran":10,"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":15,"samples":[{"code_sha256_prefix":"7a8e743781698c41","entry":"EAE_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/models/XGear/EAEtrainer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/models/XGear/EAEtrainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a8e743781698c41"}},{"code_sha256_prefix":"8c042a3e45a89dee","entry":"EAE_trans_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/models/XGear/EAEtrainer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/models/XGear/EAEtrainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8c042a3e45a89dee"}},{"code_sha256_prefix":"c87e701f7fb5b972","entry":"compute_ED_scores","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/scorer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/scorer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c87e701f7fb5b972"}},{"code_sha256_prefix":"24b57210b1bb176b","entry":"entity_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/ner_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/ner_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"24b57210b1bb176b"}},{"code_sha256_prefix":"e5eb841554205196","entry":"entitytext_contextual_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/eae_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/eae_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e5eb841554205196"}},{"code_sha256_prefix":"cfa23a80e4639090","entry":"flatten_prompt","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/llm_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/llm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cfa23a80e4639090"}},{"code_sha256_prefix":"da604fc3b4b5f939","entry":"load_config","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da604fc3b4b5f939"}},{"code_sha256_prefix":"12b1f2546b774003","entry":"process_data_translate_ner","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/ner_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/ner_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"12b1f2546b774003"}},{"code_sha256_prefix":"33e1268f45b9cba4","entry":"text_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/eae_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/eae_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"33e1268f45b9cba4"}},{"code_sha256_prefix":"cb025289c0a1227c","entry":"text_collate_fn","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/ner_utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/ner_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb025289c0a1227c"}},{"code_sha256_prefix":"ef707ceb5ff307d7","entry":"clean_text","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ef707ceb5ff307d7"}},{"code_sha256_prefix":"13ff08bbb278c6d9","entry":"compute_EAE_scores","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/scorer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/scorer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"13ff08bbb278c6d9"}},{"code_sha256_prefix":"050ebc070b34109c","entry":"compute_scores","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/scorer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/scorer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"050ebc070b34109c"}},{"code_sha256_prefix":"5521db334f17d831","entry":"get_special_tokens","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/xgear/models/XGear/EAEtrainer.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/xgear/models/XGear/EAEtrainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5521db334f17d831"}},{"code_sha256_prefix":"dd2ae20b4843b15b","entry":"load_data","repo":"pluslabnlp/clap","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/pluslabnlp/clap/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dd2ae20b4843b15b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}