A Semantic Wiki Application Using Semantic Mediawiki
Total Page:16
File Type:pdf, Size:1020Kb
TDT4215 Web-intelligence Project Report A semantic wiki application using Semantic MediaWiki Group 12 Hedda Nonstad Jakob Hovland Sigurd Sandve Jørgen Grimnes March 2015 Abstract This report will describe the design process of a Semantic MediaWiki application. We will start by establishing a theme for the wiki and then move on to how we implemented the semantic wiki as a web application. The wiki will rely heavily on aggregated content from Freebase and DBPedia and maintain a clear semantic annotation by using common ontologies such as the Friend of a Friend and the rdfs ontology. Preface TDT4215 - Web Intelligence is one of the available courses for specialization within data and information management. The purpose of this course is to give the students an understanding of the web-based information systems and how advanced technologies can be used to access it or explore the knowledge. The team, consisting of four students from the Department of Computer and Information Science at the Norwegian University of Science and Technology(NTNU). Our task was to make a wiki based on the semantic web, RDF, SPARQL, ontologies(OWL), searching and querying content, and categorizing content. I Contents 3.4 Collect character information from DBPedia. .5 3.5 Retrieving a description of the 1 Introduction 1 Rings of Power from Freebase. .5 1.1 Problem Description . .1 4.1 Content aggregation using DB- 1.1.1 Wiki Theme . .1 Pedia. .6 1.1.2 Motivation . .1 2 Preliminary studies 1 List of Tables 2.1 Desired Solution . .1 2.2 Existing wikis . .1 3.1 Links to the structure of the Wiki.4 2.3 Technical limitations . .2 2.4 Tools and technologies . .2 2.4.1 Semantic MediaWiki . .2 2.4.2 Semantic Bundle . .2 2.4.3 Theory from the curricu- lum . .2 3 The wiki architecture 2 3.1 The ontology . .2 3.2 Classes and properties . .2 3.3 Structure of the web application3 3.4 Formatting a query . .3 3.4.1 Advanced query 1: Gathering character information . .4 3.4.2 Advanced query 2: Get a description of the Rings of Power . .4 3.5 The public domain . .5 3.5.1 Wiki users . .5 3.5.2 Introduced risks . .5 4 Implementation 5 4.1 Forms . .5 4.1.1 Content aggregation . .5 4.2 Problems and challenges . .6 5 Conclusion 6 5.1 Final conclusion . .6 5.2 Future work . .7 5.3 Evaluation of the project . .7 List of Figures 3.1 Our ontology . .3 3.2 Query for the Hobbit friends of Gandalf . .3 3.3 List the bearers of The One Ring.3 II 1 Introduction movie series based on The Hobbit has also been seen by all the group members. A few group 1.1 Problem Description members have also read The Silmarillion. Be- cause of the popularity of the series, we knew We were tasked to create a wiki with a theme there would be a lot of information available on of our own choice. The wiki was required be ac- our subject. cessible to the public. We were encouraged to use an open source wiki engine such as Seman- We decided that the wiki should be based tic MediaWiki [3] which is hosted free of charge upon the characters related to the Rings of at referata.com. The produced wiki should at Power. There are a lot of other wikis with infor- least fulfill the following parameters: mation on the J.R.R. Tolkien world, so we de- cided to make a wiki with a very specific theme • The wiki should be capable of displaying ex- rather than making a poor copy of the already ternal data. This data could be available established wikis. through eg: SPARQL endpoints. • The wiki should use at least one external 2 Preliminary studies ontology to annotate the content, such as the Friend of a Friend ontology (FOAF). 2.1 Desired Solution The theme of our wiki is based on Tolkien's • The wiki should be structured in a manner work and will contain information on the char- that encourages semantic search and must acters whom are related to the Rings of Power. offer at least two different ways of search- An idealistic solution will contain enough infor- ing and browsing the data. mation to the extent that the user won't need to look any further. The wiki could reach this 1.1.1 Wiki Theme. During the initial dis- goal by collecting information from other wikis cussions regarding the theme of our wiki, we and aggregate its stored knowledge by queries considered to create a semantic application to external resources. In order to construct a about movies. Unfortunately, once we began solution of this magnitude we will depend on working on the project we discovered that the using existing function calls and great docu- movie domain was too large and complex to mentation of the inner workings of the Semantic model in the limited time frame of our project. MediaWiki application. In order to narrow the scope of our project, we had to reconsider our chosen domain. After 2.2 Existing wikis some discussion we decided to create a seman- Tolkien Gateway[2] is probably the biggest tic wiki about characters from Middle-earth, wiki with the theme around J.R.R Tolkien and a fictional universe created by J.R.R. Tolkien. his world of Middle earth. It is an fan driven Middle-earth contains a wide range of magi- wiki, so every user and all fans can edit and cal creatures, such as hobbits, elves, nazguls share their wisdom. Users are editing the pages and orcs, and legendary items like the Rings daily and since their launch in 2005, they now of Power. We have defined the wiki's tagline have has over 11 000 articles and 42 000 pages. as \Characters from Middle-earth that are con- To best present their information they are ref- nected to the Rings of Power". erencing every part of their wiki to the pages of Tolkien's work. The Tolkien Gateway is cre- 1.1.2 Motivation. The Lord of the Rings ated with MediaWiki, but it does not imple- and The Hobbit are enormously popular books ment the Semantic MediaWiki extension. This and movie series. All of the members in the implies that we can't issue semantic queries to group have seen the The Lord of the Rings the Tolkien Gateway and that the wiki don't movies several times and some of the mem- facilitate data collection. bers have also read the books. The newly made The One wiki to Rule them all[1] is similar to 1 the Tolkien Gateway wiki, but it is smaller in the wiki uses the Friend-of-a-Friend (FOAF) size. It provides fans with a community based ontology to annotate its entities. FOAF is a on a shared interest and have a lot of the same small ontology for describing people and their features as the Tolkien Gateway. relationships. Specifically, the wiki uses the Agent, Person and Group classes; and the 2.3 Technical limitations Name, Age, Gender, Knows and Member prop- The project description recommended us to erties from FOAF. The Person class is one use Referata as the platform to distribute our of the core classes in FOAF. In the wiki it is wiki. The main problem with Referata was used as a base class for the race classes; Man, the lack of support for SPARQL queries. We Elf, Dwarf, Hobbit and Maia. The race classes needed therefore to migrate the wiki from are used to describe characters of the differ- Referata to folk.ntnu.no, in order to accom- ent races. All the race classes have the same modate the requirements of this project assign- properties; Name, Age, Gender, Knows, and Is ment. Ring Bearer. Although the race classes should be disjoint, Semantic MediaWiki does not al- 2.4 Tools and technologies low us to define the classes in such a way. The This section gives presents the open source Group class is another core class in the FOAF tools we have used during the implementation ontology. In the wiki it used to define groups of the wiki. of Agents and is itself a subclass of Agent. The Group class has two properties: Name and 2.4.1 Semantic MediaWiki. The Semantic Members. MediaWiki is an extension to the popular open The ontology presented graphically in Fig- source project MediaWiki which enriches the ure 3.1. wiki application with the power of semantic no- tation. The Semantic MediaWiki also facili- 3.2 Classes and properties tates dynamic representation of information by In the following section we will describe the running queries on the structured data. classes and properties in our ontology. The de- cision for choosing them is to best fit the wiki to 2.4.2 Semantic Bundle. The Semantic our theme. The properties of the race classes Bundle is a pre-packaged bundle of common Hobbit, Elf, Dwarf, Man and Maia are listed tools and extensions that plays nicely with below: Semantic MediaWiki and provides \essential" functionality such as SPARQL support, along • foaf:name: The name of the character. with other useful tools such as Semantic • foaf:age: The age of the character at the Drilldown. time of Boromir's death. 2.4.3 Theory from the curriculum. We • foaf:gender: The gender of the character. will have to rely on our theoretic background The allowed values are Male and Female. from the lectures in order to construct the re- quired SPARQL queries for content aggregation • foaf:knows: The characters that are known and we will rely heavily on the basic under- by this character.