Text this: Generalizing convolutional neural networks for pattern recognition tasks