Document classification with the perceptron