| The in-depth integration of the Internet and the catering industry has enabled the take-out industry to develop rapidly.The convenience of online takeout has been favored by more and more people.There are also many drawbacks,the most important of which are service quality and food safety.Takeaway merchants often open user network reviews to obtain timely feedback from users on the quality of the merchant’s services,while meal ordering users can quickly select merchants through reviews,and at the same time,merchants’ regulatory agencies can quickly understand merchants through user reviews.With the increase in the number of business users and the increase in business hours,user comments have become more and more,and algorithms need to be designed to realize automatic calculation of the user’s emotional sentiment for comments.This paper proposes a multi-level sentiment analysis method based on unbalanced data in the field of food and beverage.The first level of sentiment classification: use the self-built sentiment dictionary in the catering field to determine the sentiment tendency by calculating the sentiment word score of the review.Second-level sentiment classification: Use the support vector machine algorithm(SVM)to perform sentiment classification on the comments with low sentiment scores in the first level,and compare the classification results with the first-level results to determine the classification.Third-level sentiment classification: For the second-level SVM algorithm can not determine the classification of the review text,use Naive Bayes algorithm(NB)to classify sentiment,and compare the classification results with the second-level results to determine the classification.The experimental results of multi-level sentiment analysis method based on unbalanced data in the field of catering in this paper show that this method is faster than other methods in calculation speed and classification accuracy.Aiming at the large-scale restaurant review data scene,this paper proposes a parallel method of Spark sentiment analysis for restaurant review.This method realizes parallelization of sentiment dictionary construction in the catering field,parallelization of feature selection,parallelization of eigenvalue calculation,and parallelization of sentiment analysis in the multi-level catering field.The results of parallelization experiments show that the parallelization method in this paper can reduce the running time of the algorithm,and has a good speedup ratio and scalability. |