Training a maximum entropy classifier