| With the advent of the digital information age,more and more people are consuming and commenting on food and beverage through online means.If people want to understand the specific situation of a restaurant and manually read comments one by one,it is time-consuming and laborious.However,using sentiment analysis technology to quickly process these comment data can bring great convenience to both merchants and consumers.This paper takes food and beverage comment information as an example,puts forward an emotional analysis algorithm for food and beverage comment based on BERT model(Cateen BERT for Sentiment Analysis,CBSA),and proves its practicability through engineering practice.The main work of this paper is as follows:Firstly,the Mac BERT model did not adapt the data in the catering field during the pre training.In order to improve the performance of the Mac BERT model in the catering field and make it better close to the task of emotional analysis of catering reviews,this paper uses the unlabeled review data of Amazon restaurant to conduct incremental pre training on the Mac BERT model to obtain a preliminary model.On the preliminary model,overfitting layer,linear transformation layer and prediction layer are added,Established a CBSA model.Secondly,a dataset of 20000 food and beverage comment texts with four dimensions of annotations was constructed,and the CBSA model was fine-tuned to output ratings from four dimensions: overall,taste,environment,and service;In order to fully consider the correlation between different dimensions,such as restaurants with good environments often providing better services,the CBSA model integrates the outputs of each dimension into a fourdimensional vector for training and testing,rather than training separately.This not only optimizes the model performance,but also reduces the training cost and response time of the model.Finally,a comparative experiment was conducted between the CBSA model and the Mac BERT model without relevant optimization.The experimental results showed that each optimization of CBSA resulted in an improvement in model performance;The hyperparameter selection experiment was also carried out,and the experimental results showed that the CBSA model selected the appropriate hyperparameter in the training process.This paper also applies the CBSA model to practical production environments and develops a catering comment sentiment analysis system.The system includes three modules: single sentence text sentiment analysis,batch text sentiment analysis,and model self updating.It combines theory with practice,further proving the effectiveness and practicality of the CBSA model. |