Book Recommender
What is the problem?
By developing a book search and recommender system, we aim to understand how Prolog can be applied in parsing through a dataset and construct meaningful answers about a given world in an organized manner. In this case, we aim to create a book recommender that can find a suitable book based on a variety of questions, not limited to but including questions on genre, rating, author, popularity, to fit the user's preferences; and also to develop a search system based on simple and more complex queries. We will limit the responses to a maximum of 10 books at a time.
What is the something extra?
We will be using two datasets (csv files) to create our knowledge base:
- https://www.kaggle.com/datasets/chhavidhankhar11/amazon-books-dataset/data
- https://www.kaggle.com/datasets/saurabhbagchi/books-dataset
The search and recommender system will be presented through a text-based GUI, and works like the following:
- The recommender system will guide the user with questions that will help narrow down on a subset of books from the dataset
- The search system will allow users to make searches similar to what we've done in class
What did we learn from doing this?
- Prolog can be used to effectively recommend books when asking specific questions and limiting inputs in an organized way, i.e in
recommend.pl
- Learned how to create a natural language model in Prolog and how challenging it was to add support for questions due to the strictness of pattern matching. Syntax rules had to be created for each specific combination of words leading to very rigid question structures in order for them to be recognized by our system, i.e in
books.pl
- Learned how to use and load CSVs as sources for the knowledge base, and discovered that combining different datasets for books can be challenging because they don't always have a value for all the same fields, or their values may be represented differently - this is partly why we opted to having different book representations/databases per dataset (i.e in
gendb1.pl
andgendb2.pl
) - Learned how to build facts about the world using real data and how to search for queries (including chaining conditions) based on user input
Work division
Will privately communicate with the TA.