A simple pattern recognition library