๐ง Mood-Based Recipe Recommendation System
This project is a Natural Language Processing (NLP)-powered recipe recommendation system that personalizes meal suggestions based on the user's mood or craving.
It leverages TextBlob, spaCy, and TF-IDF cosine similarity to analyze user input and match it with recipes from the Food.com Recipes and Reviews dataset.
- Source: Kaggle - Food.com Recipes and Reviews
- Records: Over 226,000 recipes
Name,AuthorId,Description,RecipeInstructions- Time metrics:
PrepTime,CookTime,TotalTime - Nutritional info:
Calories,FatContent,ProteinContent,CarbohydrateContent - Ingredients:
RecipeIngredientParts - Ratings:
AggregatedRating,ReviewCount,RecipeServings
- Identifies user mood from free-text input using:
- TextBlob sentiment polarity
- Keyword-based rules
- Supported moods:
comfort,energizing,light,indulgent,refreshing,hearty,sweet,detox,neutral
- Cleans and parses
DescriptionandRecipeIngredientParts - Lemmatizes and filters non-alphabetic tokens using TextBlob and spaCy
- Computes total cooking time (in minutes) from ISO 8601 durations
- Derives:
CaloriesPerServingProteinToFatRatioCarbToFatRatio
- Classifies recipes into:
Easy,Medium, orHardcomplexity levels
- Tags each recipe with a predefined
MoodTagbased on ingredients and description
- Filters recipes matching the detected mood
- Vectorizes processed recipe text using TF-IDF
- Computes cosine similarity to user input
- Returns top-N recipe matches
- Mood tag distribution plot (Seaborn)
- Ingredient word cloud (WordCloud)
- Python
PandasNumPyMatplotlibSeabornTextBlobspaCyscikit-learnWordCloud
- Google Colab (for development)
- Kaggle (for dataset)
- TF-IDF Vectorization
- Cosine Similarity
- Sentiment Analysis (TextBlob)