A perceptron implementation for character classification