Text this: Training and optimization of product unit neural networks