Programming Error Classification Method for Novices based on BiLSTM-TextCNN Model
Chengguan Xiang, Mali Yu, Peipei Zhi · 2024
In order to help programming novices locate programming errors and understand error cause, and to achieve accurate classification of programming errors, an error classification method based on deep learning networks has been proposed. Firstly, a dataset comprising 10,287 student C language programming errors (CPE28) was constructed, annotated with programming messages indicating either errors or warnings, and categorized into 28 error types to facilitate error feedback research. Secondly, the BLT-PECNet model, integrating BiLSTM and TextCNN, was designed for training and identifying programming error categories. BiLSTM captures contextual features and extracts global semantic information, while TextCNN performs convolution operations of varying sizes to extract multi-level features, ultimately yielding the classification results for programming errors. Experimental results on CPE28 demonstrate that the proposed method achieves over 92% in classification accuracy, precision, recall, and F1 score. It surpasses traditional single models in capturing key features of code errors, underscoring the method’s efficacy and accuracy.