Rules for recognition of educational documents