1. In a computer-assisted language learning system, a method for analyzing grammar and building a learners' model using a student's level of proficiency, comprising the steps of. maintaining a syntactic error table for the student, said error table including a column listing syntactic subtrees with associated frequency fields; determining a proficiency level of a student's writing ability using a sentence input by the student; matching the input sentence to a correct sentence in a database template; obtaining a grammar tree of the matched correct sentence; matching the input sentence to leaves of the grammar tree; for each leaf of the grammar tree that is matched with words marked as errors, finding a minimum syntactic subtree of the leaf and associating the leaf with said subtree; for all the subtrees found, combining leaves associated with a common subtree; for each common subtree, searching the syntactic error table for the common subtree; and updating the table to reflect the common subtree.