Software Open Access

Spiral: splitters for identifiers in source code files

Michael Hucka

Spiral is a Python module that provides several different functions for splitting identifiers found in source code files. Identifier splitting (also known as identifier name tokenization) is the task of breaking apart program identifier strings such as getInt or readUTF8stream into component tokens: [get, int] and [read, utf8, stream]. The need for splitting identifiers arises in a variety of contexts, including natural language processing (NLP) methods applied to source code analysis and program comprehension. Spiral provides some basic naive splitting algorithms, such as a straightforward camel-case splitter, as well as more elaborate heuristic splitters, such as an algorithm we call Ronin.

The name Spiral is a loose acronym based on "SPlitters for IdentifieRs: A Library".

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.
Files (38.5 MB)
Name Size
spiral-1.0.1.tar.gz
md5:cc85d6816ddf5e6cf082794ef03997a3
19.2 MB Download
spiral-1.0.1.zip
md5:22a9956e1df11ebae36cf63822953c52
19.3 MB Download
30
2
views
downloads
All versions This version
Views 3030
Downloads 22
Data volume 38.5 MB38.5 MB
Unique views 3030
Unique downloads 22

Share

Cite as