{"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/code-and-named-entity-recognition-in","title":"Code and Named Entity Recognition in StackOverflow","arxiv_id":"2005.01634","date":"2020-05-04","proceeding":"ACL 2020 6","authors":["Jeniya Tabassum","Mounica Maddela","Wei Xu","Alan Ritter"],"abstract":"There is an increasing interest in studying natural language and computer code together, as large corpora of programming texts become readily available on the Internet. For example, StackOverflow currently has over 15 million programming related questions written by 8.5 million users. Meanwhile, there is still a lack of fundamental NLP techniques for identifying code tokens or software-related named entities that appear within natural language sentences. In this paper, we introduce a new named entity recognition (NER) corpus for the computer programming domain, consisting of 15,372 sentences annotated with 20 fine-grained entity types. We trained in-domain BERT representations (BERTOverflow) on 152 million sentences from StackOverflow, which lead to an absolute increase of +10 F-1 score over off-the-shelf BERT. We also present the SoftNER model which achieves an overall 79.10 F$_1$ score for code and named entity recognition on StackOverflow data. Our SoftNER model incorporates a context-independent code token classifier with corpus-level features to improve the BERT-based tagging model. Our code and data are available at: https://github.com/jeniyat/StackOverflowNER/","url_abs":"https://arxiv.org/abs/2005.01634v3","url_pdf":"https://arxiv.org/pdf/2005.01634v3.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":"code-and-named-entity-recognition-in","repo_url":"https://github.com/jeniyat/StackOverflowNER","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"code-and-named-entity-recognition-in","repo_url":"https://github.com/taidnguyen/software_entity_recognition","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"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":"named-entity-recognition","task_name":"named-entity-recognition"}],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2005.01634","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2005.01634"}},"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/taidnguyen/software_entity_recognition","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/jeniyat/StackOverflowNER","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":3,"ran_draft_wrong":2,"unverified":8},"by_repo_kind":{"official":{"samples":9,"ran":3,"repositories":1},"listed":{"samples":4,"ran":2,"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":"d38f06bbd9f9c98c","entry":"argmax","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/model.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/model.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d38f06bbd9f9c98c"}},{"code_sha256_prefix":"8d492584c2bb879a","entry":"get_labels","repo":"taidnguyen/software_entity_recognition","repo_kind":"listed","path":"src/model_nll.py","file_url":"https://github.com/taidnguyen/software_entity_recognition/blob/HEAD/src/model_nll.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8d492584c2bb879a"}},{"code_sha256_prefix":"978e6ebd9602e13a","entry":"kl_div","repo":"taidnguyen/software_entity_recognition","repo_kind":"listed","path":"src/model_nll.py","file_url":"https://github.com/taidnguyen/software_entity_recognition/blob/HEAD/src/model_nll.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"978e6ebd9602e13a"}},{"code_sha256_prefix":"66f180f39c43eeb5","entry":"prepare_sequence","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/model.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/model.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"66f180f39c43eeb5"}},{"code_sha256_prefix":"ac476e734740149f","entry":"to_scalar","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/model.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/model.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ac476e734740149f"}},{"code_sha256_prefix":"e0b7dc33e0488f7e","entry":"NERModel","repo":"taidnguyen/software_entity_recognition","repo_kind":"listed","path":"src/model_nll.py","file_url":"https://github.com/taidnguyen/software_entity_recognition/blob/HEAD/src/model_nll.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":true,"mcp_get_code":{"code_sha256":"e0b7dc33e0488f7e"}},{"code_sha256_prefix":"95421f07c3753c59","entry":"NLLModel","repo":"taidnguyen/software_entity_recognition","repo_kind":"listed","path":"src/model_nll.py","file_url":"https://github.com/taidnguyen/software_entity_recognition/blob/HEAD/src/model_nll.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":true,"mcp_get_code":{"code_sha256":"95421f07c3753c59"}},{"code_sha256_prefix":"82ddeedc1532be36","entry":"calcMetrics","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/conlleval_py.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/conlleval_py.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":"82ddeedc1532be36"}},{"code_sha256_prefix":"5d56e08fc935df9b","entry":"endOfChunk","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/conlleval_py.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/conlleval_py.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":"5d56e08fc935df9b"}},{"code_sha256_prefix":"43cd754556c221e1","entry":"gaussian","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/gaussian_binner.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/gaussian_binner.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":"43cd754556c221e1"}},{"code_sha256_prefix":"c9fe7ba81ee0b5b0","entry":"save_char_embed","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/train_so.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/train_so.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":"c9fe7ba81ee0b5b0"}},{"code_sha256_prefix":"dacaea8c1a2f5f82","entry":"startOfChunk","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/conlleval_py.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/conlleval_py.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":"dacaea8c1a2f5f82"}},{"code_sha256_prefix":"13c5cea0c71aab3f","entry":"unicodeToAscii","repo":"jeniyat/StackOverflowNER","repo_kind":"official","path":"code/Attentive_BiLSTM/loader_so.py","file_url":"https://github.com/jeniyat/StackOverflowNER/blob/HEAD/code/Attentive_BiLSTM/loader_so.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":"13c5cea0c71aab3f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}