The artificial neural network is composed of RBF algorithm, multi-layer parallel model and other parts. Its working principle is to classify the input image through layer by layer training, and then develop and determine the attributes of each neuron with similar features. This paper studies them based on Bayesian classifier, a common method in machine learning. First of all, before text recognition, we need to select the sample library and data type, and design the parameters according to the requirements to form an efficient automatic text classification. Then, according to the functional modules required by the specific model, select the appropriate language and compile and generate program code to realize the whole process, and carry out simulation tests on the functions of the model. The test results show that this test has prepared different quantities of simple words, short sentences, long articles, professional terms and colloquial expressions for classification tests. The classification accuracy of this model is as high as 90%, the error rate is low, and the classification time is fast, This shows that the model meets the needs of users.