Skip to content

luyluish/legato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legato: A Prolog Song Recommender

Table of Contents

  1. Overview
  2. Funcionality
  3. Files
  4. Tech Used

🎶 Overview

The following software was made as an assignment for the UFPB "Applied Computer Science Logic" course. In the referred assignemnt, each group was tasked to make a project written in Prolog, a programming language based on first-order logic.

Thus, Legato was born from the idea of using first-order logic to recommend songs for the user, based on another song they like.

🎵 Funcionality

In order to launch Legato, you will need to have an enviroment that runs Prolog files, such as SWI-Prolog. Once you have it installed, just consult the file menu.pl and the execution will start.

When first launching Legato, you will be greeted with a menu, asking whether you want to get a song recommendation or exit the program. The recommendation algorithm works as following:

Let's say you want a recommendation based on "The Adults are Talking" by "The Strokes".

  • First, the program asks you for a song, so you input...

the adults are talking

  • Then, the program asks for the artist, you must write...

the strokes

(Note that everything needs to be written in lower case, because that's how the songs are stored in the database file.)
  • After that, the program will output a list with 5 songs remotely similar to the one you wrote.

🎧 Files

  • songs.pl contains the declaration of all 114.000 songs present in the Spotify dataset we based the project on. Each line is a different song.

  • functions.pl contains all the main functions needed for the recommendation logic to work, such as the attribute proximity calculator.

  • menu.pl is the main launch file, in which the user will interact with in order to get the recommendations. (Run this to use the program!)

  • dataset.csv is the raw dataset we consulted in order to create the songs list.

🌐 Tech Used

PROLOG