Programming Language Identification in Stack Overflow Post Snippets with Regex Based Tf-Idf Vectorization over ANN

Aman Swaraj, Sandeep Kumar

2023

Abstract

Software Question-Answer (SQA) sites such as Stack Overflow (SO) comprise a significant portion of a developer’s resource for knowledge sharing. Owing to their mass popularity, these SQA sites require an appropriate tagging mechanism to better facilitate discussion among users. An intrinsic part of predicting these tags is predicting programming languages of the code segments associated with the questions. Usually, state of art models such as BERT and embedding-based algorithms such as word2vec are preferred for the text classification task, however, in the case of code snippets that are different from natural language in both syntactic as well as semantic composition, embedding techniques might not yield as precise results as traditional methods. To this predicament, we propose a regex-based tf-idf vectorization approach followed by chi-square feature reduction over an ANN classifier. Our method achieves an accuracy of 85% over a corpus of 232,727 stack overflow code snippets which surpasses several baselines.

Download


Paper Citation


in Harvard Style

Swaraj A. and Kumar S. (2023). Programming Language Identification in Stack Overflow Post Snippets with Regex Based Tf-Idf Vectorization over ANN. In Proceedings of the 18th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE, ISBN 978-989-758-647-7, SciTePress, pages 648-655. DOI: 10.5220/0011989600003464


in Bibtex Style

@conference{enase23,
author={Aman Swaraj and Sandeep Kumar},
title={Programming Language Identification in Stack Overflow Post Snippets with Regex Based Tf-Idf Vectorization over ANN},
booktitle={Proceedings of the 18th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,},
year={2023},
pages={648-655},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0011989600003464},
isbn={978-989-758-647-7},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 18th International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,
TI - Programming Language Identification in Stack Overflow Post Snippets with Regex Based Tf-Idf Vectorization over ANN
SN - 978-989-758-647-7
AU - Swaraj A.
AU - Kumar S.
PY - 2023
SP - 648
EP - 655
DO - 10.5220/0011989600003464
PB - SciTePress