arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1908.11685cs.SEcs.CLcs.PL
收藏

使用LSTM对Java程序设计语言建模

Using LSTMs to Model the Java Programming Language

Marist College(玛丽斯特学院)

Brendon Boldt

摘要:

递归神经网络(RNN),特别是长短期记忆网络(LSTM),可以有效地建模自然语言。本研究调查的能力,这些相同的LSTM执行下一个“字”预测的Java程序设计语言。来自四个不同存储库的Java源代码经历了一个转换,该转换保留了源代码的逻辑结构,并删除了代码的各种特定性,如变量名和文字值。这样的数据集和附加的英语语言语料库用于训练和测试标准LSTM预测序列中的下一个元素的能力。结果表明,LSTM可以有效地对Java代码进行建模,实现22以下的困惑度和0.47以上的准确度,这比LSTM在英语语言上的表现有所改善,后者表现出85的困惑度和0.27的准确度。该研究可以在其他领域,如语法模板建议和自动错误修补的适用性。

英文摘要:

Recurrent neural networks (RNNs), specifically long-short term memory networks (LSTMs), can model natural language effectively. This research investigates the ability for these same LSTMs to perform next "word" prediction on the Java programming language. Java source code from four different repositories undergoes a transformation that preserves the logical structure of the source code and removes the code's various specificities such as variable names and literal values. Such datasets and an additional English language corpus are used to train and test standard LSTMs' ability to predict the next element in a sequence. Results suggest that LSTMs can effectively model Java code achieving perplexities under 22 and accuracies above 0.47, which is an improvement over LSTM's performance on the English language which demonstrated a perplexity of 85 and an accuracy of 0.27. This research can have applicability in other areas such as syntactic template suggestion and automated bug patching.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑