syntactic approach to pattern recognition