Expansionist takes a program identifier such as a function or variable name, and converts it into a short meaningful phrase comprised of expanded versions of the individual tokens in the identifier. The result can be more meaningful inputs for use in machine learning and other activities.
Authors: Michael Hucka
Repository: https://github.com/casics/expansionist
License: Unless otherwise noted, this content is licensed under the GPLv3 license.
Natural language processing (NLP) methods are increasingly being used for source code analysis. The methods rely on terms (identifiers and other textual strings) extracted from program source code. The methods often work better if, instead of cryptic identifiers such as readf
, real words and expressions such as [read
, file
] are used. This leads to the need for automated methods for splitting and expanding identifiers of classes, functions, variables, and other entities into word-like constituents.
Expansionist is a program that can take an identifier and expand it into a short phrase based on contextual information. The context can be, e.g., text extracted from comments, strings, and file headers of source code files where the tokens are found.
If you find an issue, please submit it in the GitHub issue tracker for this repository.
A lot remains to be done on CASICS in many areas. We would be happy to receive your help and participation if you are interested. Please feel free to contact the developers either via GitHub or the mailing list [email protected].
Everyone is asked to read and respect the code of conduct when participating in this project.
This material is based upon work supported by the National Science Foundation under Grant Number 1533792 (Principal Investigator: Michael Hucka). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
The icon for Expansionist is "world" by Dinosoft Labs – icon #1491944 in the Noun Project. It is used under the terms of a Creative Commons license.