1. An apparatus for detecting grammatical errors, the apparatus comprising: a sentence analyzer configured to break up an input sentence into units of morphemes; an example builder configured to break up example text into units of morphemes and build an example-based index database (DB); and an error detector configured to generate morpheme sequences by binding the morphemes broken up from the input sentence in a preset window (n-window) size, the generated morpheme sequences comprising forward morpheme sequences and backward morpheme sequences, determine frequencies of appearance of morpheme sequences identical to the forward morpheme sequences and backward morpheme sequences by searching the example-based index DB, and detect grammatical errors in the input sentence by combining the determined frequencies of appearance.