Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nutrition Analyzer

This jupyter notebook project features ingredient list tokenization, fuzzy matching, ingredient pluralization (for added aliases), and common and scientific name equivalent alias retrieval.

Semantic filters, such as SciSpacy NER, ingredient aliases, health keyword matching, and further filtering are used for data collection from PubMed, OpenFDA, RxNorm, and Google CSE (custom search engine) of each ingredient.

Data is then filtered and cleaned up on a sentence by sentence basis to be used by the LLM Mistral-7B-GPTQ for summary generation of health-effects and dietary restrictions of each ingredient. The results are evaluated using a human survey, ROUGE-1, ROUGE-L, and BERTScore-F1. Overall, the results show that the model generalizes well and have a competitive edge when compared to the ChatGPT-4o generate summaries from the survey.

This leads us to infer that, with proper preprocessing and finetuning, small, less complex models are able to perform comparatively well with large, complex models for specialized tasks. Given the rise of hallucination with increased complexity and size in recent commercialized models, this indicates that, maybe, model specialization is needed.

Table of Contents:

  1. project description
  2. demonstration video
  3. file structure
  4. installation and configuration

Demonstration Video:

File Structure:

nutritionAnalyzer/
│ ├── .gitignore
│ ├── environment.yml
│ ├── nutritionAnalyzer.ipynb
│ ├── projectReport-may5th2025.pdf
│ └── README.md
└── .env

Installation and Configuration:

Please refer to environment.yml

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages