A weighted nearest neighbor algorithm for learning with symbolic features