# A Survey of the Applications of Text Mining for the Food Domain
## 3 Text Mining Overview
### Text Classification  
Text classification, a critical part of NLP, is a large endeavor with the main objective of automatically categorizing textual information into specified taxonomies. Its value extends to a wide range of applications across several domains, including spam filtration, news subject categorization, and sentiment analysis ([PERSON] et al., 2016). Table 1 lists frequently used text categorization methods, along with their benefits and drawbacks, as well as pertinent studies that use these approaches.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Methods** & **Algorithms** & **Comments** & **Papers** \\ \hline \hline \multirow{8}{*}{Machine learning} & \multirow{8}{*}{KNN, SVM, NB, and so on.} & [PERSON] et al. (2011) ([PERSON] et al., 2016), & [PERSON] et al. (2013) ([PERSON] et al., 2016), \\  & & & [PERSON] et al. (2020) ([PERSON] et al., 2016), \\  & & & [PERSON] et al. (2015) ([PERSON] et al., 2016), \\ \cline{1-1}  & & & [PERSON] et al. (2018) ([PERSON] et al., 2016), \\ \cline{1-1}  & & & [PERSON] et al. (2022) ([PERSON] et al., 2016), \\ \cline{1-1}  & & & [PERSON] et al. (2017) ([PERSON] et al., 2016), \\ \cline{1-1}  & & & [PERSON] et al. (2022) ([PERSON] et al., 2016) \\ \hline \hline \end{tabular}
\end{table}
Table 1: General methods of text classification.  
Figure 2: Number of papers, where TC = text classification, SA = sentiment analysis, IE = information extraction, NER = named entity recognition, and TCL = text clustering.  
Text classification models within the food domain serve a crucial role in analyzing textual data gathered from diverse sources, such as news articles [28], social media [29], and online forums [30]. They are also useful for identifying product recalls, food safety incidents, and other related occurrences, which makes it easier to promptly notify people about food safety issues [20; 24; 26; 27]. Moreover, a deeper investigation in this field entails interpreting complex associations between food decisions and health state using data from a corpus of natural language texts [17; 19].  
Machine learning relies on hand-designed features and models, while deep learning learns features and models to represent data through hierarchical learning [16; 21; 22]. Support Vector Machines (SVMs), grounded in statistical learning theory, excel in intricate classification within high-dimensional feature spaces. For instance, [PERSON] et al. [16] utilized a software system employing data analysis methods to automatically identify suspicious food products. In contrast, the Naive Bayes (NB) method relies on the assumption of conditional independence among textual features as it constructs the classification model. For example, [PERSON] et al. [18] leveraged e-invoice big data to craft an automated food safety alert system for the edible oil manufacturing industry.  
In recent years, deep learning-based convolutional neural networks and recurrent neural networks have found applications in text classification tasks within the food domain, aiming to acquire intricate semantic feature representations from text and enhancing classification performance [23; 25]. Among these approaches, deep learning models like BERT have demonstrated remarkable potential in text classification tasks [9; 28]. BERT, a bi-directional Encoder pre-trained language model, accrues substantial linguistic knowledge during pre-training and undergoes fine-tuning for downstream NLP tasks. Research consistently underscores BERT's capacity to improve text classification outcomes [31]. Within the food domain, BERT finds applications in areas such as food safety supervision and food category text classification, consistently surpassing traditional methodologies.  
In NLP, text classification is pivotal for assessing various approaches. From traditional machine learning to deep learning, technological advancements drive text categorization and NLP techniques. Text classification's importance lies in its application value and future potential in the food domain.