To undertake a syntactic approach to a pattern recognition problem, it is n
ecessary to have good grammatical models as well as good parsing algorithms
that allow distorted samples to be classified. There are several methods t
hat obtain, by taking two trees as input, the editing distance between them
. In the following work, a polynomial time algorithm which processes the di
stance between a tree and a tree automaton is presented. This measure can b
e used in pattern recognition problems as an error model inside a syntactic
classifier.