Development of a Movies Ontology and a Semantic Web Application that Suggests Movies Based on User's Favor Criteria Yüce TEKOL Overview Introduction IMDB Ontology Cwmovies Test Database Test 1 Test 2 Test 3 Introduction The Internet Movie Database (http://www.imdb.com) lists details of millions of movies, tv shows, etc. with many detatils such as the director, the cast and genre for cinema fans. Being a vast database, it presents a good opportunity to study and experiment Semantic Web concepts; also, developed tools may be useful for many people. Cwmovies is a Python application that recommends movies based on a user's favor criteria. Cwmovies uses Tim Berner's Lee's Cwm as its reasoning engine. IMDB Ontology The ontology used by Cwmovies is designed in SWOOP. The ontology imports the IMDB ontology written by Gunnar Aastrand Grimnes, and adds “genre” property which is missing from it. IMDB Ontology (cont'd) Below is the ontology used by Cwmovies. Cwmovies Cwmovies is invoked from the command line together with the full path name of a file which contains the user's favor criteria, such as “the movie should be a science-fiction movie and its director should be Steven Spielberg” written in N3 query format. Cwmovies has two functions: 1.Builds the movies database which is in RDF/XML by fetching information from IMDB. 2.Runs Cwm on the database and the user favor criteria file and interprets the outputs, finding the movies that correspond to the criteria. Cwmovies - Screenshot Cwmovies - Tools Following tools have been used for the development of Cwmovies: 1.Python 2.4.3 <http://www.python.org> 2.IMDbPy 2.8 <http://imdbpy.sourceforge.net> 3.rdflib 2.3.3 <http://rdflib.net> 4.Pawk 0.0.1 <http://code.google.com/p/py-pawk/> Test Database All the tests run on an RDF/XML file which is automatically fetched and converted by Cwmovies and contains title, year, director and genre information of 153 movies which are in IMDB's top movies of the following genres: Crime, Thriller, Horror and Science-fiction. Test Database (cont'd) Test 1 Favor criteria All thriller movies produced after 2000 N3 Query @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix imdb: <http://purl.org/NET/tekol/yuce/2007/imdb-ns#> . @prefix cwmv: <http://purl.org/NET/tekol/yuce/2007/cwmovies-ns#> . @prefix math: <http://www.w3.org/2000/10/swap/math#> . { ?x imdb:genre "Thriller". ?x.imdb:year math:greaterThan 2000. } => { ?x a cwmv:favorite } . Test 1 (cont'd) Results Batman Begins Children of Men Donnie Darko El Laberinto del Fauno Hotel Rwanda Kill Bill: Vol. 1 Kill Bill: Vol. 2 Minority Report Serenity Sin City Spider-Man 2 The Departed The Others V for Vendetta X2 Test 2 Favor criteria Any of Francis Ford Coppola's Films N3 Query @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix imdb: <http://purl.org/NET/tekol/yuce/2007/imdb-ns#> . @prefix cwmv: <http://purl.org/NET/tekol/yuce/2007/cwmovies-ns#> . { ?x imdb:director "Francis Ford Coppola" } => { ?x a cwmv:favorite } . Results The Conversation The Godfather The Godfather: Part II Test 3 Favor criteria Crime movies produced between 1960 and 1975 N3 Query @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix imdb: <http://purl.org/NET/tekol/yuce/2007/imdb-ns#> . @prefix cwmv: <http://purl.org/NET/tekol/yuce/2007/cwmovies-ns#> . @prefix math: <http://www.w3.org/2000/10/swap/math#> . { ?x imdb:genre "Crime". ?x.imdb:year math:greaterThan 1960. ?x.imdb:year math:lessThan 1975. } => { ?x a cwmv:favorite } . Test 3 (cont'd) Results A Clockwork Orange Butch Cassidy and the Sundance Kid Cape Fear Chinatown In Cold Blood Le Samouraï The Conversation The Godfather The Godfather: Part II The Sting Yojimbo Conclusions A Semantic Web application that makes use of vast movies database of IMDb together with an ontology is presented. The system is capable of presenting movies which conform to user's favor criteria. Currently, only genre, title, year and director fields can be included in the query, but adding other fields is not hard. That's All...