Rule-based classification