Algorithm for generating rules for classifying documents
I think a simplest way is like this: convert the document to a vector like "bag of words" or "n-grams", then apply algorithm which can be used to derive rules Decision tree or LEM2.