Computers has been endowed with a part of human-like intelligence owing to the rapid development of the artificial intelligence technology represented by the neural networks. Facing the challenge to make machines more imaginative, we consider a quantum stochastic neural network (QSNN), and propose a learning algorithm to update the parameters governing the network evolution. The QSNN can be applied to a class of classification problems, we investigate its performance in sentence classification and find that the coherent part of the quantum evolution can accelerate training, and improve the accuracy of verses recognition which can be deemed as a quantum enhanced associative memory. In addition, the coherent QSNN is found more robust against both label noise and device noise so that it is a more adaptive option for practical implementation.