# Automatic Correction of Indonesian Grammatical Errors Based on Transformer
## 3 Grammatical Error Types in the Indonesian Language  
This section introduces a systematic classification method to describe and classify the most common types of Indonesian grammatical errors. [PERSON] et al. [34] studied the types of grammatical errors on the official Indonesian government and Indonesian tourism websites, identifying two types of errors, namely syntactic and morphological errors. In contrast, [PERSON] [35] analyzed grammatical errors based on qualitative descriptive methods in the translated text and identified 11 types of grammatical errors, classified as incorrect use of determiners, verbs, auxiliary verbs, prepositions, conjunctions, pronouns, singular nouns and noun phrases and the omission of verbs, pronouns and determiners. [PERSON] and [PERSON] [18] introduced a rule-based model combined with a statistical MT approach to detect three errors: punctuation, spelling and word selection. [PERSON] et al. [20] used a rule-based method to check three types of errors: patterns, punctuation and spelling. Previous studies classified various types of grammatical errors from different points of view. However, none of the previous works identified the criteria for classifying Indonesian grammatical errors. In the following subsections, we classify the types of Indonesian grammar and other related errors from different points of view based on the nature of the errors, frequency, efficiency and detection technique as reviewed from the literature. Accordingly, we identified four main criteria for Indonesian GEC as follows:  
**Error Nature**: This includes the types of errors related to the difficulty and ease of detection. These errors must be separated into different classes. For instance, it is easy to detect spelling errors using a spell checker, whereas it is difficult to automatically detect semantic errors, which require experts (in-depth knowledge of linguistics). **Error Frequency**: This includes the types of highly frequent and common errors, such as syntax, semantics, spelling, preposition, punctuation, conjunction and word choice errors. This should be a separate group. **Error Effect**: This covers types of errors related to the text validity, which should be separated according to the validity class. For example, a spelling error can invalidate a word, a syntax error can invalidate a text, and a sentence structure error can invalidate a sentence. **Error Detection**: This includes the types of errors related to detection in the same class both at the sentence level and word level. For example, spelling error detection can represent checking a complete sentence. Likewise, preposition error detection can describe checking words before and after prepositions. We identified the most common Indonesian grammatical errors according to the main criteria and similar studies above. The description of identification of Indonesian grammatical errors above includes the most common errors made by second language learners and native speakers. In summary, we identified these main types of errors as shown in Table 1, Figure 2 describes the main categories, and more details are in the following subsections:  
1. Syntax error: These errors types are related to incorrect writing styles and all error types in the rules of grammar, such as incorrect use of a sentence structure, morphology, syntax and even punctuation. In the syntax form, the main point is the relationship among words in the sentences, and we identified the subtypes of errors as follows:Word choice: This leads the sentence to have an inappropriate meaning if there is an inappropriate word in the sentence structure. This always occurs in second language learners often choosing the wrong words, which can lead to different meanings, such as with the exchange of the words 'Ada' and 'Adalah', 'Berangkat' and 'Meninggalkan' and 'Mengambil' and 'Meninggalkan'.