Early detection of food safety risks using BERT and large language models

Mohammed El Amin Gasbaoui, Soumia Benkrama, Mostefa Bendjima

Abstract


Sentiment analysis can be a powerful tool in safeguarding public health. This allows authorities to investigate and take action before a foodborne illness outbreak spreads. This paper introduces a novel system that proactively empowers restaurants to identify potential food safety hazards and hygiene regulation violations. The system leverages the power of natural language processing (NLP) to analyze Arabic restaurant reviews left by customers. By fine-tuning a pre-trained BERT mini-Arabic model on three targeted datasets: Sentiment Twitter Corpus, an Algerian dialect dataset, and an Arabic restaurant dataset, the system achieves an impressive accuracy of 91%. Additionally, the system caters to spoken feedback by accepting audio reviews. We utilized Whisper AI for accurate text transcription, followed by classification using a fine-tuned Gemini model from Google on Algerian local comments and others generated using large language models (LLMs) through few-shot learning techniques, reaching an accuracy of 93%. Notably, both models operate independently and concurrently. Leveraging RESTful APIs, the system integrates the solved sub-solutions from each microservice into a fusion layer for a comprehensive restaurant evaluation. This multifaceted approach delivers remarkable results for both modern standard Arabic (MSA) and the Algerian dialect, demonstrating its effectiveness in addressing restaurant food safety concerns.

Keywords


Arabic sentiment analysis; Deep learning; Large language model; NLP; Parallel processing; RESTful API; Software design

Full Text:

PDF


DOI: http://doi.org/10.11591/ijeecs.v39.i3.pp1683-1692

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Indonesian Journal of Electrical Engineering and Computer Science (IJEECS)
p-ISSN: 2502-4752, e-ISSN: 2502-4760
This journal is published by the Institute of Advanced Engineering and Science (IAES).

shopify stats IJEECS visitor statistics