Syntactic Recognition of Distorted Patterns: an Error-Correcting Parsing Approach