Authors:Shijia Su, Tom Mo
What is the problem?
People sometimes have difficulty and would spend a lot of time in choosing film they are going to watch. We want to create a film recommendation system based on users' preferences by using Prolog.
The user would be prompted by a series of questions about their preference and other information to receive a reccomendation.
The range of the recommendation is determined by the movie information provided in the csv file.
What is the something extra?
We built [gendb], a csv parser that reads from a csv file that contains IMDB information and adds relevant information to the program's knowledge base.
What did we learn from doing this?
- We managed to build a program that generates its knowledge base depending on the csv file provided, and return a list of movies based on user's answers to pre-determined questions.
- Prolog is very suited for managing databases due to its syntax.
- Entries of CSV can be quickly obtained through pattern-matching
- assert() provides a quick way of implementing a dynamic knowledge base
- It is very easy to filter all entries that fit some requirements, since prolog can find all possible answers to a query.
- There are some inconveniences as well
- Aside from patterm matching, we did not find a quick way to handle uninitiated/empty variables that can sometimes arise from reading CSV entries.
- Overall, prolog makes for a very quick way to implement a program that centers around reading and handling a set of data.
Link to code