Adi Yusuf
Department of Informatics Engineering, Faculty of Engineering and Computer Science, Universitas Komputer Indonesia, Indonesia

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Translation of Natural Language to Source Code in the Case of Repetition in Pascal Language Adi Yusuf; Aditya Kusuma Setyanegara; Muhammad Raafi Febrian Tara
Communigate Vol 1 No 2 (2025): April
Publisher : CV Projurnal Mitra Publikasi

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.66324/jcmcs.v1i2.112

Abstract

Source code in computer science is a set of commands used to solve problems written in languages that can be understood by computers. Programming languages use concise syntax, and due to this conciseness, they avoid redundancy and ambiguity. However, these languages are often difficult to learn because they require strict adherence to specific syntactic rules. One approach to minimize the difficulty for programmers is to allow program writing using natural language, which is more flexible and easier for humans to understand. Therefore, this research aims to translate natural language, specifically Indonesian, into Pascal source code. The method applied is a rule-based method consisting of three stages: preprocessing (case folding and filtering), analysis (scanning and parsing), and translation. The preprocessing stage removes noise, the analysis stage checks conformity with the defined grammar, and the translation stage converts Indonesian commands into Pascal syntax. Testing was conducted using 60 Indonesian command texts across three types of loop structures (for do, while do, and repeat until). The system achieved an accuracy of approximately 95%. The results show that the rule-based approach is effective in translating repetitive structures. However, improvements to the grammar and parsing rules are recommended to address translation errors and further enhance system accuracy.