A BERT-based sentiment analysis algorithm for quantitative assessment of public attitudes towards local government new media
In the context of digital governance, how to scientifically and accurately assess the public attitudes towards grassroots government new media has become a key issue for enhancing governance efficiency. Traditional sentiment analysis methods based on dictionaries or shallow models are unable to cope with the complex semantics and dynamic evolution characteristics of public expressions. Therefore, this study proposes and constructs a dynamic map quantitative assessment algorithm for government public attitudes based on deep semantic perception. This algorithm integrates pre-trained language models, neural topic modeling, and time series analysis, and achieves the integrated decomposition of sentiment tendencies, intensities, related issues, and evolution trajectories in comment texts through end-to-end joint learning. The algorithm can not only output fine-grained sentiment quantification values and topic attributions, but also generate multidimensional assessment vectors such as polarization indices that depict attitude differences and sensitivity indicators that reflect the impact of events. Through systematic designed comparative experiments, this algorithm demonstrates superior performance in the accuracy of sentiment and topic analysis, the explainability of association attribution, the sensitivity to public opinion dynamics, and the practicality of cross-case comparison. The research shows that this algorithm can extract a structured and interpretable "attitude-issue-time" three-dimensional assessment map from massive and unstructured interactive data, providing a data-driven, hierarchical, and highly systematic analytical tool for understanding public emotions, identifying core issues, and evaluating communication effects. It has significant methodological innovation value and practical application potential.