Error handling in a stochastic dialog system through confidence measures