Word confidence calibration using a maximum entropy model with constraints on confidence and word distributions