首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于神经网络融合模型的源代码注释自动生成
引用本文:周其林,王旭,刘旭东.基于神经网络融合模型的源代码注释自动生成[J].空间控制技术与应用,2021,47(2):42-48.
作者姓名:周其林  王旭  刘旭东
作者单位:中国人民大学新闻传播实验中心
基金项目:国家自然科学基金资助项目
摘    要:注释可以有效提高源代码的可读性、帮助开发者理解软件功能,对于软件的维护和演化起着关键作用.当前源代码注释自动生成方面的研究存在一定局限,一是没有深入挖掘词法信息;二是没能很好的融合词法和语法信息.因此,提出了基于神经网络融合模型的源代码注释自动生成方法,该方法利用编码器-解码器神经网络框架深度表征源代码的词法信息,结合...

关 键 词:源代码注释  抽象语法树  编码器-解码器  融合模型

A Neural Network Fusion Model for Source Code Comments Generation
ZHOU Qilin,WANG Xu,LIU Xudong.A Neural Network Fusion Model for Source Code Comments Generation[J].Aerospace Contrd and Application,2021,47(2):42-48.
Authors:ZHOU Qilin  WANG Xu  LIU Xudong
Abstract:The comments are very helpful for understanding the source code and play an important role in software maintenance and evolution. Existing works show that the lack of source code comments is one common practice in real world projects. Current studies on automatic source code comments generation have two limitations. Firstly, they only use much simple lexical information; secondly, they do not use the lexical and syntactic information well. In this work, we propose a neural network fusion model for source code comments generation based on the encoder decoder framework. Our model can embed the lexical information better, represent the syntax information based on abstract syntax tree, and then produce a fusion encoder to learn both the lexical and syntactic information for source code comments generation. The experiments on the public benchmark indicate that our fusion model outperforms the previous models by the metrics such as BLEU4 and METEOR.
Keywords:source code comments  abstract syntax tree  encoder decoder  fusion model  
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《空间控制技术与应用》浏览原始摘要信息
点击此处可从《空间控制技术与应用》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号