Text this: A recursive patterns matching model for the dynamic pattern recognition problem