A Question Answering Method for Food Safety Based on Knowledge Graph
Food safety is closely bound up with people's lives.With the improvement of living standards,people's awareness of food safety has been gradually improved.It is an urgent need in society to provide trustworthy and effective question answering for information.To solve food safety problems caused by the improper use of food additives,we propose a method for food safety question answering based on knowledge graph and construct a question answering system for food safety knowledge.First of all,the open source data provided by the Internet is gained to construct the knowledge graph for food safety.Secondly,a food safety corpus is collected to pre-train the word vector model so that food safety text can be characterized preferably.Subsequently,in order to extract the food safety entities from the question texts,we design a semantic similarity matching algorithm by calculating the overlapping scores and similarity scores between the key word vectors of question and the entity vectors.Finally,the experiments are carried out by constructing the food safety knowledge question-and-answer database randomly.Accuracy,Hits@3 and Hits@5 are used as evaluation indicators to carry out ablation experiments,and the results of ablation experiments prove the effectiveness of the proposed method.The knowledge graph-based food safety question and answer method effectively addresses inquiries regarding food safety and additives,enhancing time efficiency and optimizing human resources utilization.