{"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-constituency-parsing-with-span","title":"Improving Constituency Parsing with Span Attention","arxiv_id":"2010.07543","date":"2020-10-15","proceeding":"Findings of the Association for Computational Linguistics 2020","authors":["Yuanhe Tian","Yan Song","Fei Xia","Tong Zhang"],"abstract":"Constituency parsing is a fundamental and important task for natural language understanding, where a good representation of contextual information can help this task. N-grams, which is a conventional type of feature for contextual information, have been demonstrated to be useful in many tasks, and thus could also be beneficial for constituency parsing if they are appropriately modeled. In this paper, we propose span attention for neural chart-based constituency parsing to leverage n-gram information. Considering that current chart-based parsers with Transformer-based encoder represent spans by subtraction of the hidden states at the span boundaries, which may cause information loss especially for long spans, we incorporate n-grams into span representations by weighting them according to their contributions to the parsing process. Moreover, we propose categorical span attention to further enhance the model by weighting n-grams within different length categories, and thus benefit long-sentence parsing. Experimental results on three widely used benchmark datasets demonstrate the effectiveness of our approach in parsing Arabic, Chinese, and English, where state-of-the-art performance is obtained by our approach on all of them.","url_abs":"https://arxiv.org/abs/2010.07543v1","url_pdf":"https://arxiv.org/pdf/2010.07543v1.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-constituency-parsing-with-span","repo_url":"https://github.com/cuhksz-nlp/SAPar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"constituency-parsing","task_name":"Constituency Parsing"},{"task_slug":"natural-language-understanding","task_name":"Natural Language Understanding"},{"task_slug":"sentence","task_name":"Sentence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/constituency-parsing-on-atb","task":"Constituency Parsing","dataset":"ATB","model":"SAPar","rank_in_archive_order":1,"of":1,"metrics":{"F1":"83.26"},"uses_additional_data":false},{"leaderboard":"/sota/constituency-parsing-on-ctb5","task":"Constituency Parsing","dataset":"CTB5","model":"SAPar + BERT","rank_in_archive_order":2,"of":9,"metrics":{"F1 score":"92.66"},"uses_additional_data":false},{"leaderboard":"/sota/constituency-parsing-on-penn-treebank","task":"Constituency Parsing","dataset":"Penn Treebank","model":"SAPar + XLNet","rank_in_archive_order":2,"of":27,"metrics":{"F1 score":"96.40"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.07543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.07543"}},"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/cuhksz-nlp/SAPar","reach":null}],"summary":{"ran":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"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":"4147856ea4d1a0a6","entry":"FindNgrams","repo":"cuhksz-nlp/SAPar","repo_kind":"official","path":"attutil.py","file_url":"https://github.com/cuhksz-nlp/SAPar/blob/HEAD/attutil.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4147856ea4d1a0a6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}