Flask-driven Book Search Engine & Recommendation System with HTML CSS, JS, Wikipedia API & Collaborative-Filtering Using KNN
Wanderlust Reads is a Flask-driven book application that uses Wikipedia API for book searching and techniques like Collaborative Filtering using the KNN model for recommendations. It uses HTML, CSS, and Vanilla JavaScript for the front end. It also has an add-to-cart and ordering books functionality.
- Automated Dependency Management: Automatically checks and installs missing Python libraries required for the project.
- Book Search Functionality: Allows users to search for books and retrieve relevant content from Wikipedia.
- Spelling Correction: Corrects user input using a spell checker to improve search accuracy.
- Recommendation System: Recommends books based on similarity using a pre-trained K-Nearest Neighbors (KNN) model.
- Interactive Web Interface: A user-friendly web interface built with Flask, CSS, JavaScript, and HTML.
- Dynamic Content Display: Shows search results, book information, images, and recommendations dynamically.
- Book Order Functionality: The user can add books to the cart, fill out the form, and order the book.
- Data Preprocessing: Cleans and preprocesses input data to ensure accurate search results and recommendations.
This project implements a Book Chatbot that utilizes various libraries and API to provide information about books based on user queries. Below is an overview of its features, functionalities, and how to use it effectively.
- Converts user input to lowercase.
- Performs spell-checking and correction for English words using TextBlob and SpellChecker.
- Uses wikipedia library to fetch content about a book.
- Extracts relevant sections based on user query using regular expressions.
- Fetches multiple book cover images from Google Images API using BeautifulSoup for web scraping.
- Downloads and saves the images locally for display.
This project implements a book recommendation system based on collaborative filtering using the k-nearest neighbors algorithm (k-NN). The system recommends books similar to a given book using user ratings data.
- Book Recommendation: Given a book title, the system recommends similar books based on user ratings.
- Model Persistence: The trained k-NN model and recommendation function are saved using pickle for easy reuse.
- Data Cleaning: The dataset was cleaned to handle CSV file inconsistencies before loading into the system.
- Dataset: Utilizes the Book-Crossings dataset, containing user ratings of books.
- Nearest Neighbors Algorithm: The k-NN algorithm with cosine similarity metric.
- Flask: A lightweight WSGI web application framework for backend development in Python.
- Python: The core programming language used for backend logic and data processing for search engines and recommendations.
- Jupyter Notebook: Used for initial development and testing of functions and algorithms.
- HTML/CSS: For designing and structuring the front end of the application.
- JavaScript: Adds interactivity to the front end.
- Wikipedia API: For fetching book information and summaries from Wikipedia.
The following Python libraries are utilized in this project:
- wikipedia-api: Retrieves book information from Wikipedia.
- textblob: Processes textual data, including tokenization and spelling correction.
- spellchecker: Performs spelling correction on user input.
- requests: Handles HTTP requests for external APIs and web content.
- BeautifulSoup: Parses HTML and extracts data from web pages.
- nbformat: Converts Jupyter Notebook content to Python scripts.
- nbconvert: Exports Jupyter Notebooks to Python scripts.
- flask: Provides the web framework for the backend.
- Pillow: Handles image processing tasks.
- matplotlib: Creates visualizations and plots.
- numpy: Supports numerical computations.
- pandas: Manages dataframes and preprocessing.
- scipy: Provides scientific and technical computing tools.
- scikit-learn: Supplies machine learning algorithms for recommendations.
- pickle: Serializes and deserializes Python objects.
The front end for image retrieval and recommendation system has not yet been implemented. Only the backend has been implemented.