Retrieval-Based Transformer Pseudocode Generation
Anas Alokla,
Walaa Gad,
Waleed Nazih,
Mustafa Aref and
Abdel-Badeeh Salem
Additional contact information
Anas Alokla: Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt
Walaa Gad: Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt
Waleed Nazih: College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al-Kharj 11942, Saudi Arabia
Mustafa Aref: Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt
Abdel-Badeeh Salem: Faculty of Computer and Information Sciences, Ain Shams University, Cairo 11566, Egypt
Mathematics, 2022, vol. 10, issue 4, 1-16
Abstract:
The comprehension of source code is very difficult, especially if the programmer is not familiar with the programming language. Pseudocode explains and describes code contents that are based on the semantic analysis and understanding of the source code. In this paper, a novel retrieval-based transformer pseudocode generation model is proposed. The proposed model adopts different retrieval similarity methods and neural machine translation to generate pseudocode. The proposed model handles words of low frequency and words that do not exist in the training dataset. It consists of three steps. First, we retrieve the sentences that are similar to the input sentence using different similarity methods. Second, pass the source code retrieved (input retrieved) to the deep learning model based on the transformer to generate the pseudocode retrieved. Third, the replacement process is performed to obtain the target pseudo code. The proposed model is evaluated using Django and SPoC datasets. The experiments show promising performance results compared to other language models of machine translation. It reaches 61.96 and 50.28 in terms of BLEU performance measures for Django and SPoC, respectively.
Keywords: natural language processing; retrieval-based; neural machine translation; pseudocode generation; deep learning-based transformer (search for similar items in EconPapers)
JEL-codes: C (search for similar items in EconPapers)
Date: 2022
References: View complete reference list from CitEc
Citations: View citations in EconPapers (3)
Downloads: (external link)
https://www.mdpi.com/2227-7390/10/4/604/pdf (application/pdf)
https://www.mdpi.com/2227-7390/10/4/604/ (text/html)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:gam:jmathe:v:10:y:2022:i:4:p:604-:d:750560
Access Statistics for this article
Mathematics is currently edited by Ms. Emma He
More articles in Mathematics from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().