Text this: A two-phase case-based distance approach for multiple-group classification problems