Code and Named Entity Recognition in StackOverflow

Jeniya Tabassum, Mounica Maddela, Wei Xu, Alan Ritter
5/4/2020
142 citations
cs.CL

Official code: jeniyat/StackOverflowNER (147 stars, Python, MIT, last commit 2022-12-21).

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.

Show full abstract

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/

View on arXivView PDF

Code Implementations(1)

MIT

Source Code and Data for Software Domain NER

14739Python, PerlApr 4, 20203 years agoMIT

Similar Papers

Cite this paper

@article{tabassum2020code,
  title  = {Code and Named Entity Recognition in StackOverflow},
  author = {Jeniya Tabassum and Mounica Maddela and Wei Xu and Alan Ritter},
  year   = {2020},
  eprint = {2005.01634},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2005.01634}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2005.01634.svg)](https://codeofpaper.com/paper/2005.01634)

Discussion