LOCAL: pattern recognition contexts