The objective of this article is to present an automatic tool for detecting andclassifying grammatical errors in written language as well as to describe theevaluation protocol we have carried out to measure its performance on learnercorpora. The tool was designed to detect and analyse the linguistic errors foundin text essays, assess the writing proficiency, and propose solutions with the aimof improving the linguistic skills of students. It makes use of natural languageprocessing and knowledge-rich linguistic resources. So far, the tool has beenimplemented for the Galician language. The system has been evaluated on twolearner corpora reaching 91% precision and 65% recall (76% F-score) for thetask of detecting different types of grammatical errors, including spelling, lexicaland syntactic ones.