Tree-based automatic classification of digital documents