Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NovelNudge is a book recommendation engine that embeds titles, descriptions, authors, and genres using SentenceTransformers. It combines these vectors and ranks similar books with cosine similarity and fuzzy title matching.

Notifications You must be signed in to change notification settings

jmagali/NovelNudge

Repository files navigation

NovelNudge

Submission for Hack The Ridge 2025.

A smart book recommendation engine powered by vector embeddings.

Discover books tailored to your interests! NovelNudge uses SentenceTransformers to embed book titles, descriptions, authors, and genres into vectors. It then finds the most similar books using cosine similarity and fuzzy title matching, delivering highly relevant recommendations in real-time.

Features

  • Search by book title or description
  • Combines multiple factors (title, description, author, genre) into a weighted vector for better recommendations
  • RapidFuzz integration for fuzzy matching of book titles
  • Responsive web interface with live search results and thumbnails
  • Easily extendable dataset and vector embeddings

Installation

Requirements

  • Python 3.10 — 3.12 recommended
  • pip installed

1. Clone the repo

git clone https://github.com/jmagali/NovelNudge.git

2. In the terminal, navigate to the directory where the repository was cloned, e.g.,

C:\Users\User\NovelNudge

3. Install the required Python libraries

pip install -r requirements.txt # This installs the required libraries

4. Run the Flask application

python app.py

5. Open in browser

Navigate to http://127.0.0.1:5000/ to use NovelNudge.

How It Works

  • Vectorization: Titles, descriptions, authors, and genres are encoded into vectors using SentenceTransformer.
  • Combining Vectors: Each book's vectors are weighted and summed to form a combined vector.
  • Search & Matching:
    • Title mode: RapidFuzz fuzzy matching selects a close match first.
    • Description mode: Input text is embedded and compared with all combined vectors.
  • Recommendation: Top-N similar books are returned based on cosine similarity.
  • Frontend Display: Results are displayed with thumbnails, authors, ratings, and similarity scores.

Director Structure

.
├── data/
│   ├── vectors/
│   │   ├── combined_vectors.npy
│   │   ├── vectorsAuthor.npy
│   │   ├── vectorsDes.npy
│   │   ├── vectorsGenre.npy
│   │   └── vectorsTitle.npy
│   ├── genre_list.csv
│   ├── processed_data.csv
│   └── unprocessed_data.csv
├── static/
│   ├── css/
│   │   └── style.css
│   ├── js/
│   │   └── app.js
│   └── img/
│       ├── book-education-learn-svgrepo-com.svg
│       └── github-mark.svg
├── templates/
│   └── index.html
├── .gitignore
├── .gitattributes
├── app.py
├── process_data.py
├── recommendations.py
└── requirements.txt
└── README.md

Dataset from Kaggle

About

NovelNudge is a book recommendation engine that embeds titles, descriptions, authors, and genres using SentenceTransformers. It combines these vectors and ranks similar books with cosine similarity and fuzzy title matching.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •