Issue |
ITM Web Conf.
Volume 70, 2025
2024 2nd International Conference on Data Science, Advanced Algorithm and Intelligent Computing (DAI 2024)
|
|
---|---|---|
Article Number | 02013 | |
Number of page(s) | 7 | |
Section | Machine Learning in Healthcare and Finance | |
DOI | https://doi.org/10.1051/itmconf/20257002013 | |
Published online | 23 January 2025 |
Comparative Analysis of TF-IDF and Word2Vec in Sentiment Analysis: A Case of Food Reviews
Dublin International College, Beijing University of Technology, Beijing, 100000, China
Corresponding author: zerui.zhan@ucdconnect.ie
Sentiment analysis is an important area of natural language processing that supports applications such as market analysis, customer feedback, and social media monitoring by identifying and classifying opinions in text. Text representation is the basis of sentiment analysis, and TF-IDF and Word2Vec are two commonly used methods to carry out text vectorization by counting word frequency and capturing semantic relations respectively. This paper compares the performance of TF-IDF and Word2Vec in sentiment analysis of food reviews to provide a more effective basis for enterprises and researchers to choose text representation techniques. Based on 560,000 food review data, this paper focuses on comparing the accuracy and generalization ability of the two methods under different dataset sizes. The results showed that TF-IDF showed high accuracy in training data (99.16%), but showed obvious overfitting problems in test data (73.9%). In contrast, Word2Vec was more balanced on training and testing data (68.4% vs. 68.65%), showing better generalization. This finding has guiding implications for choosing text representation methods, especially in sentiment analysis tasks on large data sets.
© The Authors, published by EDP Sciences, 2025
This is an Open Access article distributed under the terms of the Creative Commons Attribution License 4.0, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.