{"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/parsing-as-pretraining","title":"Parsing as Pretraining","arxiv_id":"2002.01685","date":"2020-02-05","proceeding":null,"authors":["David Vilares","Michalina Strzyz","Anders Søgaard","Carlos Gómez-Rodríguez"],"abstract":"Recent analyses suggest that encoders pretrained for language modeling capture certain morpho-syntactic structure. However, probing frameworks for word vectors still do not report results on standard setups such as constituent and dependency parsing. This paper addresses this problem and does full parsing (on English) relying only on pretraining architectures -- and no decoding. We first cast constituent and dependency parsing as sequence tagging. We then use a single feed-forward layer to directly map word vectors to labels that encode a linearized tree. This is used to: (i) see how far we can reach on syntax modelling with just pretrained encoders, and (ii) shed some light about the syntax-sensitivity of different word vectors (by freezing the weights of the pretraining network during training). For evaluation, we use bracketing F1-score and LAS, and analyze in-depth differences across representations for span lengths and dependency displacements. The overall results surpass existing sequence tagging parsers on the PTB (93.5%) and end-to-end EN-EWT UD (78.8%).","url_abs":"https://arxiv.org/abs/2002.01685v1","url_pdf":"https://arxiv.org/pdf/2002.01685v1.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":"parsing-as-pretraining","repo_url":"https://github.com/aghie/parsing-as-pretraining","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"parsing-as-pretraining","repo_url":"https://github.com/Mind23-2/MindCode-158","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"dependency-parsing","task_name":"Dependency Parsing"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.01685","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.01685"}},"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":"deterministic:regex_extraction","url":"https://github.com/huggingface/pytorch-pretrained-BERT","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/aghie/parsing-as-pretraining","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":29},"by_repo_kind":{"official":{"samples":13,"ran":1,"repositories":1},"found_in_text":{"samples":17,"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":16,"samples":[{"code_sha256_prefix":"8e960fbb64668568","entry":"log_sum_exp","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"NCRFpp/model/crf.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/NCRFpp/model/crf.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8e960fbb64668568"}},{"code_sha256_prefix":"b53cb159746bdff2","entry":"accuracy","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"run_token_classifier.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/run_token_classifier.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":"b53cb159746bdff2"}},{"code_sha256_prefix":"6921551bf74e9179","entry":"apply_chunking_to_forward","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/pytorch_utils.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/pytorch_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"6921551bf74e9179"}},{"code_sha256_prefix":"5667539047103cbb","entry":"convert_checkpoint_to_pytorch","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/bert/convert_bert_token_dropping_original_tf2_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5667539047103cbb"}},{"code_sha256_prefix":"20541be1e49e8caf","entry":"convert_examples_to_features","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"run_token_classifier.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/run_token_classifier.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":"20541be1e49e8caf"}},{"code_sha256_prefix":"4d50cf32a98739b3","entry":"convert_old_keys_to_new_keys","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4d50cf32a98739b3"}},{"code_sha256_prefix":"4855bdca41688f99","entry":"convert_state_dict","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"4855bdca41688f99"}},{"code_sha256_prefix":"c968c3df370ea581","entry":"create_rename_keys","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/beit/convert_beit_unilm_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/beit/convert_beit_unilm_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c968c3df370ea581"}},{"code_sha256_prefix":"afa29dda7e74e00a","entry":"dependency_displacements","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_dependencies.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_dependencies.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":"afa29dda7e74e00a"}},{"code_sha256_prefix":"cb5ea19799e31ba8","entry":"evaluate","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"dep2labels/conll17_ud_eval.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/dep2labels/conll17_ud_eval.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":"cb5ea19799e31ba8"}},{"code_sha256_prefix":"12e92107dcde382b","entry":"get_audio_spectrogram_transformer_config","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"12e92107dcde382b"}},{"code_sha256_prefix":"c79f0bd00e55eba0","entry":"get_new_dict","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"c79f0bd00e55eba0"}},{"code_sha256_prefix":"de7ea09d38e57ab9","entry":"get_tree_spans","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_spans.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_spans.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":"de7ea09d38e57ab9"}},{"code_sha256_prefix":"6f11534db6a06f8e","entry":"load_conllu","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"dep2labels/conll17_ud_eval.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/dep2labels/conll17_ud_eval.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":"6f11534db6a06f8e"}},{"code_sha256_prefix":"ce63212f8cdd9a1a","entry":"load_deprel_weights","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"dep2labels/conll17_ud_eval.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/dep2labels/conll17_ud_eval.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":"ce63212f8cdd9a1a"}},{"code_sha256_prefix":"90fd642869f21de7","entry":"load_original_state_dict","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"90fd642869f21de7"}},{"code_sha256_prefix":"766143fdc27ade86","entry":"load_state_dict","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/visual_bert/convert_visual_bert_original_pytorch_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"766143fdc27ade86"}},{"code_sha256_prefix":"1a208abd5c3cf8fe","entry":"load_tf2_weights_in_bert","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/bert/convert_bert_original_tf2_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"1a208abd5c3cf8fe"}},{"code_sha256_prefix":"5ef841f72417ff20","entry":"load_xsum_checkpoint","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5ef841f72417ff20"}},{"code_sha256_prefix":"5301174099bfa9fb","entry":"make_linear_from_emb","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/bart/convert_bart_original_pytorch_checkpoint_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5301174099bfa9fb"}},{"code_sha256_prefix":"f22a4a58bed5e5c4","entry":"model2legends","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_dependencies.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_dependencies.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":"f22a4a58bed5e5c4"}},{"code_sha256_prefix":"3f7b95f09ac99a1c","entry":"performance_on_non_terminals","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_spans.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_spans.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":"3f7b95f09ac99a1c"}},{"code_sha256_prefix":"f97940275212bbdd","entry":"performance_on_span_len","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_spans.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_spans.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":"f97940275212bbdd"}},{"code_sha256_prefix":"633d6d0e2a2bc67b","entry":"posprocess_labels","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"run_token_classifier.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/run_token_classifier.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":"633d6d0e2a2bc67b"}},{"code_sha256_prefix":"24ece331635f4b38","entry":"prune_linear_layer","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/pytorch_utils.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/pytorch_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"24ece331635f4b38"}},{"code_sha256_prefix":"9aeec6efae4fb215","entry":"read_field","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/modeling_gguf_pytorch_utils.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/modeling_gguf_pytorch_utils.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9aeec6efae4fb215"}},{"code_sha256_prefix":"a34730fcf1a8bed8","entry":"rename_key","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/audio_spectrogram_transformer/convert_audio_spectrogram_transformer_original_to_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"a34730fcf1a8bed8"}},{"code_sha256_prefix":"be3bebdd7de293b6","entry":"softmax_backward_data","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/pytorch_utils.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/pytorch_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"be3bebdd7de293b6"}},{"code_sha256_prefix":"71fbe82c279aa0ed","entry":"split_qkv_tensor","repo":"huggingface/pytorch-pretrained-BERT","repo_kind":"found_in_text","path":"src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","file_url":"https://github.com/huggingface/pytorch-pretrained-BERT/blob/HEAD/src/transformers/models/aimv2/convert_aimv2_original_pytorch_to_hf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"71fbe82c279aa0ed"}},{"code_sha256_prefix":"2d5c6bba2d4b0bfc","entry":"word_relations","repo":"aghie/parsing-as-pretraining","repo_kind":"official","path":"evaluate_dependencies.py","file_url":"https://github.com/aghie/parsing-as-pretraining/blob/HEAD/evaluate_dependencies.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":"2d5c6bba2d4b0bfc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}