## 5 Discussion
A dependency parser assigns to each sentence a tree structure without determining clause boundaries, limiting their ability to address all grammatical questions posed in this study. Both SpaCy and Stanford parsers lack the ability to disambiguate grammatical ambiguities and typically provide the most likely answer, which is correct unless the word class interpretation is unusual in context. Thus, the capabilities of our bubble parser are superior to those of the SpaCy and Stanford parsers. In the present paper, we also compare the competence of our rule-based approach concerning German grammar with up-to-date large language models (LLMs), namely the GPT-4 and its predecessor version GPT-3.5 of the company OpenAI. Although there are studies [28; 29; 30] about the competence of LLMs in editing grammatically incorrect sentences, to our knowledge, there are no studies that tested the grammar competence of LLMs by asking them grammar questions to grammatically correct sentences. The LLMs are requested to answer three grammar questions about word classes, main- and sub-clauses, and the cases of the nouns. The grammar questions are formulated as binary, which could be answered only correctly or falsely. Because of the statistical nature of LLMs, we ask GPT models every grammar question 20 times and count how often the answer is correct. We find that both LLMs give different answers for the same question from request to request. That is an example of the overconfidence in its errors described in [31]. Therefore, having only one answer from the LLM, one can not say how likely this answer is to be correct. As shown by [PERSON] and [PERSON] et al. [32; 33], logical inference is a hard problem for LLMs. The correctness of the LLM answers can be improved by incorporating a majority voting [27] by asking the same question many times, as we do for our analysis, and answering the question as the majority of questions are answered. However, we find that even the tendency of the LLM is sometimes wrong. Lowering the randomness of the LLM by adjusting the temperature parameter has a similar effect to that of a majority voting, as it reduces the variety of the answers towards the tendency of the LLM but does not increase the confidence in the answers. A possible explanation can be that the transformer module of the LLM builds correlations between every word pair of the input sentence but does not group together all these words, which constitute a grammatical unit. Typically, a statistical method gets better if it has more usable context. However, in the case of grammar analysis, only the regarded sentence contains the grammatical information to answer the grammar questions correctly. Hence, it is not an argument in favor of the LLM that we regard sentences in isolation and not in the context of a whole text. However, the results of the present study indicate that the newer model GPT-4 significantly outperforms GPT-3.5 in accurately recognizing grammatical structures, and it is reasonable to expect that future LLMs will continue to improve. The same holds true for a fine-tuning of GPT-4, which can be adjusted for specific tasks, leading to more precise and task-specific responses. The moderate performance of the LLMs in grammar tests can be explained by the fact that LLMs are not specifically designed for language parsing; they are more of general language models for speech and reasoning. As far as our approach is entirely rule based and the LLM approach is purely statistical, the hybrid method can provide significant advantages. For example, LLM input data can be pre-analyzed, or LLM output data can be further analyzed by the rule-based parser before being presented to the user. In addition, the results of syntactic analyses can provide an alternative to word embeddings [34], which are commonly used in statistical methods such as LLMs. Traditional word embeddings are created by measuring the distance between words, with closer words reflecting stronger semantic relations.