1. A non-transitory computer-readable recording medium storing a program for executing a method for detecting grammatical errors, the program, when executed by a processor included in an apparatus for detecting grammatical errors, causing the processor to execute: breaking up an input sentence into units of morphemes; generating morpheme sequences by binding the broken-up morphemes in a preset window size set by the processor, the generated morpheme sequences comprising forward morpheme sequences and backward morpheme sequences; determining frequencies of appearance of morpheme sequences identical to forward morpheme sequences and backward morpheme sequences of the generated morpheme sequences by searching an example-based index database (DB); and detecting grammatical errors in the input sentence by combining the determined frequencies of appearance.