A Bigram-based Inference Model for Retrieving Abbreviated Phrases in Source Code

Abdulrahman Alatawi, Weifeng Xu, Dianxiang Xu
{"title":"A Bigram-based Inference Model for Retrieving Abbreviated Phrases in Source Code","authors":"Abdulrahman Alatawi, Weifeng Xu, Dianxiang Xu","doi":"10.1145/3383219.3383221","DOIUrl":null,"url":null,"abstract":"Expanding abbreviations in source code to their full meanings is very useful for software maintainers to comprehend the source code. The existing approaches, however, focus on expanding an abbreviation to a single word, i.e., unigram. They do not perform well when dealing with abbreviations of phrases that consist of multiple unigrams. This paper proposes a bigram-based approach for retrieving abbreviated phrases automatically. Key to this approach is a bigram-based inference model for choosing the best phrase from all candidates. It utilizes the statistical properties of unigrams and bigrams as prior knowledge and a bigram language model for estimating the likelihood of each candidate phrase of a given abbreviation. We have applied the bigram-based approach to 100 phrase abbreviations, randomly selected from eight open source projects. The experiment results show that it has correctly retrieved 78% of the abbreviations by using the unigram and bigram properties of a source code repository. This is 9% more accurate than the unigram-based approach and much better than other existing approaches. The bigram-based approach is also less biased towards specific phrase sizes than the unigram-based approach.","PeriodicalId":334629,"journal":{"name":"Proceedings of the 24th International Conference on Evaluation and Assessment in Software Engineering","volume":"17 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-04-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 24th International Conference on Evaluation and Assessment in Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3383219.3383221","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Expanding abbreviations in source code to their full meanings is very useful for software maintainers to comprehend the source code. The existing approaches, however, focus on expanding an abbreviation to a single word, i.e., unigram. They do not perform well when dealing with abbreviations of phrases that consist of multiple unigrams. This paper proposes a bigram-based approach for retrieving abbreviated phrases automatically. Key to this approach is a bigram-based inference model for choosing the best phrase from all candidates. It utilizes the statistical properties of unigrams and bigrams as prior knowledge and a bigram language model for estimating the likelihood of each candidate phrase of a given abbreviation. We have applied the bigram-based approach to 100 phrase abbreviations, randomly selected from eight open source projects. The experiment results show that it has correctly retrieved 78% of the abbreviations by using the unigram and bigram properties of a source code repository. This is 9% more accurate than the unigram-based approach and much better than other existing approaches. The bigram-based approach is also less biased towards specific phrase sizes than the unigram-based approach.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于bigram的源代码缩略短语检索推理模型
将源代码中的缩略语扩展到其全部含义对于软件维护人员理解源代码非常有用。然而,现有的方法侧重于将缩写扩展到单个单词,即unigram。它们在处理由多个字母组成的短语缩写时表现不佳。本文提出了一种基于双引号的缩略短语自动检索方法。该方法的关键是从所有候选词中选择最佳短语的基于双字母的推理模型。它利用单字母和双字母的统计特性作为先验知识,并利用双字母语言模型来估计给定缩写的每个候选短语的可能性。我们已经将基于双字母表的方法应用于100个短语缩写,这些缩写是从8个开源项目中随机选择的。实验结果表明,该方法利用源代码库的单字和双字属性,正确检索了78%的缩略语。这比基于uniggram的方法准确率高9%,比其他现有方法要好得多。基于双字母的方法也比基于单字母的方法更少偏向于特定的短语大小。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A Bigram-based Inference Model for Retrieving Abbreviated Phrases in Source Code Towards a Hypothetical Framework to Secure DevOps Adoption: Grounded Theory Approach An Experimental Evaluation of Imbalanced Learning and Time-Series Validation in the Context of CI/CD Prediction TMMI Integration with Agile and Test Process Experiences from an Interpretative Case Study of Innovative Public Procurement of Digital Systems in the Norwegian Public Sector
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1