# A Chinese Named Entity Recognition Method Based on ERNIE-BiLSTM-CRF for Food Safety Domain
## 4 Experiments
### Dataset and Experimental Setup  
* **Datasets:** This paper constructed a food safety domain dataset for Food to conduct experiments. To ensure the fairness of the experiments, a widely used public dataset, Weibo NER, is chosen to validate the validity and reasonableness of our model. Both datasets use standard BIO annotation to represent the named entity tags of tokens in the input sentences.  
The Weibo NER dataset is generated based on historical data filtered from Sina Weibo between November 2013 and December 2014. It contains 1890 microblog messages, annotated based on the annotation standard of DEFT ERE of LDC2014. The entity categories in this dataset are divided into four categories: Person, Organization, Address, and Geopolitical entity; and each category can be subdivided into specific (NAM, e.g., \" \" \" labelled as \"PER.NAM\") and generic (NOM, e.g., \"NOM\" for \" \" \").  
The Food dataset was generated by filtering negative reviews about food (fruit category) from the sentiment/opinion/review propensity analysis dataset online_shopping_10_cats of the Chinese Natural Language Processing Language Resources Project ([[https://github.com/liuhuanyong/ChineseNLPCorpus](https://github.com/liuhuanyong/ChineseNLPCorpus)]([https://github.com/liuhuanyong/ChineseNLPCorpus](https://github.com/liuhuanyong/ChineseNLPCorpus)) (accessed on 20 August 2021)) and manually annotated using the NER annotation tool YEDDA [38]. First, food-safe named entities were extracted from the sentences, as shown in Figure 4; then, as shown in Figure 5, the sentences were processed into sequence labels to feed into the NER model for training. These reviews come from the Jingdong e-commerce platform and contain 1914 messages. Under the guidance of food safety-related experts, based on the content of the review, we assessed consumer evaluations about a particular type of fruit sold by a store on an e-commerce platform with a particular problem and the appearance of a specific symptom by consumers after consumption; the entity categories of this dataset are divided into five categories: type of fruit (FRU), description of the risk present (SIG), e-commerce platform sold (ECP), store sold (MER), and symptoms appeared (SYM).  
Figure 4: Manual annotation instance. The term “ \" \" \" represents the apple, indicating the presence of risky fruit categories, labeled \"FRU\", and \" \" indicates that the apple strongly smells of pesticides, which is labeled as food safety risk description “SIG”.  
Figure 5: Sequence annotation instance. According to the BIO labeling scheme, B indicates the beginning of an entity, I indicates an intermediate entity, and O indicates a non-entity. The Chinese word “ indicates the apple, labeled as “B-FRU, I-FRU,” and the Chinese characters “ \" \" \" \" \" \" describing apples with a strong pesticide smell is a food safety risk description and is labeled as “B-SIG, I-SIG, I-SIG, I-SIG, I-SIG, I-SIG, I-SIG”. The rest of the Chinese characters are marked as “O”.  
The training, validation and test sets of the two datasets segmented according to the number of sentences are shown in Table 1. The Weibo NER dataset is its initial segmentation [33] and has not been changed in this paper.  
Furthermore, the named entity labels for both datasets are shown in Table 2.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Dataset** & **Train Set** & **Dev Set** & **Test Set** \\ \hline Weibo NER & 1350 & 270 & 270 \\ Food & 1500 & 200 & 214 \\ \hline \end{tabular}
\end{table}
Table 1: Dataset segmentation statistics.  
\begin{table}
\begin{tabular}{c c} \hline
**Dataset** & **Label** \\ \hline \hline  & PER\_NOM \\ \cline{2-3}  & PER\_NAM \\ \cline{2-3}  & LOC\_NOM \\ \cline{2-3} Weibo NER & LOC\_NAM \\ \cline{2-3}  & GPE\_NOM \\ \cline{2-3}  & GPE\_NAM \\ \cline{2-3}  & ORG\_NOM \\ \cline{2-3}  & ORG\_NAM \\ \hline \hline  & FRU \\ \cline{2-3}  & SIG \\ \cline{2-3} Food & ECP \\ \cline{2-3}  & MER \\ \hline \end{tabular}
\end{table}
Table 2: Dataset label statistics.