## 3 Materials and Methods
### Artificial Intelligence Nutritional Analysis Model
#### 3.2.1 Step 1. Artificial Intelligence Analysis  
(1) Okapi Best Matching (Okapi BM25)  
This algorithm was proposed by [PERSON], [PERSON], and other scholars in 1970 [20; 21; 22]. As a probabilistic search framework, BM25 is still widely regarded as one of the most advanced ranking algorithms. BM25 is a bag-of-words model, which ranks a set of documents based on their similarity to each other and obtains a set of scores that can be compared with each other. The BM25 similarity formula is shown in Equation (1). \[\text{score}(\text{D},\text{Q})=\sum_{\text{i=1}}^{\text{n}}\text{IDF}(\text{ q}_{\text{i}})\left[\frac{\text{f}(\text{q}_{\text{i}},\text{D})(\text{k}_{1}+ 1)}{\text{f}(\text{q}_{\text{i}},\text{D})+\text{k}_{1}\Big{(}1-\text{b}+ \text{b}\frac{|\text{D}|}{\text{avgd}}\Big{)}}+\delta\right] \tag{1}\]  
Equation (1) BM25 Similarity Formula  
* f(q\({}_{\text{i}}\),D): Frequency of the term q\({}_{\text{i}}\) in Document D\({}_{0}\)
* 1 D1 : Length of Document D (in words). * K\({}_{\text{i}}\): The terminology described above is saturated with parameters. * b: The length normalization parameters, as described above. * avgd: Average document length in document collection. * IDF: Frequency of inverse text files. * n(q\({}_{\text{i}}\)): Number of documents containing q\({}_{\text{i}}\). * n: Total number of text files in the collection. * Term Frequency-Inverse Document Frequency (TF-IDF)  
This algorithm is a weighting technique widely used in information retrieval and text mining, and the combination of TF and IDF was first discussed by [PERSON] [23]. The TF-IDF was used to assess the importance of a word in a document, which increased positively with the number of times the word appears in the document but decreasedinversely with the frequency of its occurrence. The TF-IDF formula is shown in Equation (2), while the Inverse Document Frequency IDF Formula is shown in Equation (3). \[\text{tf}_{\text{i,j}}=\frac{\text{n}_{\text{i,j}}}{\sum_{\text{k}}\text{n}_{ \text{k,j}}} \tag{2}\]  
Equation (2) TF-IDF formula
* Molecular formula: \(\text{n}_{\text{i,j}}\) denotes the number of occurrences of the word in document \(\text{d}_{\text{j}}\). * Denominator: The sum of all occurrences of the word in document \(\text{d}_{\text{j}}\). \[\text{idf}_{\text{i}}=\text{lg}\frac{\left|\text{D}\right|}{\left|\{\text{j} :\text{t}_{\text{i}}\in\text{d}_{\text{j}}\}\right|}\] (3)  
Equation (3) Inverse Document Frequency IDF Formula
* Molecular formula: total number of documents. * Denominator: the number of documents containing the term. * The result of the calculation is obtained by quoting the logarithm of the number of documents with a base of 10. * Levenshtein  
The Russian scientist [PERSON] first proposed this algorithm in 1965 [24]. The basic form of Levenshtein is carried out using a regressive algorithm, where a threshold can be set as an upper limit for the number of steps to be moved. The Levenshtein distance formula is shown in Equation (4). \[\text{lev}_{\text{a,b}}(\text{i,j})=\left\{ \begin{array}{ll}\max(\text{i,j })&\text{if }\min(\text{i,j})=0,\\ \min\left\{\begin{array}{ll}\text{lev}_{\text{a,b}}(\text{i}-1,\text{j})+1 \\ \text{lev}_{\text{a,b}}(\text{i},\text{j}-1)+1\\ \text{lev}_{\text{a,b}}(\text{i}-1,\text{j}-1)+1_{(\text{a}_{\text{i}}\
eq\text {b})}\end{array}\right.\\ \text{otherwise.}\end{array} \right. \tag{4}\]  
Equation (4) Levenshtein Distance Formula  
(4) Jaccard  
The intersection and union of the two samples can be used to derive the Jaccard similarity coefficient and Jaccard distance for different applications [25]. Jaccard's coefficient gives the degree of similarity and the ratio between the size of the intersection of two sets and the size of the union in a finite set of samples. The Jaccard index formula is shown in Equation (5).