# SCALAR: A Part-of-speech Tagger for Identifiers

arXiv: https://arxiv.org/abs/2504.17038 · HTML: https://mlsanity.com/paper/2504.17038/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 6 of its 35 references that are in the map.
- First posted on arXiv 23 Apr 2025.

## Builds on (most cited first, 6 of 6)

- [On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifiers](https://mlsanity.com/paper/2007.08033/) (2020)
- [Using Grammar Patterns to Interpret Test Method Name Evolution](https://mlsanity.com/paper/2103.09190/) (2021)
- [Empirical Study of Co-Renamed Identifiers](https://mlsanity.com/paper/2212.02035/) (2022)
- [Characterising the Knowledge about Primitive Variables in Java Code Comments](https://mlsanity.com/paper/2103.12291/) (2021)
- [An Ensemble Approach for Annotating Source Code Identifiers with Part-of-speech Tags](https://mlsanity.com/paper/2109.00629/) (2021)
- [Understanding Digits in Identifier Names: An Exploratory Study](https://mlsanity.com/paper/2203.00113/) (2022)

## Abstract (arXiv)

The paper presents the Source Code Analysis and Lexical Annotation Runtime (SCALAR), a tool specialized for mapping (annotating) source code identifier names to their corresponding part-of-speech tag sequence (grammar pattern). SCALAR's internal model is trained using scikit-learn's GradientBoostingClassifier in conjunction with a manually-curated oracle of identifier names and their grammar patterns. This specializes the tagger to recognize the unique structure of the natural language used by developers to create all types of identifiers (e.g., function names, variable names etc.). SCALAR's output is compared with a previous version of the tagger, as well as a modern off-the-shelf part-of-speech tagger to show how it improves upon other taggers' output for annotating identifiers. The code is available on Github
