Journal of Creativity, Media, and Communication Studies
Vol 1 No 2 (2025): April

Translation of Natural Language to Source Code in the Case of Repetition in Pascal Language

Adi Yusuf (Department of Informatics Engineering, Faculty of Engineering and Computer Science, Universitas Komputer Indonesia, Indonesia)
Aditya Kusuma Setyanegara (Department of Computer Science, Faculty of Mathematics and Natural Sciences, IPB University, Indonesia)
Muhammad Raafi Febrian Tara (Department of Islamic Criminal Law, Faculty of Sharia, State Islamic University of Raden Mas Said Surakarta, Indonesia)



Article Info

Publish Date
23 Apr 2025

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.

Copyrights © 2025






Journal Info

Abbrev

cg

Publisher

Subject

Education Languange, Linguistic, Communication & Media Library & Information Science Social Sciences

Description

Journal of Creativity, Media, and Communication Studies is an interdisciplinary journal dedicated to publishing original research and scholarly articles in the field of communication. Aimed at a global audience of researchers and educators, Journal of Creativity, Media, and Communication Studies ...